cancel
Showing results for 
Search instead for 
Did you mean: 

printing the terms and conditions page as last page in the MEDRUCK sapscrip

Madhurivs23
Participant
0 Kudos

Hi

I have copied the MEDRUCK sapscript to Zmedruck and created a last page and added one VAR window in it for printing Terms and conditions.

This page should print at the last of PO form.

I tried the following way :

Written the following code at the last of the main Window.

/: IF &PAGE(C)& EQ &SAPSCRIPT-FORMPAGES(C)&

/: NEW-PAGE LAST

/: ENDIF

But could not achieve to print the last page. Is there any other way to do this(WITHOUT MAKING ANY CHANGES IN DRIVER PROGRAM?).

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member200345
Contributor
0 Kudos

Hi,

The standard MEDRUCK from has got two pages, First & Next.

It seems you have created a new page for terms & conditons. Make the new page as next page to the sencond page. You can do this in the page attributes.

Regards,

Vijaymadhur.

Madhurivs23
Participant
0 Kudos

I tried the way what you have mentioned, but this is also not working

former_member200345
Contributor
0 Kudos

Hi,

Have you called the terms & Conditions Element from the driver program?

You need to call this element before closing the form.

Regards,

Vijaymadhur.

Madhurivs23
Participant
0 Kudos

No, I have not called that. Do I need to enhance the function module : ME_PRINT_PO for this ?

former_member200345
Contributor
0 Kudos

Yes. you need to enhance it.

Madhurivs23
Participant
0 Kudos

Will you please guide me , where I should write the enhanced code ?

There is no other way to print last page at all?

Edited by: madhuri sonawane on Jan 24, 2012 3:59 PM

former_member200345
Contributor
0 Kudos

Hi,

I have checked the FM 'ME_PRINT_PO'. the subroutine 'ENDE' is responsible for closing the form.

In the perform ENDE, the element LAST of MAIN WINDOW is called.

I have checked the MAIN window of the MEDRUCK form, the element 'LAST' is called in the below fashion.

/E LAST

/: PROTECT

AS

AS

/: INCLUDE &T024E-TXGRU& OBJECT TEXT ID ADRS LANGUAGE &EKKO-SPRAS&

/: ENDPROTECT

If you don't want to change the program, then you can use the element LAST.

Trigger the NEW-PAGE event after the above lines of code like below.

/: NEW-PAGE

Create a standard text for tems & conditions and call it here using INCLUDE statement.

In your new page, you should create a main window but not a variable window to achive this.

Hope this resolves your issue.

Regards,

Vijaymadhur.

Madhurivs23
Participant
0 Kudos

In your new page, you should create a main window but not a variable window to achive this.

Thanks for reply,

I am not able to create a MAIN type window in the LAST page. only VAR and CONST are allowed.

former_member200345
Contributor
0 Kudos

Select the page windows of your last page and follow the below path.

EDIT->Create Element-> double click on MAIN WINDOW.

This is the usual practive that we follow to call the windows on pages.

Regards,

Vijaymadhur.