cancel
Showing results for 
Search instead for 
Did you mean: 

break a sentense

Former Member
0 Kudos

Hi all,

I want to break a text in sap script.

exp like.

sunday creditors - GR / IR CLEARING ACCOUNT

I WANT TO BREAK IT LIKE

SUNDAY CREDITORS

GR / IR CLEARING ACCOUNT

PLEASE HELP ME..

THANK YOU

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi ,

Use formatting options like

wa_tab-fld = 'sunday creditors - GR / IR CLEARING ACCOUNT '

this is the actual data

if you want to split this data in the following way

&wa_tab-fld+0(16)& - it will print first 20 characters from 1 character (sunday creditors )

&wa_tab-fld+16(30)& - it will print 30 characters from 16th character (GR / IR CLEARING ACCOUNT)

if you give loke this

&wa_tab-fld+16& - it will print from 16th character to end (GR / IR CLEARING ACCOUNT)

Let me know if any concerns.....

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Better you call a subroutine from the script

And use..SPLIT Function.

Like

v_string = 'sunday creditors - GR / IR CLEARING ACCOUNT '.

SPLIT v_string by '-' into table it_string.

You will get two rows in it_string which can be used to futther operation...

like ::: it_sting[0] = ''sunday creditors '.

it_string[1] = 'GR / IR CLEARING ACCOUNT'.

Thanks & Regards,

Former Member
0 Kudos

Hi,

If you wan to break the sentence at particular Length you can the FM FORMAT_TEXTLINES by specifying the Length in FORMATWIDTH exporting parameter.

Thanks & Regards,

Vamsi.

Former Member
0 Kudos

it is not working...