August 17, 2023

tSAPTableInput – Docs for ESB 5.x

tSAPTableInput

tsaptableinput_icon32.png

tSAPTableInput Properties

Component family

Business/SAP

 

Function

This component connects to an SAP server and reads data from a
specified SAP table based on the pre-defined filter
condition.

Purpose

This component allows you to read data from an SAP table on an SAP
server.

Basic settings

Property Type

Either Built-In or Repository.

 

 

Built-In: No property data stored
centrally.

 

 

Repository: Select the repository
file in which SAP connection properties are stored. The fields that
follow are completed automatically using the data retrieved.

 

Use an existing connection

Select this check box and from the list that appears 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, the list that appears presents
only the connection components in the same Job level.

 

Server Type

Select the type of the server you are connecting to from the
drop-down list, either Application
Server
or Message
Server
.

 

Client

Specify the SAP system client ID.

 

UserId and
Password

Specify 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

Specify the language of the SAP system.

 

Host name

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

 

System number

Enter the system number.

This field appears only when Application
Server
is selected from the Server Type drop-down list.

 

System ID

Enter the system ID.

This field appears only when Message
Server
is selected from the Server Type drop-down list.

 

Group Name

Enter the group name.

This field appears only when Message
Server
is selected from the Server Type drop-down list.

 

Schema and Edit Schema

A schema is a row description. It defines the number of fields to be processed and passed on
to the next component. The schema is either Built-In or
stored remotely in the Repository.

Since version 5.6, both the Built-In mode and the Repository mode are
available in any of the Talend solutions.

Click Edit schema to make changes to the schema. If the
current schema is of the Repository type, three options are
available:

  • View schema: choose this option to view the
    schema only.

  • Change to built-in property: choose this option
    to change the schema to Built-in for local
    changes.

  • Update repository connection: choose this option to change
    the schema stored in the repository and decide whether to propagate the changes to
    all the Jobs upon completion. If you just want to propagate the changes to the
    current Job, you can select No upon completion and
    choose this schema metadata again in the [Repository
    Content]
    window.

 

Table

Specify the SAP table name.

 

Filter

Enter the filter condition between double quotes. The component
will read data based on this condition.

Note that the column value must be surrounded by single quotes and
there must be a blank space before and after the equals sign (=) in
the filter expression. For example, “MANDT =
‘800’ AND WAERK = ‘EUR’ OR (FKART = ‘F2’ AND VBELN =
‘0090038989’)”
.

 

Start row number

Specify the sequence number of the row from which data retrieval
starts. The sequence number of the row in an SAP table starts from
0.

The default value for this field is -1, which means to read all rows in the specified
table.

 

Max row number

Specify the maximum number of rows to retrieve data from.

The default value for this field is -1, which means to retrieve all rows that meet the
filter condition.

Advanced settings

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,

 

tStatCatcher Statistics

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

Connections

Outgoing links (from this component to another):

Row: Main, Iterate

Trigger: On Subjob Ok, On Subjob
Error, Run if, On Component Ok, On Component Error

Incoming links (from one component to this one):

Trigger: On Subjob Ok, On Subjob
Error, Run if, On Component Ok, On Component Error

For further information about connections, see Talend Studio User Guide.

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. This
variable functions only if the Die on error check box is
cleared, if the component has this check box.

A Flow variable functions during the execution of a component while an After variable
functions after the execution of the component.

To fill up a field or expression with a variable, press Ctrl +
Space
to access the variable list and choose the variable to use from it.

For further information about variables, see Talend Studio
User Guide.

Usage

This component is usually used as a start component in a Job and
it always needs an output link.

Limitation/Prerequisites

You must add specific jar and dll files validated and provided by
SAP to your Studio and the workstation hosting your Studio. This
procedure varies among platforms such as 32-bit or 64-bit Windows or
Linux.

For further information about this procedure for adding the
required files, see Talend Studio User
Guide
.

Scenario: Retrieving data from a specified SAP table

This scenario describes a Job that writes the data from a delimited file into an empty SAP
table, and then retrieves the data that meets the pre-defined filter condition from this
table and displays it on the console.

components-tsaptableinput_s1_job.png

In this scenario, the input data in the delimited file is as follows:

Dropping and linking the components

  1. Create a new Job and add the following components by typing their names in
    the design workspace or dropping them from the Palette: a tFileInputDelimited component, a tSAPOutput component, a tSAPTableInput component, and a tLogRow component.

  2. Connect tFileInputDelimited to tSAPOutput using a Row > Main link.

  3. Connect tSAPTableInput to tLogRow using a Row > Main link.

  4. Connect tFileInputDelimited to tSAPTableInput using a Trigger > On Subjob Ok
    connection.

Configuring the components

Writing the input data into an empty SAP table

  1. Double-click tFileInputDelimited to open
    its Basic settings view.

    components-tsaptableinput_s1_tfileinputdelimited.png
  2. In the File name/Stream field, browse to
    the file that contains the input data. In this example, it is E:/in.csv.

  3. In the Header field, enter the number of
    rows to be skipped at the beginning of the file. In this example, it is
    1.

  4. Click the […] button next to Edit schema to open the schema editor.

    components-tsaptableinput_s1_tfileinputdelimited_schema.png

    Click the [+] button to add three
    columns: id, name, and city, all of
    the string type.

    Click OK to close the schema editor and
    accept the propagation prompted by the pop-up dialog box.

  5. Double-click tSAPOutput to open its
    Basic settings view.

    components-tsaptableinput_s1_tsapoutput.png
  6. From the SAP JCO Version drop-down list,
    select SAP JCO 3.*.

  7. Fill in the connection configuration fields with your SAP system
    connection details. For more information about the connection parameters,
    see tSAPOutput Properties.

  8. In the FunName field, enter the name of
    the function to be used. In this example, it is ZBAPI_CREATECITY.

  9. In the Mapping table, click the cell in
    Type column and select table_input from the drop-down list for each
    row.

    Enter the structure table name in the cell of the TableName(StructureName) column for each row.

    Enter the parameter name in the cell of the ParameterName column for each row.

Retrieving the data from the SAP table

  1. Double-click tSAPTableInput to open its
    Basic settings view.

    components-tsaptableinput_s1_input.png
  2. Fill in the connection configuration fields with your SAP system
    connection details. For more information about the connection parameters,
    see tSAPTableInput Properties.

  3. In the Table field, enter the name of the
    table from which the data is retrieved. In this example, it is YTCITY.

  4. Click the […] button next to Edit schema to define the schema of the table in
    the schema editor.

    components-tsaptableinput_s1_inputschema.png

    Click the [+] button to add three
    columns, YTC_ID, YTC_NAME, and YTC_CITY,
    all of type String.

    Click OK to validate these changes and
    accept the propagation prompted by the pop-up dialog box.

  5. In the Filter field, enter the filter
    condition YTC_CITY = ‘Paris’ to retrieve
    rows with the YTC_CITY column value set
    to Paris.

  6. Double-click tLogRow to open its
    Basic settings view.

    components-tsaptableinput_s1_output.png
  7. In the Mode area, select Table (print values in cells of a table) for a
    better display of the output data.

Saving and executing the Job

  1. Press Ctrl + S to save the Job.

  2. Press F6 to run the Job.

    components-tsaptableinput_s1_result.png

    As shown above, the rows with the YTC_CITY column value set to Paris are displayed on the console.


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