on 05-23-2008 8:47 AM
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.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.