Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

PROTECT-ENDPROTECT problem in SAP Script

In SAP Script MAIN Window I have 10 different elements to print differet stuff related with each delivery line item.

Like Material Number

Material Description

Long text [Has formatted text and I am reading that text and printed in some format some lines under material number and some under materail desc.]

and other information required by client.

Loop at Delivery item table.

CALL FUNCTION 'CONTROL_FORM'

EXPORTING

command = 'PROTECT'.

Print differnt elements.

Loop at lond text internal table.

print in proper format as I mentioned.

endloop.

CALL FUNCTION 'CONTROL_FORM'

EXPORTING

command = 'ENDPROTECT'.

ENDLOOP.

My problem is PROTECT ENDPROTECT is not working properly.

It is printing only 1 item with other info on first page as there are enough space left to print minimum three items with details.

on next page it is priting only 3-4 items as there are enough sapce to ptint at lease 10 items with details.

The only good thing is it is not spliting the Item details and other text.[Main window on next page has bigger size]

Any idea why PROTECT - ENDPOTECT not behaving properly.

Thanks

Aman

Message was edited by: Amandeep Singh

Tags:
Not what you were looking for? View more on this topic or Ask a question