Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SE71 sapscript module

Former Member
0 Likes
1,728

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,688

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.

9 REPLIES 9
Read only

Former Member
0 Likes
1,688

hello,

Did you configure the output type correctly ? (Program and script)

best regards,

swanand

Read only

0 Likes
1,688

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

Read only

Former Member
0 Likes
1,689

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.

Read only

0 Likes
1,688

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

Read only

0 Likes
1,688

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

Read only

0 Likes
1,688

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

Read only

0 Likes
1,688

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

Read only

0 Likes
1,688

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

Read only

0 Likes
1,688

There were many "protect enprotect" commands in the program, one of these was at item line level

Thanks

Regards