Ansicht
Dokumentation

ABENOO_OBS_ASSIGN_LOCAL_2 - OO OBS ASSIGN LOCAL 2

ABENOO_OBS_ASSIGN_LOCAL_2 - OO OBS ASSIGN LOCAL 2

General Data in Customer Master   CL_GUI_FRONTEND_SERVICES - Frontend Services  
This documentation is copyright by SAP AG.
SAP E-Book

No local copies usingASSIGN

In ABAP Objects it is not possible to use field symbols in procedures to work with copies of other data.

Error message in ABAP Objects if the following syntax is used:

ASSIGN LOCAL COPY OF INITIAL f TO <fs>.

ASSIGN LOCAL COPY OF f TO <fs>.

Correct syntax:

DATA dref TYPE REF TO data.
CREATE DATA dref LIKE f.
ASSIGN dref->* TO <fs>.

DATA dref TYPE REF TO data.
CREATE DATA dref LIKE f.
ASSIGN dref->* TO <fs>.
<fs> = f.

Reason:

Due to the introduction of the general data references concept, the addition LOCAL COPY of the statement ASSIGN is obsolete. The value of f can be copied using the assigment <fs> = f after ASSIGN.






ABAP Short Reference   Addresses (Business Address Services)  
This documentation is copyright by SAP AG.

Length: 1127 Date: 20240328 Time: 172645     sap01-206 ( 19 ms )