05-03-2007 9:55 AM
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.
05-03-2007 9:58 AM
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
05-03-2007 10:00 AM
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
05-03-2007 10:00 AM
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....
05-03-2007 10:04 AM
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
05-03-2007 10:07 AM
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
05-03-2007 10:13 AM
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.