on 01-11-2008 7:10 AM
I want to print lebel in sap script for material from table makt and mara. i can print one label in one page. But i want to print 4 labels in a page . how i print it?
Hi Atanu,
What does Label mean?
Is it the description of the material?.
If that is the case then the field that you need to print will be MAKTX in the MAKT table.
If you want to print multiple values in a page,then you will have to move the contents from MAKT and MARA tables into an internal table.This can be acheived by using a simple select querry.This select querry has to be written in the print program of the script.
Now in the print program,loop the above internal table and within the loop call the function WRITE_FORM.
For example,if the internal table that you created is ITAB,then the code will be like this:
loop at ITAB.
call function 'WRITE_FORM'
exporting
element = 'LINE_ITEMS.'
FUNCTION = 'SET'
TYPE = 'BODY'
window = 'MAIN'
IMPORTING
PENDING_LINES = PENDING_LINES
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.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
endloop.
If you call the function WRITE_FORM within the loop,then all the values will be written in the script one after the other.
Please revert if you have any other querries.
Reward points if usefull.
Regards,
Kashyap Ivaturi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
wt does lavel means i...didnt get u....
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
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.