# Support for SAP Business Suite or S/4 HANA

This ABAP-Transport contains code that consider higher security policies and therefor it requires additional customizing in SAP-System. 
Please a a look at <talend-help url> to find details for configuration.



## The transport archives for SAP-Systems are listed below:

- SAP ECC with Enhancement Package (EhP) 6 onwards
- SAP S/4 HANA 2019 onwards (still without functionality for CDS-Views)

Please also note the minimum system requirements, See help.talend.com "Supported systems, databases and business applications by Talend components"



## The installation transport:

- TEDK910386, contains all the ABAP-Coding required for Talend-SAP Components. 

Features included:

```
Table-Read, Read from SAP Application Table
Table-Join, Define and process a query consists of a join of SAP Application Tables, file-transfer
Table-Stream, Define and process a query consists of a join of SAP Application Tables, direct-transfer (Additional configuration and component Talend RFC-Server is needed, see <talend-help url>)
ODP, Fetch data from Datasource/Extractor with delta capabilities if it is available
```



## Deletion-Transport (optional):

- S4HK902699, To remove all the objects installed by TEDK910386.



## Usage, Steps for Installation

Extract the contents of the archive and copy the file within the data-folder as well as the file within the cofiles-folder to the location for the 
transport files on the SAP system (usr/sap/trans/{SID}/cofiles|data). For the copy task use transaction cg3z or ask an administrator, who has file system access on the SAP server 
instance. 

Then use the SAP transport management system (t-code stms) to add the files to the transport queue and perform the transport order.



## SAP Authorization

To connect to SAP System a user with proper authorizations must be created. 

More details can be found at help.talend.com: "Integration between SAP and Talend"
 
Sample for tSAPTableInput
- Auhorization Object: S_RFC
-- Field: RFC_TYPE 
-- Value: FUGR (=Function Group)
-- Field: RFC_NAME 
-- Value: /CMT/TLND_TABLE (=Name of the Function Group)
-- Field: ACTVT (=Operation allowed)
-- Value: 16 (=Execute)

- Auhorization Object: S_TABU_NAM
-- Field: ACTVT (=Operation allowed)
-- Value: 03 (=Read)
-- Field: TABLE
-- Value: ### (=Extact from Tables specified only) or * (=Extract from all Tables allowed) 



## Additional Information

Additional SAP Connection Parameter for Table-Read 

To force the use of the custom table-read Function Module, in the component or wizard, the property "api.use_z_talend_read_table" needs to be added and set to true. 
Otherwise the SAP standard module RFC_READ_TABLE is being used which might result in errors in case of larger tables or fields with decimal types. 

File based data extracts in background processing
The BAPI /CMT/TLND_TABLE_JOIN_BATCH is used with tELTSAPMap and runs a batch export as background job.
The export will create files under the given path with a file prefix e.g. "vbrk" will result in a file "vbrk_<guiid>_<fileNumber>.dat" e.g. "vbrk_01LToCKY7j{VXlykxkW8jW_0001.dat"

The batch export creates a start and a stop file, which indicates the job status as well as several *.dat files, containing the data. 

An example:
vbrk_01LToCKY7j{VXlykxkW8jW_start.stt
vbrk_01LToCKY7j{VXlykxkW8jW_0001.dat
vbrk_01LToCKY7j{VXlykxkW8jW_0002.dat
vbrk_01LToCKY7j{VXlykxkW8jW_0003.dat
vbrk_01LToCKY7j{VXlykxkW8jW_0004.dat
vbrk_01LToCKY7j{VXlykxkW8jW_end.end



## Miscellaneous

Via SAP GUI use following transactions:
- SM37: View background jobs of the RFC user
- AL11: View files of a specific directory e.g. /usr/sap/trans
- CG3Y: Download files by specifying the source file on the SAP application server and a local target file - use BIN to ensure the file is not truncated!



