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:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'. |