‎2006 Jun 21 9:42 AM
Hi All,
Can any one of you help me out of this issue.
A delivery group has deliveries with line items.
we had a Ztransaction code to print all the deleveries in a delivery group.in that it displays all the deliveries line items in a single page.
but recently a new Ztransaction code has been created with some upgrade and in this the issue is for a delivery group it is not printing all the delivery items in a single page. it is displaying each delivery and its items in different pages.
but our requirement is to display all the deliveries in a delivery group with items in a single page.
can you please suggest where to find the problem to fix the issue.
Thanks & Regards,
Rayudu
‎2006 Jun 21 9:46 AM
Hi Sarva,
The record that you want to put on the single page.Put all of them within block
Protect
<field values to be on the single page>
Endprotect.
Try to use this code as per your requirement
CALL FUNCTION 'CONTROL_FORM'
EXPORTING
COMMAND = 'PROTECT'.
LOOP AT IT_MAIN.
MOVE IT_MAIN-RECORD TO WA_MAIN-RECORD.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = 'WORK_AREA_RECORD'
WINDOW = 'MAIN'
EXCEPTIONS
OTHERS = 8.
IF SY-SUBRC <> 0.
WRITE: / 'Error in get_main_data'.
ENDIF.
ENDLOOP.
CALL FUNCTION 'CONTROL_FORM'
EXPORTING
COMMAND = 'ENDPROTECT'.
Message was edited by: mukesh kumar
‎2006 Jun 21 9:46 AM
Hi Sarva,
The record that you want to put on the single page.Put all of them within block
Protect
<field values to be on the single page>
Endprotect.
Try to use this code as per your requirement
CALL FUNCTION 'CONTROL_FORM'
EXPORTING
COMMAND = 'PROTECT'.
LOOP AT IT_MAIN.
MOVE IT_MAIN-RECORD TO WA_MAIN-RECORD.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = 'WORK_AREA_RECORD'
WINDOW = 'MAIN'
EXCEPTIONS
OTHERS = 8.
IF SY-SUBRC <> 0.
WRITE: / 'Error in get_main_data'.
ENDIF.
ENDLOOP.
CALL FUNCTION 'CONTROL_FORM'
EXPORTING
COMMAND = 'ENDPROTECT'.
Message was edited by: mukesh kumar
‎2006 Jun 21 9:49 AM
Hi,
Please check for the text NEW-PAGE in both your report program that calls the sapscript and the form. Maybe in your report program you have a function module 'CONTROL_FORM' that calls a new page. Please check its condition.
Regards!
P.S. Kindly award points for helpful replies:)