cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple line printing in SAPscript

Former Member
0 Kudos

Hello Friends,

I have problem in printing multiple lines on sap script. I have created a window. and i have creted a text eliment 'MULTIPLE it. Under this Text eliment i have code as below.

/E MULTIPLE

AS & internalTABLE-FIELD&

/

I have fetched data into TABLE in the driver program.

I looped at the table and and called the WRITE_form FM specifying the Element and Window.

In the ourput i am seeng only the last entry in the internal table, not all the entries.

Please advice.

Thanks,

Mohammed.

Accepted Solutions (0)

Answers (6)

Answers (6)

Former Member
0 Kudos

Hi,

I would suggest you to place a debugger in your driver program and also acivate the debugger in the scipt. Check the flow of your driver program and also the script. You would be able to find the problem. If u ever face a problem with a script, its always better to debug it. It is so much more easier.

Nayan

Former Member
0 Kudos

Hi Mohammed,

Check the size of the window. Probably the data is not sufficient. Increase the size of the Main window.

Regards,

Swapna.

bpawanchand
Active Contributor
0 Kudos

Hi

I hope you passing the entire internal table instead of that you loop to the WRITE_FORM for example

LOOP AT itab INTO Wa.

WRITE_FORM

EXPORTING

ELEMENT = 'WA'.

ENDLOOP.

in the driver program

Regards

Pavan

former_member585060
Active Contributor
0 Kudos

Hi,

Try to use MAIN window if u want to print multiple line items.

Regards,

Krishna

Former Member
0 Kudos

Hi,

Check once.........

By using the SELECT statement we fetch the required data into itab.

Then we have to loop the itab and in betn

loop and end loop write the write_form statement .

Regards

Krishna.

Former Member
0 Kudos

Hello,

This clearly implies that the write_form is getting called at the end of the loop.

Please check the loop and the write_Form logic. Check if you have called the correct window and the text element 'MULTIPLE' as well.

Thanks,

Sushil Joshi