2014 Oct 06 5:18 AM
Hi all,
I am doing a sap script in main window i have created the two text element one for header and other for the line items data i dont know how to call in abap pgm write_form
In main window i have created the text elements two in main window
/E7 MAterial Desc matnr like that
E8
Line item tables
how to call this in main window
When i making calll
loop at it_final into wa_final
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = 'E7'
WINDOW = 'MAIN'
ENdloop.
material desc is getting repeated
with that line item how to resolve this
With thanks ,
Maha.
Hi all,
I am doing a sap script in main window i have created the two text element one for header and other for the line items data i dont know how to call in abap pgm write_form
In main window i have created the text elements two in main window
/E7 MAterial Desc matnr like that
E8
Line item tables
how to call this in main window
When i making calll
loop at it_final into wa_final
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = 'E7'
WINDOW = 'MAIN'
ENdloop.
material desc is getting repeated
with that line item how to resolve this
With thanks ,
Maha.
2014 Oct 06 9:55 AM
Hi Mahalakshmi,
Hope it Helpful.
Check your itab entries containing Material Description Repeated or Not.
Eg:
two Internal table One containing Material and Description and another internal table containing Material and location.
loop at itab_mat into wa_mat.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = 'E7'
WINDOW = 'MAIN'
read table it_mat_loc into wa_mat_loc with key matnr EQ wa_mat-matnr.
if sy-subrc = 0.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = 'E8'
WINDOW = 'MAIN'
endif.
endloop.
Regards,
Venkat.
2014 Oct 06 10:24 AM
Hi Mahalakshmi
If u want to print Header and item data using Main window in script we need to use text elements ...with a function module write_form
for each material we have multiple items ...
so we need to use control level statements...
Like AT NEW <Field1> use this statement in main loop and then loop the item table with each material doc number and print item data using FM
call function 'WRITE_FORM'
exporting
element = 'E8'
window = 'MAIN'
Do this it will help you
Thanks ,
Vamsi.
2014 Oct 07 7:01 AM