cancel
Showing results for 
Search instead for 
Did you mean: 

print program

Former Member
0 Kudos

in my layout i have two windows..

one is address window and another one is main window.

how to print the herder window information ..

i mean how to write the code in print program..

my print program as follows..

TABLES ZEMP.

DATA ITAB LIKE ZEMP OCCURS 2 WITH HEADER LINE.

SELECT * FROM ZEMP INTO TABLE ITAB .

CALL FUNCTION 'OPEN_FORM'

EXPORTING

APPLICATION = 'TX'

DEVICE = 'PRINTER'

DIALOG = 'X'

FORM = 'ZTAB'

LANGUAGE = SY-LANGU.

CALL FUNCTION 'WRITE_FORM'

EXPORTING

ELEMENT = 'HEADER_DATA'

FUNCTION = 'SET'

TYPE = 'TOP'

WINDOW = 'MAIN'.

LOOP AT ITAB.

MOVE ITAB TO ZEMP.

CALL FUNCTION 'WRITE_FORM'

EXPORTING

ELEMENT = 'ITEMS_DATA'

FUNCTION = 'SET'

TYPE = 'BODY'

WINDOW = 'MAIN'.

ENDLOOP.

CALL FUNCTION 'CLOSE_FORM'.

it is not printing the adderss window data..

help me pls..

Regards,

pandu.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

where u write address window.

it print only main window.

may be.

CALL FUNCTION 'WRITE_FORM'

EXPORTING

ELEMENT = 'HEADER_DATA'

FUNCTION = 'SET'

TYPE = 'TOP'

<b>WINDOW = 'MAIN'.</b>--->??????addresswindow

Former Member
0 Kudos

header_data is in main window it self..

but i have one more window to display the address..

that address window doesn't have any text elements..

how to dispaly the message..

Regards,

pandu.