About this task
This section shows you how to retrieve an SAP function and the schema describing the input and output data of the function using the SAP metadata wizard.
In the Repository tree view, right-click the
newly created SAP connection and select Retrieve
Bapi from the contextual menu. The SAP function wizard opens
- In the Name Filter field, enter the filter condition for the function name if needed. To use the custom function Z_TALEND_READ_TABLE, you need to install an SAP module provided under the directory <Talend_Studio>\plugins\org.talend.libraries.sap_<version>\resources. For how to install the SAP module, see the file readme.txt under the directory.
Click Search. All SAP functions that meet the
filter condition will be listed in the Functions area.
Note: z-BAPI or customized BAPI are also supported in Talend Studio.
- Double-click the name of the function of interest in the Functions area. The input and output parameters will be displayed in the Parameter tab.
Click the Test-it view to test the
recuperation of the SAP data.
Click the Value cell for the corresponding input
parameter that needs an input value, and then click the
[...] button in the cell and enter the value in the
pop-up Setup input parameter dialog box. When done, click
OK to validate and save the settings.
Click Run to get the values of the output
parameters returned by the function in the Output
Click Next to proceed to the next
Select the input and output schemas of interest and click
Finish. The function and its schemas of interest will
be saved in the SAP Bapi folder under your SAP connection
node in the Repository tree view. You can now drag and
drop any function node onto your Job design workspace as a
tSAPBapi component, with all metadata information
If you need to further edit the metadata of a function, right-click the function and select Edit Bapi from the contextual menu to open this wizard again and make your modifications.
You can also retrieve the input and output schemas as XML metadata in either of
the following ways:
The selected schema will be saved under the File xml node in the Repository tree view. For the usage of the XML metadata, see the section about retrieving data from an SAP system by calling a BAPI function using document type parameters at SAP.
Select the Import schema as xml metadata check box and the input and output schemas of interest.
Right-click the name of the function that you have just retrieved under the SAP Bapi folder and select Retrieve As Xml Metadata from the contextual menu.