Get Example source ABAP code based on a different SAP table
• PERCENTAGE MOVE (obsolete) • LEFT MOVE PERCENTAGE (obsolete) • RIGHT MOVE PERCENTAGE (obsolete)
MOVE>, PERCENTAGE> Short Reference >
ABAP_SYNTAX_OBS MOVE source TO destination PERCENTAGE perc $[LEFT$|RIGHT$].>
What does it do? This variant of the statement MOVE>> (also obsolete), which is not allowed in classes, assigns the substring of the data object source> that begins at the first position and whose length matches the percentage of the total length of source> specified in perc>, to the data object destination>. By default, and if LEFT> is specified, destination> is left-aligned; if RIGHT> is specified, it is right-aligned. The data type of the data objects source> and destination> must be character-like, otherwise the addition PERCENTAGE> is ignored. perc> expects a data object of type i>. If the value of perc> is less than or equal to 0, nothing is assigned. If the value of perc> is greater than or equal to 100, the entire content of source> is assigned.
Latest notes: If necessary, this variant of the statement MOVE> can be replaced by substring accesses> with dynamic offsets/lengths or by substring functions >. ABAP_HINT_END
ABAP_EXAMPLE_BAD MOVE c1 TO c2 PERCENTAGE n.> ABAP_EXAMPLE_END
ABAP_EXAMPLE_GOOD DATA l TYPE i.
DESCRIBE FIELD c1 LENGTH l. l = l * n / 100. MOVE c1(l) TO c2.> ABAP_EXAMPLE_END