# Support for SAP Business Warehouse, Non-HANA systems

This ABAP-Transport contains code in a standard variant without considering higher security policies. No further
configuration in SAP BW System is required (besides the set up of proper authorization objects for the user-account).  



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

- SAP Business Warehouse for Netweaver 7.3
- SAP Business Warehouse for Netweaver 7.4 onwards

Note, there are two different system-specific transport archive available:
- TBDK900183, for Netweaver 7.3
- TIDK900076, for Netweaver 7.4+

BW InfoObjects (optional)

To read from InfoObjects the usage of the standard Function Module RFC_READ_TABLE might be sufficient. But in case of errors the 
installation of the ERP-Transport is required to allow to use /CMT/TLND_TABlE to extract the data.

So, the transport for SAP Business Suite can be used for Business Warehouse as well if needed.


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



## The installation transport:

- TBDK900183 or TIDK900076, Which one to be used depends on system release of Business Warehouse.

Features included:

```
InfoCube  - Read from SAP BW InfoCube, direct-transfer or file-transfer
DataStore Object - Read from/write into SAP BW DataStore Object, read operation by direct-transfer or file-transfer
```



## 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 tSAPInfoCubeInput
- Auhorization Object: S_RFC
-- Field: RFC_TYPE 
-- Value: FUGR (=Function Group)
-- Field: RFC_NAME 
-- Value: Z_TLD_BI (=Name of the Function Group) for BW Netweaver 7.3 or Z_TLDBI74 for BW Netweaver 7.4+
-- Field: ACTVT (=Operation allowed)
-- Value: 16 (=Execute)

- Auhorization Object: S_RS_BIAUTH
-- Field: BIAUTH
-- Value: * or specific analytic priviledges

- Auhorization Object: S_RS_ICUBE
-- Field: RSINFOAREA
-- Value: * or specific InfoArea
-- Field: RSINFOCUBE
-- Value: * or specific InfoCube
-- Field: RSICUBEOBJ
-- Value: DATA, DEFINITION
-- Field: ACTVT (=Operation allowed)
-- Value: 03 (=Read)



## Additional Information

Additional SAP Connection Parameter for Table-Read (here to fetch data from InfoObjects and when the ERP-Transport was installed)

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 Z_TLD_BI_READ_INFOPROV_BATCH or Z_TLDBI74_READ_INFOPROV_BATCH is used with tSAPInfoCubeInput and runs a batch export 
as background job. The export will create files under the given path with a file prefix e.g. "ZICUBE" will result in a file 
"ZICUBE_<guiid>_<fileNumber>.dat" e.g. "ZICUBE_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:
ZICUBE_01LToCKY7j{VXlykxkW8jW_start.stt
ZICUBE_01LToCKY7j{VXlykxkW8jW_0001.dat
ZICUBE_01LToCKY7j{VXlykxkW8jW_0002.dat
ZICUBE_01LToCKY7j{VXlykxkW8jW_0003.dat
ZICUBE_01LToCKY7j{VXlykxkW8jW_0004.dat
ZICUBE_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!



