Get Example source ABAP code based on a different SAP table
DATA - BEGIN OF OCCURS
Short Reference >
• OCCURS DATA BEGIN OF - obsolete
ABAP Syntax(Obsolete)DATA BEGIN OF itab OCCURS n.> ...> DATA END OF itab [VALID BETWEEN intlim1 AND intlim2].>
ABAP Addition ... VALID BETWEEN intlim1 AND intlim2>
What does it do?This variant of the statement list introduced usingDATA BEGIN OF>> (which is forbidden in classes) declares an internal table itab> as a standard table> with a structured row type and a header line>. The declarations between the statements DATA BEGIN OF> and DATA END OF> define the components of the row type> of itab>, just as in the regular variant of DATA BEGIN OF>>. The data object n>, which has to be specified either directly as a numeric literal or as a numeric constant, determines the initial memory requirement.
Latest notes:The statement list above is the original form of the declarations of internal tables. Internal tables declared in this way have always been tables in the real sense, meaning that the rows are mainly constructed from individual columns. The following statement list replaces the above statements (with the exception of the addition VALID BETWEEN>); here the role of the header line is adopted by the work area wa>: DATA BEGIN OF wa. ... DATA END OF wa. DATA itab LIKE TABLE OF wa.> The last statement is an abbreviated form of the complete declaration> of itab>, where the table type and key are supplemented with standard values. The creation of the header line> cannot be disabled in this variant. Since header lines in internal tables should never be used, however, this way of declaring internal tables should never be encountered again.
• VALID BETWEEN DATA END OF - obsolete
What does it do?The VALID BETWEEN> addition of the DATA END OF > statement is only important if the internal table is to be processed using the obsolete form of the statement PROVIDE>>. intlim1> and intlim2> expect columns from the internal table of the data type d>, i>, n>, or t >. These columns are used implicitly as interval limits in their obsolete form of the statement PROVIDE>.