2012 Oct 16 9:01 AM
dear experts,
i am using fm : RKD_WORD_WRAP to break the texts.i have created one internal table for this. during debugging the table shows the
breaked text data. Now , problem is that . I want this text to show in my script output. so, what should i do.
in text editor what should i declare so, that i can get the output.should i pass the internal table here or something else?
plz help. plz suggest line by line.
2012 Oct 16 8:33 PM
hello,
you will create a element in SAPscript (/name). Then you will use this element in your driver program and loop at the internal table and call this element inside it.
Ex
Driver program
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'ENAME'.
SAPSCRIPT
/E ENAME
best regards,
swanand
dear experts,
i am using fm : RKD_WORD_WRAP to break the texts.i have created one internal table for this. during debugging the table shows the
breaked text data. Now , problem is that . I want this text to show in my script output. so, what should i do.
in text editor what should i declare so, that i can get the output.should i pass the internal table here or something else?
plz help. plz suggest line by line.
2012 Oct 16 5:46 PM
I don't work with SapScript, but the way I would do it in a SmartForm is loop the internal table into a work area, outputting the work area in each loop pass.
2012 Oct 16 8:33 PM
hello,
you will create a element in SAPscript (/name). Then you will use this element in your driver program and loop at the internal table and call this element inside it.
Ex
Driver program
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'ENAME'.
SAPSCRIPT
/E ENAME
best regards,
swanand
2012 Oct 17 6:27 AM
dear sir,
i have done this also. but data is not coming properly. suppose, i have four columns :
col1 col2 col3 col4
1 welcome to the sap world 12
23.
my data is showing like this : as shown above
sir i want to bring the text "sap world" just below " welcome to the " in same column .so that 12comes in col3 & 23 comes in col4.
in text editor i have assign like this :
* &wa-col1& &wa-col3& &wa-col4&
/E : text
&wa-col3&
here, i have defined seperate text element for this column.
and in driver program i have called one seperate write_form for this text element.
after doing this. data is coming like :
col1 col2 col3 col4
1 12 23
welcome to the
sap world.
means , it's coming below all line item's.it's not coming in the same row. at same position.
so, plz tell me where should i define this text element so, that data should come in the same row.
2012 Oct 17 2:48 PM
hello,
In SAPscripts you can define tabs so that the variables are placed at certain distance. Check this where you define the Paragraphs. Define tabs as you want to place the text.
Define the element 1 as follows
/E ,,&wa-col1& ,,&wa-col2& ,,&wa-col3& ,,&wa-col4&
element 2 as
,,,,&var&
Define 4 tabs as shown above (,, represents a single tab)
You need to assign wa_col2 some text of the total text that you in you case "welcome to the" may be in this case it is 15 and the total string length is 30. So you assign remaining 15 to field var. Place var at second tab as shown above(see I have puy two tabs there). This way it will come under the column two.
Let me know if you have any further doubts.
best regards,
swanand