2012 Oct 09 3:22 PM
Hi,
When I execute VL02N selecting "Issue delivery output" system displays the first page without any item and the following pages with
I created a sapscript module for outbound deliveries with SE71.
I set in customizing by V/34 copying rule so that the text "Material sales text" will be copied from sales order to outbound delivery.
all the information (material, description qty and the above "Material sales text").
I cannot understand why the first page of the printout is without items.
What do I have to check ?
Thanks
Best regards
P.S.: The text for the first item in the sales order and outbound delivery is very long 250 rows of description
2012 Oct 09 4:51 PM
Hi,
In the SAP Script, Page windows, just check if there is any MAIN window on FIRST page. If the same is not present, then add the same from NEXT Page.
The second reason which I see is to check on the window for PROTECT....ENDPROTECT. If this is present, and the material line items goes more than the available space of the first page, then the same is carried over to the next page.
2012 Oct 09 4:21 PM
hello,
Did you configure the output type correctly ? (Program and script)
best regards,
swanand
2012 Oct 09 4:29 PM
Hi,
yes, I did that and printout is being generated but it's strange that the first page doesn't contain any
data as material and "Material sales text".
From the 2nd page everything is correct
Thanks
2012 Oct 09 4:51 PM
Hi,
In the SAP Script, Page windows, just check if there is any MAIN window on FIRST page. If the same is not present, then add the same from NEXT Page.
The second reason which I see is to check on the window for PROTECT....ENDPROTECT. If this is present, and the material line items goes more than the available space of the first page, then the same is carried over to the next page.
2012 Oct 11 9:55 AM
Hi,
I verified, MAIN window exist in both pages (first and next).
I checked the printout program looking for "protect" and I found the following line where "protect" occurs:
218 CALL FUNCTION 'CONTROL_FORM'
EXPORTING
command = 'PROTECT'.
227 CALL FUNCTION 'CONTROL_FORM'
EXPORTING
command = 'ENDPROTECT'.
841 CALL FUNCTION 'CONTROL_FORM'
EXPORTING
command = 'PROTECT'.
847 CALL FUNCTION 'CONTROL_FORM'
EXPORTING
command = 'ENDPROTECT'.
851 CALL FUNCTION 'CONTROL_FORM'
EXPORTING
command = 'PROTECT'.
900 CALL FUNCTION 'CONTROL_FORM'
EXPORTING
command = 'ENDPROTECT'.
What should I have to do to correct this so that texts will appear from the first page instead of next ?
Thanks
Best regards
2012 Oct 11 11:42 AM
Hi Zap,
Protect and Endprotect are just for avoiding the page breaks within SAP Script.
The purpose is to make all data available in one page and not half on first page and other on next page.
If this Protect Endprotect is being called in between a same window then its better to avoid it.
Normally we use protect endprotect in between two windows
i.e lets say when I am transiting to main window from lets say address window then I will use protect end protect.
If it is existing twice or thrice in same window then its better to avoid it.
Rgds,
sandeep katoch
2012 Oct 11 1:08 PM
Ok, I performed I search in the abap program but by debugging cannot understand where the
problem occurs.
I posted the code, I would try to put * where protect-endprotect occurs but don't know the correct line
which causes the problem
Thanks
Best regards
2012 Oct 11 1:28 PM
In your code, program is checking irem category of line item in custom table - zespo, please check delivery should contain proper item category.
responsible code might be :
*Modifica per escludere i tipi posizione che sono nella tabella ZESPO--*
SELECT SINGLE * FROM zespo WHERE pstyv = vbdpl-pstyv.
IF sy-subrc EQ 0.
* EXIT.
CONTINUE.
ENDIF.
Regards,
Gagan Choudha
2012 Oct 11 2:05 PM
Hi,
I verified the above custom table and if I add to it the PSTYV of the sales order, system display only one page without any item (material number, description and texts).
The above code removes some pstyv item from printout, this happens when I add a pstyv value in that table
It seems there is a page break in the above code but don't know where disabling it
I attached the print screen with the "main" window of the printout (1st page) and the following link
http://imageshack.us/photo/my-images/651/deliveryprintout.jpg/
Best regards
2012 Oct 24 3:54 PM
There were many "protect enprotect" commands in the program, one of these was at item line level
Thanks
Regards