on 08-18-2008 3:34 PM
hie guys
im looping at an int tab printing line items, however the int tab header is being printed as well ie
DH 001 Prince Isaac $2000 (Header Detail)
LN 001 Prince Isaac $2000 (Line item 1)
LN 002 Isaac Prince $2000 (Line item 2)
i have declared my itab like so:
data: itab TYPE TABLE OF <table> WITH HEADER LINE.
and populated like so:
SELECT * FROM <table>
INTO table itab
WHERE kunnr = customer.
howcome it is behaving like this??
<MOVED BY MODERATOR TO THE CORRECT FORUM>
Edited by: Alvaro Tejada Galindo on Aug 18, 2008 1:09 PM
Could you post the portion of the code where you loop through the itab and call WRITE_FORM?
Rob
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
the suggestions i tried dd not work for me..maybe am i failing to implement??
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thanxalot for the suggestions guys..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI,
try this below code
CALL FUNCTION 'OPEN_FORM'
EXPORTING
device = 'PRINTER'
dialog = ' '
form = 'ZMM_INVENTORY'
language = sy-langu
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 = 12.
IF sy-subrc <> 0.
ENDIF.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'HEADER_DATA '
window = 'HEADER'
EXCEPTIONS
element = 1
function = 2
type = 3
unopened = 4
unstarted = 5
window = 6
bad_pageformat_for_print = 7
spool_error = 8
codepage = 9
OTHERS = 10.
IF sy-subrc <> 0.
ENDIF.
LOOP AT i_final INTO wa_final.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'ITEM_DATA'
window = 'MAIN'
EXCEPTIONS
element = 1
function = 2
type = 3
unopened = 4
unstarted = 5
window = 6
bad_pageformat_for_print = 7
spool_error = 8
codepage = 9
OTHERS = 10.
IF sy-subrc <> 0.
ENDIF.
ENDLOOP.
CALL FUNCTION 'CLOSE_FORM'.
Regards,
Bhupal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
use this,
Data: itab type table of <table>,
wa type <table>.
loop at itab into wa.
*fill ur local variable and print on sap script.
clear wa.
endloop.
Yogesh N
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.