Skip to Content
avatar image
Former Member

Printing terms and condition on the last page in sapscript

Hi All,

I have to print terms & condition in the last page of sapscript. I have created three pages in script. FIRST,NEXT and LAST. Calling in below sequence.

FIRST->NEXT->NEXT.

Now I want to call LAST page explicitly so that it should come only once at the end.

But my main window is copying all the contents of previous pages.I am using a new element in main window and want to call this element and page using write form but in the print program I am not finding any write_formIs ther any way to use writeform in the external subroutine instead of modifying standard program.

Thanks

Shweta

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • avatar image
    Former Member
    Jul 06, 2009 at 07:15 PM

    Hi,

    try this way..

    " this means there is no other page it is ht last page
    IF &NEXTPAGE& EQ 0
    Include your Pricing terms and conditon.
    ENDIF.
    

    Prabhudas

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 07, 2009 at 06:43 AM

    Hi,

    try with using

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

    conditions

    /: endif

    here page is the present page number

    and sapscript-formpages gives the total number of pages------if they are equal i,e if it is last page then print the conditions.

    Regards,

    jaya

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 07, 2009 at 08:47 AM

    Hi

    If you are using Script then call the last page explicitly from your driver program using FM CONTROL_FORM.

    In smartforms it can done using COMMAND node.

    Regards

    Vijai

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 07, 2009 at 10:31 AM

    Hi,

    Trying using the command 'NEW-PAGE'.

    At the end of next page, check for the final page number. If this is the last page then call the last page.

    At the end of main window of 'next' page,

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

    /: NEW-PAGE lastpage (give the Page name)

    /: endif

    Hope this helps.

    Regards,

    Dinakar.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi,

      In your printprogram just before close_form or end_form.

      You have to do a write_FORM of an element like /E TERMSPAGE which is in the main.

      In this you have an statlement /: NEW-PAGE LAST.

      This will force to go to that last page.

      Success.

      Gr., Frank