Get Example source ABAP code based on a different SAP table
ID DATA-COMMON • BEGIN OF COMMON PART DATA - obsolete • END OF COMMON PART DATA - obsolete
DATA>, COMMON PART> Short Reference >
ABAP_SYNTAX_OBS DATA BEGIN OF COMMON PART $[name$]. ... DATA ... ... DATA END OF COMMON PART $[name$].>
What does it do? This variant of the statement DATA> > with the additions BEGIN OF COMMON PART> and END OF COMMON PART> defines a global interface work area> that can be used jointly by the programs of a program group>. All data objects declared between these statements using DATA> are part of this common area>. The addition COMMON PART> can only be used in the global declaration part of an ABAP program. Multiple common data areas> can be declared in a program, but they cannot be nested. Every common data area must be given a unique name using the name> addition. The addition name> can be omitted only if there is just one common data area in a program. The following rules apply:
In all programs in a program group that declare common data areas with the same name, these areas must have identical layouts. Common data areas are hence viewed as structures whose structure fragment view> must be identical and whose deep components must be compatible (pairwise). If not, the runtime error LOAD_COMMON_PART_STRUCT> occurs.
In common data areas, no object reference variables> with the static type of program-local classes and interfaces, nor data reference variables> with the static type of program-local structured types, can be declared.
Latest notes:
The use of common data areas in otherwise independent programs is highly error-prone with regard to both their maintainability and their functions. Therefore, common data areas should no longer be used. The parameter interfaces of procedures> are available for exchanging data between programs.
Common data areas for different programs are generally declared in an