Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

text in script

Former Member
0 Kudos

hi friends, can any body tell me how to split standard text in sap-script. suppose i am having text like,

'ABAP10101344 NEEDS TO UPDATED'

Now i want to split it into two like

'ABAP10101344

NEEDS TO UPDATED'

with out effecting the other below text.

Kumar.

6 REPLIES 6

Former Member
0 Kudos

hi Kumar,

Use split statement ..

data : v_test(50) type c value  'ABAP10101344 NEEDS TO UPDATED'.
 
 split v_test at ' ' into var1 var2.

Regards,

Santosh

Former Member
0 Kudos

Hi

If it is a single Standard text which is maintained in SO10 tcode.

use the fun module READ_TEXT in the program and get it

and split it into two strings by doing offset of the Text and

use those two separate strings in the Scripts.

Without program if you wants to use, then write the two Texts in SO10 separately as STXT1 and STX2 and put them in scripts with

/: INCLUDE <text Name> ID <id> Lang<name> Paragraph <name>

Reward points if useful

Regards

Anji

Former Member
0 Kudos

That is not possible.

What you can do is.... devide the text into two standard texts and use. for both the applications.

For the new requirement use a paragraph format. where as the previous one try out with character formats so that both the texts come as concatenated....

Former Member
0 Kudos

Hi Kumar,

if first part always having same length then,

<b>transfer this text to variable.</b>

w_var = 'ABAP10101344 NEEDS TO UPDATED'

at first line put like this,

w_var+0(13)

at second line put like this,

w_var+13(99)

here instead of 99, give the remaining length of the string.

Thanks & regards,

Raghu

sreeramkumar_madisetty
Active Contributor
0 Kudos

Hi

spliting of standard text is not possible in scripts i hope.

Instead u can take 2 standard texts which fufill ur requirement.

Regards,

Sreeram

Former Member
0 Kudos

well there might be a way.

if you can display that value in another window (which has to be created first).

My idea would be to create a new window on that form of yours.

Place that window at the location where your Standard-text should be shown.

Now the clou, set the width of your new window to a value where your standard text has to make up a new line.

BEWARE, i never tested that, it´s just an idea, but it COULD work.