on 06-01-2009 1:06 PM
Hi experts!!
I have the following requirement: print labels from SAP.
The sticker papers have 8 rows and 3 colums, i.e. 24 stickers per page.
In order to do that i have created a sapscript form whick has 24 windows per page with 24 different text elements.
While looping to my internal table i change the element's name and window's name dynamically and then call the 'WRITE_FORM' function module with the respective element and window.
The problem is that as a result i get the last line of the internal table printed in all windows!
Please help!!!!!
Here is the code that i use:
index = index + 1.
PACK index TO ind.
CONCATENATE 'WINDOW' ind INTO window.
CONCATENATE 'LABEL' ind INTO element.
MOVE-CORRESPONDING i_form to zlabelstr.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = element
window = window
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.
Hi
I think the problem is the windows are not MAIN kind, u should create a grid (with 24 cells) in a main window instead of 24 window, or try to set VAR as attribute of your winows.
Max
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
loop internal table
call write_form.
endloop.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.