
ABAP
Use
ABAP.
The ABAP command introduces a block of ABAP statements. The block must end with ENDABAP. ABAP statements within an ABAP...ENDABAP block are called inline ABAP. Only ABAP statements are permitted within the block. No other statements are permitted on the same line as this command.
You can reference local variables from within an ABAP...ENDABAP block. If you want to pass values from inline ABAP to import or export parameters, do it through local variables.
You can have more than one inline ABAP block in a test script. Data declared in one inline ABAP block are not visible in the other inline ABAP blocks.
The inline ABAP is executed in the system to which the test script is allocated at runtime.
The contents of an inline ABAP block are not checked by the eCATT syntax checker.
Example
In this example, inline ABAP is used to read a record from a table and assign a value to an eCATT-defined parameter (CARRIER_ID).
ABAP.
TABLES spfli.
DATA wa_spfli TYPE spfli.
SELECT SINGLE * FROM spfli INTO wa_spfli.
CARRIER_ID = wa_spfli-carrid.
ENDABAP.
LOG ( CARRIER_ID ).