‎2012 Jul 18 10:24 AM
Hi All,
In a Extra-field I've to put in an ABAP code to extract a string (first 10 characters) from another field.
Cuold anyone suggest me the abap code to extract a string?
Thanks
Moderator Message: Please do some research before posting
Message was edited by: Kesavadas Thekkillath
‎2012 Jul 18 10:36 AM
hi Rossi ,
if you have to extract first 10 character , then simply declare your target variable as of character 10 and assign it .
DATA:
d_string(50) TYPE c,
d_10(10) TYPE c .
move 'Hello world!!!!!!' to d_string.
d_10 = d_string.
WRITE d_10.
regards,
Yogendra Bhaskar
‎2012 Jul 18 10:44 AM
lv_string1 = "HelloWorld22".
To extract the 1st 10 ...
lv_string2 = lv_string1+0(10).
This is fetch the 1st 10 chars... to lv_string2.