Tuesday, April 19, 2011

Manipulating Character Data in ABAP Programming

* Substrings with offsets
DATA  tmp(10)  VALUE  ‘ABCDEFGHIJ’.
DATA  tmp1(2).
WRITE:    tmp+3(7),
               tmp+1(4),
               tmp+0(8),
               tmp+7(3).
MOVE  tmp+4(2)  TO  tmp1.


output:

DEFGHIJ

BCDE
ABCDEFGH
HIJ

1 comment: