cancel
Showing results for 
Search instead for 
Did you mean: 

Duplex Print in SAP Script

Former Member
0 Kudos

Hi,

I need to print the Terms and CD's in the reverse of each page.I have set the mode as 'D'. I created a page called 'Reverse' and put the T's & Cd's in that.How to call this page from print program??

FYI,

If more no of line item exist for an invoice it wll display more than one page, so the T's & Cd's also should display in the reverse of next pages.

I have 3 pages like FIRST,NEXT,REVERSE.

Reverse page contains T's & Cd's

Next page will display based on no of line items.

Please help me with this.Thanks in Advance.

Regards,

Liso.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

First->Reverse

Reverse->next

Next->reverse

Last-->blank

Regards,

Sravanthi

Former Member
0 Kudos

Hi Padma / Abhijeet,

Thanks a lot. It works fine.

Former Member
0 Kudos

Hi Sravanthi,

Thanks for ur reply.It works fine.

Former Member
0 Kudos

Hi,

I am calling the last page from driver program based on some

condition.If the last is being called then this will be working fine if it is not being called then the reverse page should not come for other pages aslo.But reverse page is coming for all pages except last when last page is not triggered from driver program.

So please help me in this.Thanks in Advance.

Answers (3)

Answers (3)

Former Member
0 Kudos

The solution which was given by the SDN experts is working partially.

Former Member
0 Kudos

Hi,

set the print mode to D for the first and next pages and leave it blank for reverse...

set the next page attribute of the pages as

first page -- reverse.

reverse -- next

next -- reverse.

and also... in your driver program.... use at last in your loop -- endloop to trigger the new page ( reverse ) on the last page

loop at itab

at last.

call function module control_form

command = 'NEW-PAGE REVERSE'

endat.

endloop.

regards

padma

Former Member
0 Kudos

Hi padmavathi / Bala,

I have done as u mentioned, but i m facing an issue i.e

For single page output it gives 3 pages such as

1 output data,1 reverse page and 1 more page which is next page(defined in script, it shud come if more no of line items in main window) without any main data but it contains some common data like logo and footer etc..

Can u plz tell me why this is happenning.??

Former Member
0 Kudos

Hi Lisothas,

This is happening because you have given NEXT as next page for REVERSE page. what you can do create a same page as REVERSE page lets say LAST page. Now call this page as


LOOP AT itab INTO fs_tab.
------------------------------------
-----------------------------------
  Your logic
----------------------------------
---------------------------------
AT LAST.
    PERFORM control_form.

ENDAT.

ENDLOOP.


FORM control_form.
     CALL FUNCTION 'CONTROL_FORM'
    EXPORTING
      command   = 'NEW-PAGE LAST'
    EXCEPTIONS
      unopened  = 1
      unstarted = 2.
ENDFORM.

Regards

Abhijeet

Former Member
0 Kudos

Hi,

You are getting because your reverse page has no main window and the next page attribute of reverse is your next page.. so it is triggering the page....

Even i tried it... i followed this logic... may be it helps you

One thing you can do is... create another page same as reverse page with main window in that of negligle size and follow the steps given by Abhijeet in his code....

the next page attribute of the new page created is the same page name

In the control form the command will be

New-page <new page created name>

regards

padma

Former Member
0 Kudos

Hi Padma / Abhijeet,

Thanks for ur response. Now how to link all 4 pages??

First->Reverse

Reverse->?

Last(Same as Reverse)->Last

Next->?

Former Member
0 Kudos

Hi,

In page attributes give this.

For page FIRST give next page as REVERSE.

For REVERSE give next page as NEXT.

For NEXT give next page as REVERSE.