SAP NEWS-757-ASSIGNMENTS



Get Example source ABAP code based on a different SAP table
  



Assignments in ABAP Release 7.57
ITOC

ABAP_MODIFICATION_NN New Dynamic Component Specification in ASSIGN

Components of structures can be assigned to field symbols with the new ABAP Alternative 1@1@> struc-(comp) that largely replaces the variant ASSIGN COMPONENT OF.

ABAP_MODIFICATION_NN New Addition ELSE UNASSIGN

The new addition ELSE UNASSIGN can be specified for the following variants of the statement ASSIGN:
dynamic assignments
assignments of dynamic components
dynamic access
ABAP Alternative 3@3@>assignment of a table expression
It can be also specified with the addition ASSIGNING of the following internal table statements:
ABAP Alternative 2@2@>READ TABLE
LOOP AT itab
INSERT
MODIFY
All these statements have set sy-subrc. If an assignment is not successful, sy-subrc is set to the value 4 or sometimes 8. If the addition ELSE UNASSIGN is specified, the state of the field symbol is set to unassigned in that case. The field symbol is assigned only if the assignment is successful. If ELSE UNASSIGN is not specified, the field symbol keeps its previous state, which was the only behavior up to now. Using ELSE UNASSIGN introduces the same behavior as for the static variant to the above variants. In another way around, one can say that the static variant uses ELSE UNASSIGN implicitly.