Skip to Content
avatar image
Former Member

Two main windows with same data on a page of a script

Hi All,

I have written an SAP script with two main windows on a page.

I have same line items to be printed in both the windows on the first and all

the subsequent pages.

How do I code such a script?

Regards,

Mamata.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Aug 21, 2007 at 06:09 AM

    Hi

    first copy all the components in a first window to second window exactly

    and call this fm 2 times

    CALL FUNCTION 'WRITE_FORM'

    EXPORTING

    • ELEMENT = ' '

    • FUNCTION = 'SET'

    • TYPE = 'BODY'

    WINDOW = 'MAIN' -


    > first window

    • IMPORTING

    • PENDING_LINES =

    EXCEPTIONS

    ELEMENT = 1

    FUNCTION = 2

    TYPE = 3

    UNOPENED = 4

    UNSTARTED = 5

    WINDOW = 6

    BAD_PAGEFORMAT_FOR_PRINT = 7

    SPOOL_ERROR = 8

    OTHERS = 9

    .

    IF SY-SUBRC <> 0.

    write:/ 'ERROR IN HEADER'.

    • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

    • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

    ENDIF.

    CALL FUNCTION 'WRITE_FORM'

    EXPORTING

    • ELEMENT = ' '

    • FUNCTION = 'SET'

    • TYPE = 'BODY'

    WINDOW = 'FOOTER' -


    > second window

    • IMPORTING

    • PENDING_LINES =

    EXCEPTIONS

    ELEMENT = 1

    FUNCTION = 2

    TYPE = 3

    UNOPENED = 4

    UNSTARTED = 5

    WINDOW = 6

    BAD_PAGEFORMAT_FOR_PRINT = 7

    SPOOL_ERROR = 8

    OTHERS = 9

    .

    IF SY-SUBRC <> 0.

    write:/ 'ERROR IN HEADER'.

    reward points to all helpful answers

    kiran.M

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 22, 2007 at 11:49 AM

    Hi,

    I have done a sample form for displaying the same content in two main windows in the same page.Give ur email id i ll send u the code of form upload that program using RSTXSCRP and look into main window code.. u will get some idea..

    Regards,

    Sarath Kumar.J

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      HI sarath!

      I have the same requirement can you kindly help me out how you acheived that.

      i also have to print same contents in two main windows on each and every page.

      thanks

      jawad