SAP HCI-DS (HANA Cloud Integration for data services) Extract Data from SAP/ECC system using Custom ABAP
HANA Cloud Integration for Data services can read data from various information systems including SAP ECC & BW, using Datastores configuration which represent connection configurations between the software/databases or applications with HCI. Datastore configurations allow access to metadata as well read (write) data access from SAP ECC .
Other commonly used applications in DataStores are Flat File system ,Web services & HCI supports several other databases & applications.
Data Extraction from SAP ERP ECC system can be achieved by using ECC Tables , SAP Data Extractors and Functions.
“ABAP query” and “ABAP aggregation” Transforms are most often used methods for extracting data from SAP ERP / ECC or any ABAP based application system .
Joins & Transforms on source Tables result in generation or creation of ABAP program. This ABAP program runs on the source SAP system and data filters and data projections and lookup selections happen in ABAP system. HCI relies on SAP RFC functions for handshakes of data exchange between run time execution of this ABAP Program and mapping it to the transform fields in the data flow task. SAP Data Extractors are based over standard BW Extractors , ideal for delta data loads if delta Q tables are set up in ECC system.
However there can be situations when extracting data from Standard Tables or Extractors may not easily meet requirements , instead a standard BAPI or SAP Function is available or some application logic needs to be maintained in ABAP system . Instead of putting any customized application logic in dataflows , we may use Standard SAP functions & application logic , insulating dataflow changes whenever underlying SAP system configuration changes or when any SAP system enhancement or upgrade is performed.
For all such cases or simply if you like ABAP, you may use Transform type “Custom ABAP” option which is available when defining the Data flow fora HCI Task.
You can create ABAP Program which can read data from SAP BAPI or from SAP Tables , save it to a text file. It also allows to use another alternative to HCI generated ABAP code, and an opportunity to improve generated code for any performance optimization needs. Example to read Plants in a custom ABAP is shared below.
Next create HCI Task in your project folder. Select & Identify the Source & Target Systems from the configured Data stores. In the Dataflow design definition choose Transform Type Custom ABAP and in the details section Type the path to the ABAP file on the server where the Data Services Agent is running. Create Output columns for the Transform Name with corresponding details for fields Name1, werks, regio & nodetype & this transform map table will be available as input to subsequent & final target query transform types.