09-16-2005 12:20 PM
Hi
I have been searching and searching, but haven't find anything usefull.
I have a script where I wan't to print different matnr.
From my printprogram I have an internal table with 2 entries.
When I make the print, it is allways the last entries from the internal table that are printed - in both the window for entry no 1 and in the window for entry no 2.
The code in my print program looks like this:
Code:
LOOP AT g_caufv_tab.
CASE l_count.
WHEN 0.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'DESCR'
window = 'TEXT'.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'BARCODE_OUT'
window = 'BARCL'.
WHEN 1.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'DESCR'
window = 'TEXT1'.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'BARCODE_OUT'
window = 'BARCL1'.
WHEN 2.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'DESCR'
window = 'TEXT2'.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'BARCODE_OUT'
window = 'BARCL2'.
WHEN 3.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'DESCR'
window = 'TEXT'.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'BARCODE_OUT'
window = 'BARCL3'.
WHEN OTHERS.
ENDCASE.
ADD 1 TO l_count.
ENDLOOP.
When I am debugging mode (both in printprogram and Scrip) are looking at my material number, it has the right no. First time Matnr A, and then Matnr B.
Any suggestions ??!!
09-16-2005 12:25 PM
I think it is only possible in a main window. Can you test your code there?
09-16-2005 12:25 PM
I think it is only possible in a main window. Can you test your code there?
09-18-2005 7:44 AM
Thanx.... that was it.
But isn't possible to do a loop in other windows, than MAIN window?
09-18-2005 8:00 AM
Hi Lars,
If you do a loop inside a non MAIN window, it will print the values in a single line. So you will get only the last record.
Thanks
Vinod
09-19-2005 8:01 AM
Dear Lars,
I think it is not. However I've read quite some posts about using several (more than 1) main windows. However I've no experience with this myself. Perhaps you can do a search on the forum.