SAP DECLARATION POSITIONS



Get Example source ABAP code based on a different SAP table
  



Declaration Positions
Declaration positions are write-only positions in which a declaration expression can be specified for an inline declaration. There are no declaration positions within expressions.
Declaration positions include the following:
Positions for the inline declaration of variables with DATA(var) and FINAL(var). These are the following write positions , where the operand type can be determined completely and where the content of the operand is not evaluated but completely overwritten.
Left side of an assignment with the assignment operator =
lhs = ...
Actual parameters for output parameters and return values of methods for standalone method calls:
meth( IMPORTING p1 = a1 p2 = a2...
RECEIVING r = a )
If a method call is located to the right side of an assignment or is part of an expression, these actual parameters are not declaration positions.
Target fields when catching an exception:
CATCH EXCEPTION INTO oref
CLEANUP INTO oref
Target fields in statements for string processing and byte string processing:
FIND ... MATCH COUNT mcnt
MATCH OFFSET moff
MATCH LENGTH mlen
RESULTS result_tab$|result_wa
SUBMATCHES s1 s2 ...

REPLACE ... REPLACEMENT COUNT rcnt
REPLACEMENT OFFSET moff
REPLACEMENT LENGTH mlen
RESULTS result_tab$|result_wa

CONCATENATE ... INTO result

SPLIT ... INTO result1 result2 ...
INTO TABLE result_tab

CONVERT TEXT ... INTO SORTABLE CODE hex

GET BIT ... INTO val.
Target fields in statements for time stamps:
CONVERT UTCLONG ... INTO DATE dat TIME tim DAYLIGHT SAVING TIME dst
CONVERT ... INTO UTCLONG time_stamp
GET TIME STAMP time_stamp
CONVERT TIME STAMP ... INTO DATE dat TIME tim DAYLIGHT SAVING TIME dst
CONVERT ... INTO TIME STAMP time_stamp
Target fields in statements for internal tables:
READ TABLE ... $[REFERENCE$] INTO dobj
LOOP AT ... $[REFERENCE$] INTO dobj
INSERT ... $[REFERENCE$] INTO dobj
COLLECT ... $[REFERENCE$] INTO dobj
APPEND ... $[REFERENCE$] INTO dobj
MODIFY ... $[REFERENCE$] INTO dobj
FIND ... IN TABLE MATCH COUNT mcnt
IN TABLE MATCH LINE mlin
IN TABLE MATCH OFFSET moff
IN TABLE MATCH LENGTH mlen
IN TABLE RESULTS result_tab$|result_wa
IN TABLE SUBMATCHES s1 s2 ...
REPLACE ... IN TABLE REPLACEMENT COUNT rcnt
IN TABLE REPLACEMENT LINE rlin
IN TABLE REPLACEMENT OFFSET moff
IN TABLE REPLACEMENT LENGTH mlen
IN TABLE RESULTS result_tab$|result_wa
Target fields of the AB-SQL statement SELECT:
SELECT ... INTO (elem1, elem2, ... )
SELECT ... INTO wa
SELECT ... INTO TABLE itab
Cursor field of the AB-SQL statement OPEN CURSOR:
OPEN CURSOR dbcur
Here, only DATA but not FINAL can be used.
Target fields of the statement DESCRIBE:
DESCRIBE FIELD ... TYPE typ $[COMPONENTS com$] LENGTH ilen DECIMALS dec
OUTPUT-LENGTH olen HELP-ID hlp EDIT MASK mask
DESCRIBE TABLE ... KIND knd LINES lin OCCURS n
DESCRIBE DISTANCE ... INTO dst
Target fields of various GET statements:
GET PARAMETER ... FIELD dobj
GET PF-STATUS status
GET REFERENCE INTO dref
GET RUN TIME FIELD rtime
GET TIME FIELD tim
BEGIN_SECTION VERSION 5 OUT
Work area in statement for dynpros:
LOOP AT SCREEN ... INTO wa
END_SECTION VERSION 5 OUT
Target field for message output:
MESSAGE ... INTO text
BEGIN_SECTION VERSION 5 OUT
Target fields in file interface statements:
READ DATASET ... LENGTH alen
GET DATASET ... POSITION pos ATTRIBUTES attr
END_SECTION VERSION 5 OUT
Target field for a serialization:
CALL TRANSFORMATION ... RESULT XML rxml
All write positions during program generation:
GENERATE SUBROUTINE POOL ... NAME prog error_handling
RAP response structures and internal tables typed with BDEF derived types:
MODIFY $[ENTITY$|ENTITIES$] ... $[ response_param$].
COMMIT ENTITIES ... $[response_param $].
GET PERMISSIONS ... $[response_param $].
READ $[ENTITY$|ENTITIES$] ... $[ response_param $].
SET LOCKS ... $[response_param$].
Positions for the inline declaration of field symbols with FIELD-SYMBOL(<(><)>). These are all places where a memory area can be assigned to a field symbol.
Field symbol in the statement ASSIGN:
ASSIGN... TO <(><)>
Field symbols in statements for internal tables:
READ TABLE ... ASSIGNING <(><)>
LOOP AT ... ASSIGNING <(><)>
INSERT ... ASSIGNING <(><)>
COLLECT ... ASSIGNING <(><)>
APPEND ... ASSIGNING <(><)>
MODIFY ... ASSIGNING <(><)>



Latest notes:

Unlike in standalone method calls, inline declarations cannot be specified as actual parameters for output parameters in a functional method call .
NON_V5_HINTS
ABAP_HINT_END

ABAP_EXAMPLE_VX5
Declaration expression DATA for the declaration of an internal table itab after the addition INTO TABLE of a SELECT statement.
ABEXA 00996
ABAP_EXAMPLE_END