SAP VALUE CONSTRUCTOR PARAMS ITAB SAP Info
ARTICLE ( Version: 0057)
Syntax
Effect
If
like this, further parentheses can be added at the top level in the parentheses after
Note
Internal table rows are constructed in accordance with the rules for the
instance operator
Example
Constructs an internal table with an elementary row type and fills it
with three rows. The first row inserted is initial. TYPES t_itab TYPE TABLE OF i WITH NON-UNIQUE DEFAULT KEY.
DATA itab TYPE t_itab.
itab = VALUE #( ( ) ( 1 ) ( 2 ) ).
Example
Constructs an internal table with an elementary row type of type
string> and fills it with three rows. The result is a table that is given the previous day, current day, and next day formatted for the cur rent language environment. TYPES t_date_tab TYPE TABLE OF string.
DATA date_tab TYPE t_date_tab.
date_tab = VALUE #(
( |{ CONV d( sy-datlo - 1 ) DATE = ENVIRONMENT }| )
( |{ sy-datlo DATE = ENVIRONMENT }| )
( |{ CONV d( sy-datlo + 1 ) DATE = ENVIRONMENT }| ) ).
Example
Constructs an internal table with a structured row type and fills it
with two rows. The structures are filled with values component by component. TYPES: BEGIN OF t_struct,
col1 TYPE i,
col2 TYPE i,
END OF t_struct,
t_itab TYPE TABLE OF t_struct WITH NON-UNIQUE DEFAULT KEY.
DATA itab TYPE t_itab.
itab = VALUE #( ( col1 = 1 col2 = 2 )
( col1 = 3 col2 = 4 ) ).
Example
Constructs a
with four rows while using the
itab = VALUE #( sign = 'I' option = 'BT' ( low = 1 high = 10 )
( low = 21 high = 30 )
( low = 41 high = 50 )
option = 'GE' ( low = 61 ) ).
Example
Constructs an internal table with a tabular row type and fills it with
two rows. The first row is assigned a table that is already filled. The second row is constructed using
t_itab2 TYPE TABLE OF t_itab1 WITH NON-UNIQUE DEFAULT KEY.
DATA itab1 TYPE t_itab1.
DATA itab2 TYPE t_itab2.
itab1 = VALUE #( ( 1 ) ( 2 ) ( 3 ) ).
itab2 = VALUE #( ( itab1 )
( VALUE t_itab1( ( 4 ) ( 5 ) ( 6 ) ) ) ).
Example
See also the examples for the instance operator
ARTICLE ( Version: 0060)
Syntax
Effect
If
like this, further parentheses can be added at the top level in the parentheses after
Note
Internal table rows are constructed in accordance with the rules for the
instance operator
Example
Constructs an internal table with an elementary row type and fills it
with three rows. The first row inserted is initial. TYPES t_itab TYPE TABLE OF i WITH EMPTY KEY.
DATA itab TYPE t_itab.
itab = VALUE #( ( ) ( 1 ) ( 2 ) ).
Example
Constructs an internal table with an elementary row type of type
string> and fills it with three rows. The result is a table that is given the previous day, current day, and next day formatted for the cur rent language environment. TYPES t_date_tab TYPE TABLE OF string WITH EMPTY KEY.
DATA date_tab TYPE t_date_tab.
date_tab = VALUE #(
( |{ CONV d( sy-datlo - 1 ) DATE = ENVIRONMENT }| )
( |{ sy-datlo DATE = ENVIRONMENT }| )
( |{ CONV d( sy-datlo + 1 ) DATE = ENVIRONMENT }| ) ).
Example
Constructs an internal table with a structured row type and fills it
with two rows. The structures are filled with values component by component. TYPES: BEGIN OF t_struct,
col1 TYPE i,
col2 TYPE i,
END OF t_struct,
t_itab TYPE TABLE OF t_struct WITH EMPTY KEY.
DATA itab TYPE t_itab.
itab = VALUE #( ( col1 = 1 col2 = 2 )
( col1 = 3 col2 = 4 ) ).
Example
Constructs a
with four rows while using the
itab = VALUE #( sign = 'I' option = 'BT' ( low = 1 high = 10 )
( low = 21 high = 30 )
( low = 41 high = 50 )
option = 'GE' ( low = 61 ) ).
Example
Constructs an internal table with a tabular row type and fills it with
two rows. The first row is assigned a table that is already filled. The second row is constructed using
t_itab2 TYPE TABLE OF t_itab1 WITH EMPTY KEY.
DATA itab1 TYPE t_itab1.
DATA itab2 TYPE t_itab2.
itab1 = VALUE #( ( 1 ) ( 2 ) ( 3 ) ).
itab2 = VALUE #( ( itab1 )
( VALUE t_itab1( ( 4 ) ( 5 ) ( 6 ) ) ) ).
Example
See also the examples for the instance operator
Message text extract from SAP system. Copyright SAP SE.
Search for further information about these or an SAP related objects