SAP METHOD CALL FROM ST ABEXA



Get Example source ABAP code based on a different SAP table
  



ABAP_ST - Method Call
This example demonstrates the call of a static method from a Simple Transformation.

ABAP_SOURCE_CODE
DEMO CL_DEMO_CALL_FROM_ST

ABAP_DESCRIPTION
The method MAIN of the global class CL_DEMO_CALL_FROM_ST calls an ST program DEMO_ST_WITH_METHOD_CALL and passes the static attributes SCARR_TAB and SPFLI_TAB of this class to the identically named data roots of the transformation. The table SCARR_TAB is filled and SPFLI_TAB is passed empty. The ST program is as follows:
TRNS DEMO_ST_WITH_METHOD_CALL
In a serialization in a tt:loop loop, the data root SCARR_TAB is used to call the static method GET_FLIGHTS of the global class CL_DEMO_CALL_FROM_ST. This passes the component carrid of the internal table scarr_tab to the input parameter of the method. In the method, spfli_tab is filled in a different way in each loop pass in accordance with the passed parameters.