Skip to Content
0
Former Member
Apr 10, 2012 at 11:00 AM

How to delete the Last blank page in an SAPSCRIPT?

164 Views

I have total 14 pages in sap script.The 14th page has only header windows and the main window is blank.I want to delete that page or make it invisible.Is it possible to do if so how to do it?i have used control_form(NEW-PAGE) IN driver program.so even after finishing with the loop at last new-page is triggered causing the blank page..

PERFORM open.

PERFORM start.

LOOP at LT_CONS INTO LS_CONS.

READ TABLE LT_VBAK INTO LS_VBAK with key VBELN = LS_CONS-VBELN.

at new VBELN.

perform write using 'HEADER' 'BODY' 'HEADER'." space 'SET' sy-subrc .

*flag = 1.

ENDAT.

IF COUNT = 0.

perform write using 'ITEM_DETAILS' 'BODY' 'MAIN'.

PERFORM break.

clear count.

else.

count = count + 1.

perform write using 'ITEM_DETAILS' 'BODY' 'MAIN'. " CARRY FORWARD .

endif.

at END OF VBELN.

ENDAT.

ENDLOOP.

PERFORM end.

PERFORM close.