sapdev logo background
sapdev logo sapdev logo
Comments

ABAP SHIFT DIRECTION Statement syntax, information and example SAP source code



Return to Statement index



SHIFT - direction

Short Reference

ABAP Syntax ... [LEFT|RIGHT] [CIRCULAR].

ABAP_ADDITIONS:
1 ... LEFT|RIGHT
2 ... CIRCULAR

ABAP_ADDITION_1 ... LEFT|RIGHT

What does it do? The shift direction is defined for left or right using LEFT or RIGHT . If none of the additions is specified,
LEFT is used implicitly. If the data object dobj is a string and the addition CIRCULAR is not specified, it is shortened - on shifting - to the left by the positions moved and lenghtened accordingly if shifted to the right.

ABAP_ADDITION_2 ... CIRCULAR

What does it do? Using the addition CIRCULAR , the contents shifted from the data object, to the left or to the right, are inserted again in the positions that become available on the opposite side. If the addition CIRCULAR is specified, data objects of the type
string or xstring are not shortened or lengthened; instead, they are treated as data objects of fixed length.

Example ABAP Coding This example varies the second example under places . Using the addition CIRCULAR
, the result becomes "you know I know".
DATA text TYPE string VALUE `I know you know `.

SHIFT text UP TO 'you' LEFT CIRCULAR.
Documentation extract taken from SAP system, � Copyright SAP AG. All rights reserved




SHIFT_DELETING
SHIFT_PLACES




comments powered by Disqus