# Retrieving data from SAP tables using a dynamic schema

This scenario describes a Job that retrieves and joins data of specific records from two tables on an SAP server and displays the data on the console. The tSetDynamicSchema component in the scenario generates a schema from a schema definition file (a csv file); the tSAPTableInput component retrieves data from specific records of the two tables and passes the data to the tLogRow component. In this scenario, the ExtendedConfiguration field of the csv file specifies the two tables; the other fields of the csv file specify the data to retrieved; the condition in the Filter field of the tSAPTableInput component specifies the records to be processed; and the statement in the From statement field joins the retrieved data.

This scenario requires that RFC server is running on your machine and 8.0.1-R2022-04 Talend Studio Monthly update or a later one delivered by Talend is installed on your machine.

The following figure shows the Job. ![](https://help.qlik.com/talend/en-US/components/8.0/Resources/images/dynaschema_job.png)

The following lists the content of the schema definition file (dynaschema.csv in this example).

```
ExtendedConfiguration;Name;DbName;Type;DbType;Length;Precision;Nullable;Key
{"TableName":"VBRK"};MANDT;MANDT;id_String;STRING;3;0;false;false
{"TableName":"VBRK"};VBELN;VBELN;id_String;STRING;10;0;false;false
{"TableName":"VBRK"};FKART;FKART;id_String;STRING;4;0;false;false
{"TableName":"VBRK"};FKTYP;FKTYP;id_String;STRING;1;0;false;false
{"TableName":"VBRK"};VBTYP;VBTYP;id_String;STRING;1;0;false;false
{"TableName":"VBRK"};WAERK;WAERK;id_String;STRING;5;0;false;false
{"TableName":"VBRP"};POSNR;POSNR;id_Integer;INTEGER;6;0;false;false
{"TableName":"VBRP"};UEPOS;UEPOS;id_Integer;INTEGER;13;0;false;false
{"TableName":"VBRP"};FKIMG;FKIMG;id_BigDecimal;BIG_DECIMAL;3;0;false;false
{"TableName":"VBRP"};VRKME;VRKME;id_String;STRING;5;0;false;false
```

Information noteNote: For more information about the ExtendedConfiguration property, see [tSetDynamicSchema Standard properties](https://help.qlik.com/talend/r/en-US/8.0/components/dynamic-schema/tsetdynamicschema#tsetdynamicschema-standard-properties).

### In this section

* [Creating the Job](https://help.qlik.com/talend/en-US/components/8.0/sap/joining-two-tables-using-dynamic-schema-creating-job)
* [Setting up the Job](https://help.qlik.com/talend/en-US/components/8.0/sap/joining-two-tables-using-dynamic-schema-setting-up-job)
* [Executing the Job](https://help.qlik.com/talend/en-US/components/8.0/sap/joining-two-tables-using-dynamic-schema-executing-job)

**Related reference**

* [tSAPTableInput](https://help.qlik.com/talend/en-US/components/8.0/sap/tsaptableinput "Reads data from an SAP table on an SAP server.")

**Related information**

* [tSetDynamicSchema](https://help.qlik.com/talend/en-US/components/8.0/dynamic-schema/tsetdynamicschema)