ABAP OBSOLETE Statement: MOVE

It's time to talk about another obsolete statement that unfortunately still gets seen around.

It's the good old MOVE statement.

Syntax: MOVE "Source" TO "Destination".

It's an obsolete form of assignment back from the days when ABAP was more descriptive and English in nature than it is now. Also, the statement MOVE was created at a time when assignments were only made between individual data objects. This statement is not appropriate in a modern, expression-oriented ABAP program that exploits all options on the left and right sides of assignments.

Replacement Statement is assignment Operator('=').

 Below is a small example:

REPORT sy-repid.
DATA:
lv_string TYPE string.
START-OF-SELECTION.
"Using Move<- Obsolete
MOVE 'TEST' to lv_string.
" Using assignment Operator
lv_String = 'Test'.
view raw Move_=_ex.abap hosted with ❤ by GitHub

Popular posts from this blog

ABAP convert internal table to excel (.xlsx) format and Send email or download

ABAP read excel(.XLSX) file to internal table in ABAP using CL_FDT_XL_SPREADSHEET

Use CL_BCS library to send email with ABAP