Our Work

Article on SAP Configuration and Schema Mapping in Talend

Updated 1 year, 2 months and 6 days ago

Article on SAP Configuration and Schema Mapping in Talend
 

 SAP Java Connector Configuration in Windows:

2.1 Overview:

Before using SAP components, user must install SAP Java connector. This article will explain how to install


SAP Java connector into Talend Studio.

 2.2 Procedure:

  1.  Download the SAP Java connector

  • Talend Studio does not include the SAP Java connector (JCO), it is usually delivered by SAP provider.

  • User can also download it from the SAP Service Marketplace at http://service.sap.com/connectors.If any problem while

    obtaining it,then please check with authorized SAP Provider

     

  1.  Check SAP JCO version:

  • After downloading the SAP JCO or getting it from the authorized SAP provider, User must check that they have the


    appropriate distribution package on their system and processor,


    as follows.

  • Unzip the distribution package.

  • Open the installation guide page in browser: {SAP JCO-install-path}/javadoc/installation.html (or)


     {SAP JCO-install-path}/docs/jco/installation.html).

  • Read the SAP JCO installation guidance and check the appropriate distribution package on the system and processor.

  1.  Install SAP JCO:

  • Talend Studio 4.2.0 and earlier versions support SAP JCO2.1.8 / 2.1.9.

  • Talend Studio 4.2.0 and later versions support SAP JCO 3.0 and 2.1.8 / 2.1.9.

  • The following steps describe how to install a different version of the SAP JCO into Talend Studio on Windows XP SP3

    32-bit with a 32-bit JRE running.

SAP JCO 3.X:
  • Unzip the appropriate distribution package into an arbitrary directory sapjco3.X.

  • Add sapjco3.x to the system PATH environment variable.

  • Open the directory sapjco3.x .Copy the two .dll files: librfc32.dll and sapjcorfc.dll, and paste them into


    "c: /windows/system32".

  • In Talend Studio, install sapjco3.x /sapjco.jar, as follows:

a. Click Window in the toolbar, then click Show view, and finally click Talend. Open



the Modules viewer if it does not appear.

b. Click the icon as shown in the following figure to install the sapjco.jar required for the SAP



components. In the next window, browse to sapjco3.x/sapjco.jar.


c. Restart Talend Studio.              

3.SAP Java Connector Configuration in Linux:

3.1 Overview:

Before using SAP components, user must install SAP Java connector. This article will explain how to install SAP Java



connector into Talend Studio.

 3.2 Procedure:

  1.  Download the SAP Java connector

  • Talend Studio does not include the SAP Java connector (JCO), it is usually delivered by SAP provider.

  • User can also download it from the SAP Service Marketplace at http://service.sap.com/connectors.

    If any problem while obtaining it, then please check with authorized SAP provider.

  1.  Check SAP JCO version:

  • After downloading the SAP JCO or getting it from the authorized SAP provider, User must check that they have the

    appropriate distribution package on their system and processor, as follows:

  • Unzip the distribution package.

  • Open the installation guide page in browser: {SAP JCO-install-path}/javadoc/installation.html (or)


     {SAP JCO-install-path}/docs/jco/installation.html).

  • Read the SAP JCO installation guidance and check the appropriate distribution package on the system and processor.

  1. Installing SAP JCo on Linux:

 Procedure:

1. In Talend Studio, install “sapjco3.jar” file into directory “TOSESB\Studio\lib\java\”

2. Copy “libsapjco3.so”(it depends on system 32/64bits) file in /usr/lib folder.


Make sure it has read/execute permissions.

4. Establishing the SAP Connection using tSAPConnection :

SAP Connection:

  1. Load the component from the palette and double click on it and configure the connection details as below.

  • Client: client id.

  • Userid: user for the connection. User should have access and execute permissions.

  • Password: password.

  • Language: language switching.

  • Host Name: SAP host name.

  • System Number: SAP server system number (usually the 00 where there is only one server).

  • Function name: Name of the function.

 


 


 

  1. SAP Connection from the Metadata:

1. Go to repository -> Metadata section and right click on SAP connections ->create sap connection.

2. Give appropriate name for the connection and click on next button will show the connection parameters screen.

Enter all the required details as mentioned in the screen below.


 

3. If the connection configuration is done then click on check button to verify the connection status.

4. If all the details are configured correctly then it will show “Connection successful” message else it will show “Connection failure”.

5. Schema Mapping with tSAPInput:

Example usage with RFC_READ_TABLE function:

1. Drop the tSAPInput component from the palette.

2. FunName: Give the required function name that we want to read the data from.

3. Go to Initialize input section and click on plus(+) symbol to add parameters like below.


 


 


 

  • Initialize input: Initialize the input parameters. These are the values ​​that we will move to the function module. In our case, we can pass simple values and values of the tables.

    • Input single: The parameters "QUERY_TABLE" and "DELIMITER" are the type input_single (single-entry) and passing to initialize a value, in particular the name of the table that we want to read and the delimiter to use.

    • Table input:

      • Enter values ​​in two tables. Table OPTIONS TEXT field like a where condition.

      • Table FIELDS and FIELDNAME are used to retrieve the required data. In this way, we can limit both the number of records returned.

      • If we have multiple values in the Fieldname section then we need to separate each value with comma.

 

  • Outputs:

      • Definition of the structure where we will manage data returned by SAP.

      • Here indicate the type of value retrieved (table_output for when the result is a table), the table name in Sap (TableName field (Structure Name) and Schema name (will be a name for the data flow, we can put any).

      • For example, we are reading data from the table DATA, which is a table of records, and each record has a unique field called WA.

      • The steps in this section for proper exchange definition data are as follows:

        1. First create the output stream by clicking on the button labeled "+".

        2. Create new output schema with appropriate name and click on ok button will give the schema wizard.

 

 

Add the schema as shown in the picture.


Go to Mappings section and click on the configuration button then it will show the Mappings screen and map the each field with the SAP column name(Schema XPathQueries field must be in double quotes only).

If we configure the input and output schemas then total job will look like this.


 

Now we can execute the job to get the desired output from the SAP System.

Recent Posts

Tags

    No tag results found for this post

Related Posts