AMDP Script
AMDP Script
For custom transformations to be pushed down to SAP HANA database, start, end
and expert routine type need to be created as AMDP script (ABAP Managed
Database Procedure script).
In this blog, I will provide an overview on: Creating AMDP based transformations,
how to benchmark it against traditional ABAP routines and discuss its limitations.
How to create an AMDP script based transformation?
Step 1: Create an aDSO (Advanced Data Store Object) with activate data and write
change log as shown below in SAP BW Modeling tool (BWMT) in Eclipse.
Step 2: Create transformation between aDSO and data source.
Step 3: Create expert routine from Edit Menu -> Routine -> Expert Routine
Step 4: Pop-up will ask for confirmation to replace standard transformation with
expert routine. Click on the “Yes” button
Step 5: An AMDP Class will be generated with default method – PROCEDURE and
with default interface – IF_AMDP_MARKER_HDB
Step 6: Open ABAP development tools in Eclipse with BW4HANA system in ABAP
perspective to change the HANA SQL script
Features – AMDP Script vs ABAP Routine
Following are list of features available in AMDP script (ABAP Managed Database
Procedure script) compared to ABAP based transformation.
AMDP
Features ABAP routine
script
Listed below are some of points that need to be taken into consideration during
AMDP script based transformation:
Null values are allowed, so default initial values must be filled depend upon the
data type in script
Allow all special characters will cause failure of data load and activation
Derivation of time characteristics with time distribution is not supported by system
default, need to handle them in script
Fields must be filled using internal value representation
Data type of source and target should match, if not casting or conversion should be
carried out
Limitations:
All the BW transformations cannot be pushed down to SAP HANA using this
approach. Certain situations prevent transformation logic execution pushdown to
SAP HANA database. For example:
Queries as InfoProviders are not supported as the source
Rule groups are not supported
Customer-Defined Functions in the Formula Editor
To read data from Data Store objects, the entire key must be provided
Near-line connections are not supported
Note:
This Blog was written based on features in SAP BW4HANA support package level
01. It may change in upcoming releases and support packages of SAP BW4HANA.