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

Sar Script

Former Member
0 Likes
472

Hello friends,

I am working on scripts and am facing a problem.

I have a select-options in my print program for invoice number.

When i look only for one invoice number the script works just fine and I see the result on first page of the script. However when i use a range if invoice numbers I want to see every invoice detail in a different page, but i see all the results only on one page and in the header details its printing the last invoice number and the customer details.

Any suggestions.

Madhu.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
431

Hi Madhu,

Open the Form once 'OPEN_FORM' and loop at the internal table where you have the invoice details use 'START_FORM' , 'WRITE_FORM' and 'END_FORM' and close the loop. for this use 'CLOSE_FORM'. This should handle multiple invoice numbers and output them in diffrent pages.

Srini

3 REPLIES 3
Read only

Former Member
0 Likes
432

Hi Madhu,

Open the Form once 'OPEN_FORM' and loop at the internal table where you have the invoice details use 'START_FORM' , 'WRITE_FORM' and 'END_FORM' and close the loop. for this use 'CLOSE_FORM'. This should handle multiple invoice numbers and output them in diffrent pages.

Srini

Read only

Former Member
0 Likes
431

Hi,

After the start_form, use a loop...endloop and call the write_form inside this.

Before the endloop stmt. call CALL FUNCTION 'CONTROL_FORM'

EXPORTING

command = 'NEW-PAGE'

EXCEPTIONS

unopened = 1

unstarted = 2

OTHERS = 3.

to have the next invoice to be printed on a new page.

Regards

Subramanian

Read only

Former Member
0 Likes
431

Thanks for the suggestion.