cancel
Showing results for 
Search instead for 
Did you mean: 

multiple main window in script on one page

Former Member
0 Kudos

hi friends,

I have one requirement that, i have to display an internal table with multiple records in the footer window.

As iam using main window for printing line items, but in footer window i have to print multiple records from an internal table.

Pl explain with coding.

what to write in form and print program.

any idea about my requirement, waiting for reply

Thanks,

Vamsykrishna.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

hi,

u cant have 2 mian windows in a single page.

so, either u should to as above said with 2 windoes,

or else u should display both windows content in main window it self, so that it can be extended to other pages.

Former Member
0 Kudos

Hi Mytri,

if i assign footer window in main window then if Items is less then 5 in the loop then footer window will come in the middle of the page.

How can i rectifier this problem.

can u help in this regards.

Thanks,

vamsykrishna.

Former Member
0 Kudos

I think this will help u.....

1. Creat two window one as main window and other as footer window.

2.creat two text element one for main and other for footer.

3.use 2 write forms one for main window and other for footer..

&----


*& Report Z_PSTESTSCRIPT

*&

&----


*&

*&

&----


report z_pstestscript.

tables : ekko, ekpo, kna1, user01, mara, makt.

parameters : p_ebeln like ekko-ebeln,

p_ebelp like ekpo-ebelp.

clear ekko.

select single * from ekko

where ebeln = p_ebeln.

clear ekpo.

select single * from ekpo

where ebeln = p_ebeln

and ebelp = p_ebelp.

clear kna1.

select single name1 from kna1

into kna1-name1

where kunnr = ekpo-kunnr.

clear makt.

select single maktx matnr from makt

into (makt-maktx, makt-matnr)

where matnr = ekpo-matnr and spras = sy-langu.

call function 'OPEN_FORM'

exporting

application = 'TX'

  • ARCHIVE_INDEX =

  • ARCHIVE_PARAMS =

device = 'PRINTER'

dialog = 'X'

form = 'Z_PSTESTSCRIPT1'

language = sy-langu

  • OPTIONS =

importing

language = sy-langu

  • NEW_ARCHIVE_PARAMS =

  • RESULT =

exceptions

  • CANCELED = 1

  • DEVICE = 2

  • FORM = 3

  • OPTIONS = 4

  • UNCLOSED = 5

  • MAIL_OPTIONS = 6

  • ARCHIVE_ERROR = 7

  • INVALID_FAX_NUMBER = 8

  • MORE_PARAMS_NEEDED_IN_BATCH = 9

  • SPOOL_ERROR = 10

  • CODEPAGE = 11

others = 1.

.

if sy-subrc <> 0.

  • 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 = 'HEADER'

  • FUNCTION = 'SET'

  • TYPE = 'BODY'

window = 'HEADER'

  • IMPORTING

  • PENDING_LINES =

exceptions

element = 1.

.

call function 'WRITE_FORM'

exporting

element = 'MAIN'

  • FUNCTION = 'SET'

  • TYPE = 'BODY'

window = 'MAIN'

  • IMPORTING

  • PENDING_LINES =

exceptions

element = 1.

call function 'WRITE_FORM'

exporting

element = 'FOOTER'

  • FUNCTION = 'SET'

  • TYPE = 'BODY'

window = 'FOOTER'

  • IMPORTING

  • PENDING_LINES =

exceptions

element = 1.

call function 'CLOSE_FORM'

  • IMPORTING

  • RESULT =

  • RDI_RESULT =

  • TABLES

  • OTFDATA =

  • EXCEPTIONS

  • UNOPENED = 1

  • BAD_PAGEFORMAT_FOR_PRINT = 2

  • SEND_ERROR = 3

  • SPOOL_ERROR = 4

  • CODEPAGE = 5

  • OTHERS = 6

.

if sy-subrc <> 0.

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

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

endif.