Application Development and Automation 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: 
Read only

problem in passing breaked-text to scripts column

santosh_kumar94
Participant
0 Likes
740

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.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
711

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.

4 REPLIES 4
Read only

alex_campbell
Contributor
0 Likes
711

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.

Read only

Former Member
0 Likes
712

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

Read only

0 Likes
711

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.

Read only

0 Likes
711

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