SAP DDIC GTT ABEXA



Get Example source ABAP code based on a different SAP table
  


VX_EXA_ONLY

ABAP_DDIC - Global Temporary Tables, Access
This example demonstrates how global temporary tables in ABAP Dictionary are accessed.

ABAP_SOURCE_CODE
DEMO CL_DEMO_GTT

ABAP_DESCRIPTION
AB_SQL and Native SQL are used to access a global temporary table (GTT) DEMO_GTT:
After the GTT is filled using the AB-SQL statement INSERT, the table is cleared again using the AB-SQL statement DELETE FROM without a WHERE condition. If the DELETE statement is not executed, the statement WAIT UP TO, which performs an implicit database commit, produces the runtime error COMMIT_GTT_ERROR, which can be found in the ABAP dump analysis (ST22).
After the GTT has been filled using a static native INSERT statement between EXEC SQL - ENDEXEC, the table is not cleared explicitly. Instead, it is cleared in most database platforms using an implicit database commit raised by the statement WAIT UP TO .



Latest notes:

This example uses Native SQL to fill the GTT for demonstration purposes only. Only AB_SQL should be used to access GTTs.
ABAP_HINT_END