cancel
Showing results for 
Search instead for 
Did you mean: 

IMP : Printing line-items : How to repeat the printing ?

Former Member
0 Kudos

Hi all,

I am prinitng a check (SAPSCRIPT) that is similar to the standard check F110_PRENUM_CHCK.

However, in my MAIN window I need to print each line item twice.

For example :

-


LINE ITEM 1 DETAILS

LINE ITEM 2 DETAILS

LINE ITEM 3 DETAILS

...........some text in a paragraph of 3-4 lines

then....again the line item details as below

LINE ITEM 1 DETAILS

LINE ITEM 2 DETAILS

LINE ITEM 3 DETAILS

-


But the MAIN window is having a text element (element 525) for printing these line items and it prints them one by one.If I print the 1st line item below,it prints but then the control does not go back to to the top where the 2nd line item should be printed.....and hence the problem.

How to acheive this in the script, as I am not able to do any changes in the SAP Standard program that calls the script ? Is there a way to put the control back to where the 2nd line itme should be printed once the 1st line item is printed twice ?

Any hints are greatly appreciated.

Thanks a lot,

Sandip.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

In scripts, MAIN window will be continues in all pages. So, the technique you are following is not recommended and you could not control the flow if you come across more lines, say 50.

Always print the data sequentially, means first print all the line items once by iterating the item table by calling element, say 525 Then proceed with other data which to be followed. Then again call back the same text element you used before (element 525) and iterate the item table again to print the lines.

Regards,

Prasanth

Former Member
0 Kudos

But i cannot alter anything in th driver program as its a standard one.

Former Member
0 Kudos

you have to copy the standard driver program to your own namespace and put the changes in there.

this is done everywhere and you only have to change the programname in the customizing part.

change the name back and you have your standard output again. so it's easy to make changes and check if it is still going the "standard" way.

If they don't let you copy the standard program then they get no changes because in SapScript your driverprogram triggers the output that must be printed. most of the time both driver-program and sapscript must be changed (i.e. copied and then changes are made in the copied version).

there is nothing wrong with that. only some customizing for the correct names.

Regards,

Guido