‎2008 Jul 24 7:16 PM
Hi,
I have an Infoobject where we load 16 character long records like - AB12345678912001.
I have to transfer everything to a new Infoobject but not the first 13 character. Could you please let me know the best code with all the details...Sorry I am not an ABAPer.
Tahnks for you help.
‎2008 Jul 24 7:45 PM
Hi,
DATA:
BEGIN OF fs_tab ,
field TYPE char16,
END OF fs_tab,
fs_tab1 LIKE fs_tab,
itab LIKE STANDARD TABLE OF fs_tab,
jtab LIKE STANDARD TABLE OF fs_tab.
fs_tab-field = 'ABC23SCF45KKNS45'.
APPEND fs_tab TO itab.
fs_tab-field = 'XYC456SCF45KKNS4'.
APPEND fs_tab TO itab.
fs_tab-field = 'UT9BF23F45KKNS45'.
APPEND fs_tab TO itab.
LOOP AT itab INTO fs_tab.
MOVE fs_tab-field+13(3) TO fs_tab1-field.
APPEND fs_tab1 TO jtab.
ENDLOOP.
LOOP AT jtab INTO fs_tab1.
WRITE:/ fs_tab1-field.
ENDLOOP.
Hope this code will help you to resolve your problem.
Thanks,
Phani Diwakar.
‎2008 Jul 24 7:45 PM
Hi,
if f1 = 'AB12345678912001'.
then to get the last three characters:
ws_f1 = f1+13. "Chars from 14,15,16 will be copied to variable ws_f1.
regards,
Subramanian
‎2008 Jul 24 11:53 PM
Thanks for the quick reply , I solved it using a formula in the update rule.
Thanks much. Also assinged points as well.
‎2008 Jul 24 11:53 PM