cancel
Showing results for 
Search instead for 
Did you mean: 

Sap script display

Former Member
0 Kudos

I have made a script .I have 4 line items.I am displaying 1 line item details on 1 page.So total 4 pages are displayed.

But my 5 pages are getting displayed i.e the last page is blank.

I am using New-page command for displaying the data.

how to remove that last blank page in sap script.

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member196280
Active Contributor
0 Kudos

If you know the line items in advance then it can solve your problem.

In your driver program. Find number of line item available in internal table( place it in tot_line).

Coming back to form. If tot_line NE &page&

NEW-PAGE.

ENDIF.

Reward points to all useful answers.

Regards,

SaiRam

Former Member
0 Kudos

Hi

In the program

read the total items in the internal Table

DATA : V_LINES TYPE I.

DESCRIBE TABLE ITAB LINES V_LINES.

and keep the condition such that

IF &SAPSCRIPT-FORMPAGES& LE V_LINES.

NEW=PAGE.

ENDIF.

put this logic where you are triggering the NEW-PAGE command and see.

&SAPSCRIPT-FORMPAGES field will have value 4 (total pages)

and V_LINES = 4 (since 4 trecords are there in Script ITAB)

so it will trigger only 4 pages

<b>Reward points for useful Answers</b>

Regards

Anji