cancel
Showing results for 
Search instead for 
Did you mean: 

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

Former Member
0 Kudos

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.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

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

Former Member
0 Kudos

Could you please send me the form you mentioned to vasu.vellore@gmail.com.

Former Member
0 Kudos

well u can create 2 main windows in a script . for this u will have to modify ur driver program and usinf fm control_form u will have to pass new-window for calling the second main window and looping a different set of data into it .

Thanks

Rohit

Reward if helpful

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

Hi Kiran,

You did not get my requirement correctly.

Firstly, i do not have access to the print program. Sorry that i forgot to mention this in my post earlier.

Secondly, i have to print the line items multiple number of times, window type has to be MAIN.

Regards,

Mamata.

Former Member
0 Kudos

hey ans my question

can u create 2 main window in sapscript

after dat i wll ans ur question

Message was edited by:

Ronei Shedi

varma_narayana
Active Contributor
0 Kudos

Hi..

This is not possible bcoz we can have only one MAIN window IN a FORM.

Reward if Helpful<b></b>