cancel
Showing results for 
Search instead for 
Did you mean: 

Terms & Conditions are not printing in SAP Script

Former Member
0 Kudos

Hi,

I am using SAP standard program SAPFM06P and custom SAP script to print PO details.

I have a problem in printing Terms and Conditions page. details are below:

I have FIRST, NEXT pages for data and LAST page for terms and conditions.

for FIRST page, next page is NEXT &

for NEXT page, next page is NEXT &

for LAST page, next page is LAST.

In my LAST page i have only one window(TERMS_CO) with terms and conditions (no Main window here).

With this setting when i print the PO, TC page is not printing.

I tried putting /: NEW-PAGE LAST in my FIRST page main window and i am getting fatal error.

Pls let me know how SAP calls the page sequence & is there any explicit code we need to put in any windows to call terms and conditions page?

Regards,

Sreeni

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

if it maybe didnt get clear enough, you have to do what dhina said, in your DRIVER PROGRAM, not in the form.

Answers (3)

Answers (3)

Former Member
0 Kudos

I Solved my own. Thanks

Former Member
0 Kudos

Hi,

How did you solved it? i faced the same problem.

Former Member
0 Kudos

as you have to print the terms and condition on the last page do the following things:-

first call the function 'OPEN_FORM'

AND PROVIDE THE SAPSCRIPT NAME

THEN 'START_FORM'.

THEN 'WRITE_FORM'.

AND PASS THE DATA FROM THE PROGRAM TO BE PRINTED.

AFTER THIS CALL FUNCTION 'END_FORM'.

AGAIN CALL THE FUNCTION 'START_FORM' AND

THIS TIME PASS THE 'LAST PAGE NAME' IN 'START_PAGE' EXPORTING PARAMETER

USE 'WRITE_FROM' TO PRINT THE TERMS AND CONDITION

'END_FORM'

AND 'CLOSE_FORM'

Former Member
0 Kudos

This works great. But what if this last page of Terms & Conditions needs to print TWO pages (the TaC is a Standard Text)?

Example of a 6 Page Purchase Order:

FIRST

NEXT

NEXT

NEXT

LAST

LAST

How do you ensure that the "second" LAST page prints? LAST's next page is LAST but it doesn't print the "second" page. Protect/EndProtect did not work either.

Any thoughts?

koolspy_ultimate
Active Contributor
0 Kudos

try


CALL FUNCTION 'CONTROL_FORM'
command = 'NEW-PAGE LAST

0 Kudos

Once check it your page formation and print program

call Control_form function module

in this pass your terms and conditions page details...

Try it once...

Regards

venu

0 Kudos

Once check it your page formation and print program

call Control_form function module

in this pass your terms and conditions page details...

Try it once...

Regards

venu

Former Member
0 Kudos

Dear Sreeni,

The only way to call the last page using the following coding

CALL FUNCTION 'CONTROL_FORM'

command = 'NEW-PAGE LAST'.

Before change the program you should find when you want to call the last page that place you give the code.

Regards,

Dhina..