Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

how to trim a string

Hi,

I have a problem where in I have to trim the characters from the second name.e.g.Manish Kumar should be trimmed to Manish K.

Regards,

Manish

Tags:
replied

hi Manish ,

See pseudo code

DATA name(50) TYPE c VALUE 'manish kumar'.

DATA : BEGIN OF itab OCCURS 0,
       a(50),
       b(50),
       END OF itab.

SPLIT name AT space INTO itab-a
                         itab-b.

CONCATENATE itab-a itab-b+0(1) INTO name separated by space.

write name.

Regards

0 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question