Ansicht
Dokumentation

ABENOO_OBS_OCCURS_1 - OO OBS OCCURS 1

ABENOO_OBS_OCCURS_1 - OO OBS OCCURS 1

Fill RESBD Structure from EBP Component Structure   ROGBILLS - Synchronize billing plans  
This documentation is copyright by SAP AG.
SAP E-Book

Cannot Use OCCURS with Declarative Statements

In ABAP Objects, you cannot define internal tables using the OCCURS addition in the TYPES or DATA statements (or any other declarative statement).

In ABAP Objects, the following statements cause an error message:

DATA: BEGIN OF itab OCCURS n,
  ...
  fi ...,
  ...
END OF itab.

and

TYPES|DATA itab TYPE|LIKE line_type OCCURS n.

Correct syntax:

TYPES|DATA: BEGIN OF line_type,
  ...
  fi ...,
  ...
END OF line_type.

TYPES itab TYPE|LIKE STANDARD TABLE OF line_type
                     WITH NON-UNIQUE DEFAULT KEY
                     [INITIAL SIZE n].

DATA itab TYPE|LIKE [STANDARD] TABLE OF line_type
                    [INITIAL SIZE n].

Cause:

TYPE|LIKE TABLE OF, the new addition for the DATA and TYPES statements, makes the OCCURS addition superfluous in table declarations. If necessary, you can define the initial main memory requirement using the INITIAL SIZE addition.

Note:

The system automatically updates the short form

DATA itab TYPE|LIKE TABLE of line_type.

to

DATA itab TYPE|LIKE STANDARD TABLE OF line_type
                    WITH NON-UNIQUE DEFAULT KEY
                    INITIAL SIZE 0.

so that you can use the former.

The system automatically updates the short form

TYPES itab TYPE|LIKE STANDARD TABLE of line_type.

to

TYPES itab TYPE|LIKE STANDARD TABLE of line_type
                     INITIAL SIZE 0.

and defines a standard table type with a generic key that can be used to type interface parameters and field symbols.






Addresses (Business Address Services)   SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up  
This documentation is copyright by SAP AG.

Length: 2907 Date: 20240426 Time: 031142     sap01-206 ( 26 ms )