Ansicht
Dokumentation

ABENTABLES_PARAMETERS_RESTRICTIONS - TABLES PARAMETERS RESTRICTIONS

ABENTABLES_PARAMETERS_RESTRICTIONS - TABLES PARAMETERS RESTRICTIONS

SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up   SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up  
This documentation is copyright by SAP AG.
SAP E-Book

Exceptions when Accessing TABLES Parameters

In some variants of statements, which use a work area to access internal tables, the work area must be compatible with the line type of the internal table. This is checked statically by the syntax check.

In the case of TABLES parameters typed using the obsolete addition STRUCTURE, the compatibility of the work area with the type specified in STRUCTURE is checked. The header line that always exists for TABLES parameters also has this type.

If a TABLES parameter is typed using STRUCTURE it can also be bound to actual parameters whose line type is longer than the type of the TABLES parameter and that are therefore incompatible with a work area recognized as correct by the syntax check. This causes problems if the components of the TABLES parameter are accessed dynamically within the procedure, since the data type of the actual parameter is evaluated at runtime. Therefore, memory limits can be violated by statements accessing a work area that references the type specified using STRUCTURE. This is why the following accesses produce the runtime error ITAB_STRUC_ACCESS_VIOLATION:

  • The following statements are terminated when the component specified in name is used to access a memory area after wa.

  • The following statements are terminated when wa is shorter than the line type:

This exception can occur particularly if the header line is used as an implicit work area. An explicit work area with the type of the actual parameter should be used to avoid this runtime error.






BAL_S_LOG - Application Log: Log header data   ABAP Short Reference  
This documentation is copyright by SAP AG.

Length: 3251 Date: 20240328 Time: 130308     sap01-206 ( 54 ms )