Monday, December 3, 2018

BW/4HANA: Custom ABAP code in transformations

In BW/4HANA there are some changes with respect to a usage of ABAP code in transformations. In classic BW there are areas called "1st and 2nd global declarations" (*$*$ begin of global ... *$*$ end of global) available where to place ABAP routines. Normally we can use both of the global declaration areas in the classic BW. It only makes a difference in case that the ABAP code shall be able to be reached globally in the transformation we go for 1st global area. The 2nd one is originally used for the transformations which are migrated from an update or transfer rules.

In the BW/4HANA only the first global area is respected. The 2nd global area is not supported by the BW/4HANA – it no longer exists. In reality there is just one global area – called global part but the global part is not supposed to be used, it is optional. All custom code shall be placed in the local part of the routine. The ABAP routine is a methods of a local ABAP class that consist of a predefined definition and an implementation area.

For existing transformations this also means that the transformation that uses 2nd global area won’t be displayed in the Eclipse - in the BW Modeling tools. SAP GUI will be opened instead. Then a manual migration needs to happed in the SAP GUI and code from 2nd global area must be moved to 1st global area in order to migrate such transformation to the BW/4HANA.

Another point is that existing custom ABAP code that shall in BW/4HANA must be ABAP OO compatible. Means statements that are non-compatible with ABAP OO coding needs to be removed and the code must be refactored to be the ABAP OO correct. Examples of non-compatible things can be: obsolete statements used in the code like internal tables with header, includes, etc. Again such transformations will be opened in SAP GUI to make required changes.

No need to mention that all this is only valid in case the transformation is being executed by ABAP runtime. This is to be selected in Runtime Properties of the transformation. Of course there can be routines in SAP HANA SQLScript in case the transformation is being executed by SAP HANA runtime.

More information:
2654109 - Conversion of ABAP/AMDP routines/exits in SAP BW/4HANA to the processing in Eclipse
2639435 - Transformations are opened in SAP GUI instead of in Eclipse
2462639 - BW4SL - Interfaces and Customer-Specific ABAP Development
ABAP Routines in Transformations

No comments: