Skip to Content
0
Former Member
Sep 21, 2007 at 05:57 AM

print program

16 Views

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.