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

Double side printing from SAPScript, last page missing

Former Member
0 Likes
887

Hello all,

I try to setup double side printing from SAPScript, but have a problem and hope that somebody might help me.

In my form I have two pages with main window (FIRST and NEXT) which have print mode set to 'D' and next page set to 'TANDC'. Page 'TANDC' has only one VAR window which contains terms and conditions text.

Now, everything works fine except that T&C text isn't printed after last page (ie. after last 'NEXT' page). Is there a way to force printing of last (back side) page?

PS: Calling 'WRITE_FORM' from the print program at the end didn't help either.

Thanks in advance.

Grigor

1 ACCEPTED SOLUTION
Read only

Vinod_Chandran
Active Contributor
0 Likes
856

Hi,

You have to use the explicit page break for the page TANDC to get displayed. The format is

/: NEW-PAGE [page_name]

For more information please refer to

http://help.sap.com/saphelp_46c/helpdata/en/d2/cb3d07455611d189710000e8322d00/frameset.htm

Thanks

Vinod

Hello all,

I try to setup double side printing from SAPScript, but have a problem and hope that somebody might help me.

In my form I have two pages with main window (FIRST and NEXT) which have print mode set to 'D' and next page set to 'TANDC'. Page 'TANDC' has only one VAR window which contains terms and conditions text.

Now, everything works fine except that T&C text isn't printed after last page (ie. after last 'NEXT' page). Is there a way to force printing of last (back side) page?

PS: Calling 'WRITE_FORM' from the print program at the end didn't help either.

Thanks in advance.

Grigor

6 REPLIES 6
Read only

Vinod_Chandran
Active Contributor
0 Likes
857

Hi,

You have to use the explicit page break for the page TANDC to get displayed. The format is

/: NEW-PAGE [page_name]

For more information please refer to

http://help.sap.com/saphelp_46c/helpdata/en/d2/cb3d07455611d189710000e8322d00/frameset.htm

Thanks

Vinod

Read only

Former Member
0 Likes
856

Hi Vinod,

Thanks for your reply.

I tried this as well but it doesn't work for me.

Problem is that next-page can be called from main window only. Since I have other windows (eg. footer) of type VAR on page 'NEXT', calling next-page results in these windows being printed on new page instead on bottom of the page where main window is printed.

Kind regards,

Grigor

Read only

0 Likes
856

Hi Grigor,

Hope you are using the command like

/: NEW-PAGE TANDC

Can you please confirm.

Thanks

Vinod

Read only

0 Likes
856

Hi Vinod,

sorry, of course it's NEW-PAGE, not NEXT-PAGE. I made a mistake, but only here.

I'm using the command exactly like this. As I said, if used in main window it moves other windows to next page and if used in VAR window it is ignored.

Kind regards,

Grigor

Read only

0 Likes
856

Hi,

Can you try controlling the page break from the print program like

CALL FUNCTION 'CONTROL_FORM'

EXPORTING

COMMAND = 'NEW-PAGE'

EXCEPTIONS

UNOPENED = 01

UNSTARTED = 02.

Thanks

Vinod

Read only

0 Likes
856

Hi Vinod,

this has a same effect as calling NEW-PAGE from form.

Again, window 'FOOTER' is printed on a new page instead bellow 'MAIN' window and there are no T&C on the last sheet. I also tried to explicitly call text element in window 'FOOTER' before calling 'CONTROL_FORM', like this:

CALL FUNCTION 'WRITE_FORM' "last element in 'MAIN' window

EXPORTING

element = 'LAST'

EXCEPTIONS

OTHERS = 01.

CLEAR sy-subrc.

CALL FUNCTION 'WRITE_FORM'

EXPORTING

element = 'FOOTER'

window = 'FOOTER'

EXCEPTIONS

OTHERS = 01.

CLEAR sy-subrc.

CALL FUNCTION 'CONTROL_FORM'

EXPORTING

COMMAND = 'NEW-PAGE'

EXCEPTIONS

UNOPENED = 01

UNSTARTED = 02.

It looks like the 'FOOTER' window is under control of SAPScript, not of print program.

Note: 'CONTROL_FORM' call is placed immediatelly before 'CLOSE_FORM', so at the last possible place.

Kind regards,

Grigor