# Retrieving data from an SAP system by calling a BAPI function using document type parameters

This scenario applies only to subscription-based Talend products.

This scenario describes a Job that retrieves data from a table named *SFLIGHT* in an SAP system by calling the BAPI function *RFC\_READ\_TABLE* with defined input and output parameters of type Document.

![](https://help.qlik.com/talend/en-US/components/8.0/Resources/images/components-tsapbapi_s2_job.png)

Prerequisites:

The SAP connection has been set up in the Repository tree view, with

* the *RFC\_READ\_TABLE* function retrieved and saved under the SAP Bapi folder of the SAP connection,

* and the XML metadata for the input and output schemas of the *RFC\_READ\_TABLE* function retrieved and saved under the File xml node.

For more information about how to set up an SAP connection and retrieve SAP functions and SAP function schemas as XML metadata, see [Managing metadata in Talend Studio](https://help.qlik.com/talend/r/en-US/8.0/studio-user-guide/managing-metadata-in-studio).

![](https://help.qlik.com/talend/en-US/components/8.0/Resources/images/components-tsapbapi_s2_prerequisites.png)

### In this section

* [Adding the components](https://help.qlik.com/talend/en-US/components/8.0/sap/tsapbapi-txmlmap-tlogrow-tfixedflowinput-adding-components-standard-component-enterprise-create)
* [Configuring the components](https://help.qlik.com/talend/en-US/components/8.0/sap/tsapbapi-txmlmap-tlogrow-tfixedflowinput-configuring-components-standard-component-enterprise)
* [Saving and executing the Job](https://help.qlik.com/talend/en-US/components/8.0/sap/tsapbapi-txmlmap-tlogrow-tfixedflowinput-saving-and-executing-job-standard-component-enterprise-press)

**Related reference**

* [tSAPBapi](https://help.qlik.com/talend/en-US/components/8.0/sap/tsapbapi "Extracts data from or loads data to an SAP server using multiple input/output parameters or the document type parameter.")

**Related information**

* [tLogRow](https://help.qlik.com/talend/en-US/components/8.0/logs-and-errors/tlogrow)
* [tFixedFlowInput](https://help.qlik.com/talend/en-US/components/8.0/tfixedflowinput/tfixedflowinput)
* [tXMLMap](https://help.qlik.com/talend/en-US/components/8.0/txmlmap/txmlmap)