July 30, 2023

tELTSAPMap – Docs for ESB 7.x

tELTSAPMap

Builds the SQL SELECT statement using the table schema(s) provided by one or more
tELTSAPInput components.

During the execution of the Job, the tELTSAPMap component executes the SQL
query statement on the SAP system, then the SAP system generates as many files as needed and
writes the retrieved data in these files, finally the tELTSAPMap component
reads the files one by one via an FTP connection and transfers the data to an output
component, such as tFileOutputDelimited.

tELTSAPMap Standard properties

These properties are used to configure tELTSAPMap running in the
Standard Job framework.

The Standard
tELTSAPMap component belongs to the ELT
family.

The component in this framework is available in all subscription-based Talend products.

Basic settings

Property Type

Either Built-In or Repository.

  • Built-In: No property data stored centrally.

  • Repository: Select the repository file where the
    properties are stored.

Use an existing connection

Select this check box and from the list displayed select the
relevant connection component to reuse the connection details you have already defined.

Note: When a Job contains the parent Job and the child Job, if you
need to share an existing connection between the two levels, for example, to share the
connection created by the parent Job with the child Job, you have to:

  1. In the parent level, register the database connection
    to be shared in the Basic
    settings
    view of the connection component which creates that very database
    connection.

  2. In the child level, use a dedicated connection
    component to read that registered database connection.

For an example about how to share a database connection
across Job levels, see

Talend Studio
User Guide
.

SAP Map Editor

The ELT Map editor allows you to define the output schema and build graphically
the SQL statement to be executed. The column names of schema can be different
from the column names in the SAP system.

Server Type

Select the type of the SAP server to be connected, either
Application Server or Message
Server
.

Client

The SAP system client ID.

UserId and Password

The user connection ID and password.

To enter the password, click the […] button next to the
password field, and then in the pop-up dialog box enter the password between double quotes
and click OK to save the settings.

Language

The language of the SAP system.

Host name

The name or IP address of the host on which the SAP server is
running.

System number

The SAP system number.

This property is available only when Application
Server
is selected from the Server
Type
drop-down list.

System ID

The SAP system ID.

This property is available only when Message
Server
is selected from the Server
Type
drop-down list.

Group Name

The SAP group name.

This property is available only when Message
Server
is selected from the Server
Type
drop-down list.

Batch size

Specify the maximum number of records that can be written in each file
generated by the SAP system.

File protocol

Select either FTP or the secure alternative SFTP.

FTP host

Specify the IP address or the host name of the FTP server.

FTP port

Specify the listening port number of the FTP server.

FTP user and FTP password

Specify the user authentication data to access the FTP server.

To enter the password, click the […] button next to the
password field, and then in the pop-up dialog box enter the password between double quotes
and click OK to save the settings.

FTP directory

Specify the directory where the files generated by the SAP system will be
saved.

Data filename prefix

Specify the prefix of the files generated by the SAP system.

Specify a shared destination

Select this check box and specify the shared destination in the
Shared destination name field
displayed. The shared destination allows the SAP components to use the
shared destination on the Talend Runtime when they are executed as part of
an ESB Route or ESB Data Service within the Talend Runtime
container OSGi Environment.

Besides specifying the shared destination name in the component,
you also need to setup the SAP DataSource for the Talend Runtime.
What you need to do to define the SAP DataSource and how to configure it are
described in the readme.txt provided in the Talend ESB
package within the /add-ons/datasource/sap folder.

Note that if you use the component’s own connection configuration,
your SAP connection will be closed at the end of the component. To prevent
this from happening, use a shared destination with its name specified.

RFC server url

Enter your RFC server details in the field provided.

The Studio uses the RFC server as the streaming proxy to support high volume of
data extraction without the need to store information on a third-party transfer
protocol such as FTP or SFTP.

This field becomes visible when you select Use the RFC server in the Advanced settings view.

Package size

Specify the number of records for each package. By default,
the value displays 10000.

In case you have a value higher than 10000, for example, 12000, the Studio
creates two packages – one package that contains 10000 records and another
package that contains 2000 records.

This field becomes visible when you select Use the RFC server in the Advanced settings view.

Advanced settings

Use the RFC server (Technical
Preview)
Select this check box if you wish to directly extract high volumes of data
from an SAP application. When you select this option, the Connection configuration
section displays the fields for the RFC server
url
and Package size. For
more information, see the corresponding description of those fields in the
Basic settings view.
Kafka Properties When you select the Use the RFC
server
option, the window displays the Kafka Properties table.
Kafka, or Apache Kafka, is an open-source distributed streaming platform. For more
information about Kafka, refer to https://kafka.apache.org/.

Enter your Kafka information in the fields
provided.

Use space to replace the control characters in data

Select this option to replace special characters in data with spaces. Some characters in data
(for example,
) may affect data parsing because they are
treated as control characters. This option prevents this by replacing the
special characters with spaces.

This option is selected by default.

SAP Properties

If you need to use custom configuration for the SAP system being
used, complete this table with the property or properties to be customized.
For example,

This property is not visible when the Use an existing
connection
check box is selected.

tStatCatcher Statistics

Select this check box to gather the Job processing metadata at the Job level
as well as at each component level.

Global Variables

ERROR_MESSAGE

The error message generated by the component when an error occurs. This
is an After variable and it returns a string.

Usage

Usage rule

The tELTSAPMap component is more commonly used along
with the tELTSAPInput component. The name of the link
from tELTSAPInput to tELTSAPMap
should be same as the table name specified in the Default Table
Name
field of tELTSAPInput.

Support

tELTSAPMap should be used to interact with the ERP part of
SAP, including S4/HANA.

Aggregating and filtering data in multiple SAP tables

This example demonstrates how to use the tELTSAPInput and
tELTSAPMap components to aggregate data from two SAP tables and
filter the columns and rows of data, finally write the filtered data into a local CSV file
using a tFileOutputDelimited component.

Creating a Job for aggregating and filtering data in multiple SAP tables

  • The corresponding SAP transport that performs the SAP table join function
    needs to be installed on your SAP system. For more information, see the
    related documentation on how to install a Talend function
    module for SAP.

  • The FTP connection has been set up on the SAP server side to allow the
    tELTSAPMap component to download all data files
    generated by the SAP system.

  • The connection dedicated to your SAP server has been set up in the
    Repository tree view and the two SAP tables
    ZTAL_VBRK and ZTAL_VBRP to
    be joined and their schemas have been retrieved and saved under the SAP
    connection node.

    tELTSAPMap_1.png
  1. Create a new Job and add a tELTSAPMap component and a
    tFileOutputDelimited component onto the design
    workspace.
  2. Drag and drop the table node ZTAL_VBRK in the
    Repository tree view onto the design workspace, in
    the pop-up dialog box, select tELTSAPInput and click
    OK, a tELTSAPInput component
    labeled to ZTAL_VBRK will be added.
  3. Do the same to drag and drop the table node ZTAL_VBRP in
    the Repository tree view onto the design workspace to add
    another tELTSAPInput component labeled to
    ZTAL_VBRP.
  4. Link the tELTSAPInput component labeled to
    ZTAL_VBRK to the tELTSAPMap
    component using a Link > ZTAL_VBRK (Table) connection.
  5. Link the tELTSAPInput component labeled to
    ZTAL_VBRP to the tELTSAPMap
    component using a Link > ZTAL_VBRP (Table) connection.
  6. Link the tELTSAPMap component to the
    tFileOutputDelimited component using a Row > *New Output* (Main) connection, in the pop-up dialog box, enter the output name
    out in the field and click OK.
    The tELTSAPMap component will be linked to the
    tFileOutputDelimited component using a connection
    labeled to out (Main).

Configuring the Job for aggregating and filtering data in multiple SAP tables

  1. Click the tELTSAPMap component and then the
    Component tab to open its Basic
    settings
    view.

    tELTSAPMap_2.png

  2. Select Repository from the Property
    Type
    drop-down list and click the […]
    button near to Property Type and in the pop-up dialog box
    select the SAP connection node that has been created in the
    Repository tree view. When done, click
    OK and all SAP connection configuration fields will
    be automatically filled.
  3. In the FTP host, FTP port,
    FTP user, FTP password and
    FTP directory fields, enter the FTP connection
    information. The tELTSAPMap component will read all data
    files generated by the SAP system via this FTP connection.
  4. In the Data filename prefix field, specify the prefix of
    the files generated by the SAP system.
  5. Click the […] button next to SAP Map
    Editor
    to open its map editor.

    tELTSAPMap_3.png

  6. On the top left panel, drag and drop the node LFNINDX in
    the ZTAL_VBRK table onto the node
    LFNINDX in the ZTAL_VBRP table
    to create an inner join between the two tables.
  7. Drag and drop the nodes MANDT,
    LFNINDX, VBELN,
    FKART, FKTYP,
    VBTYP, WAERK,
    VKORG, VTWEG in the
    ZTAL_VBRK table on the top left panel onto the
    out table on the top right panel, and only the data
    of those columns will be retrieved and written into the output CSV file.
  8. Click the Add clause row button on the top right corner
    of the out table and then click Add a WHERE
    clause
    . In the Additional WHERE clauses
    field displayed, enter the clause used to filter the rows of data to be
    retrieved. In this example, it is ZTAL_VBRK~VKORG = '1000' AND
    ZTAL_VBRK~VTWEG = '10'
    , which will filter only the rows of data
    with the value of VKORG set to
    1000 and the value of VTWEG
    set to 10.
  9. Click Generated SQL Select query for “” output at the
    bottom and you will see the generated SQL SELECT query used to aggregate and
    filter the data from the two tables.

    tELTSAPMap_4.png

    When done, click OK to close the map editor.

  10. Double-click the tFileOutputDelimited component to open
    its Basic settings view. In the File
    Name
    field, specify the path to the file into which the
    aggregated and filtered data will be written, D:/out.csv
    in this example. Then click the Sync columns button to
    retrieve the schema from its previous component.

Executing the Job to aggregate and filter data in multiple SAP tables

  1. Press Ctrl + S to save the Job.
  2. Press F6 or click
    Run on the Run tab to execute
    the Job.

    Note that the execution of the Job might take a long time if there is a large
    amount of data in the source tables.

  3. Open the generated CSV file to check the filtered data.

    tELTSAPMap_5.png

    As shown above, only the selected nine columns of data with the value of
    VKORG set to 1000 and the
    value of VTWEG set to 10 is
    filtered and written into the output CSV file.


Document get from Talend https://help.talend.com
Thank you for watching.
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x