cancel
Showing results for 
Search instead for 
Did you mean: 

sapscript

Former Member
0 Kudos

Hi experts,

I have a problem with my sapscript. I'm displaying on the form the customer address and document details. When I'm testing the form it gives me 51 pages but in my internal table I have only 50.

My logic was the following:

1. perform open_myform

2. perform write_myform

3. perform close_myform

in the write_myform I have a loop at my internal table

LOOP AT i_mytable.

PERFORM write_header.

PERFORM write_main.

ENDLOOP.

Accepted Solutions (1)

Accepted Solutions (1)

former_member196280
Active Contributor
0 Kudos

Did you see and blank page is getting displayed, if yes, try to delete empty spaces in your form, go and check each page some where customer data might overflowed to 2 pages, check any /:NEW-PAGE is called inside your script.

Regards,

Sairam

Former Member
0 Kudos

Hello Sai,

I have a /: NEW-PAGE in my form, but this is because I want to display each customer on a different page. So do you think it is only formatting problem? Only after the last page gives me another one, the other ones are correct. It displays me an address in the last page, which I don't need.

former_member196280
Active Contributor
0 Kudos

Handle the /:NEW-PAGE by placing a condition, it will solve your problem..

if your driver program is in your control then read the number of customers and SAPscript..

LOOP <internal table>

call function 'CONTROL_FORM'.

exporting

COMMAND = 'NEW-PAGE'.

endif.

***Write_FORM " main window etc.

ENDLOOP.

Close the thread once your question is answered.

Regards,

Sairam

Answers (1)

Answers (1)

Former Member
0 Kudos

Thanks Sai