on 09-30-2008 4:03 PM
Hi Gems,
What is label printing? Can some one tell me how to create a label in SAP SCripts with an example?
Do we need to use any special type of printer for that?
Thanks
Dan
Not clear
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Check out this code,
TABLES : ZPACK,ZTRN.
DATA: BEGIN OF ITAB OCCURS 0,
ZPKSLIP_NO LIKE ZTRN-ZPKSLIP_NO,
ZCARTON_NO LIKE ZPACK-ZCARTON_NO,
END OF ITAB.
DATA MVAR(12) TYPE C.
DATA MCTR(6) TYPE C.
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
SELECT-OPTIONS: ZSLIP FOR ZTRN-ZPKSLIP_NO NO-EXTENSION NO INTERVALS
OBLIGATORY default 6.
SELECTION-SCREEN END OF BLOCK B1.
SELECT * FROM ZPACK INTO CORRESPONDING FIELDS OF TABLE ITAB WHERE
ZPKSLIP_NO EQ ZSLIP-LOW .
CALL FUNCTION 'OPEN_FORM'
EXPORTING
FORM = 'ZTEST_RAJ'.
DO 4 TIMES.
MCTR = 100000 + SY-INDEX.
MCTR = MCTR+1(5).
CONCATENATE '55C/06/' MCTR INTO MVAR.
DO 80 TIMES.
ITAB-ZPKSLIP_NO = MVAR.
ITAB-ZCARTON_NO = SY-INDEX.
APPEND ITAB.
CLEAR ITAB.
ENDDO.
ENDDO.
SORT ITAB BY ZPKSLIP_NO ZCARTON_NO.
CALL FUNCTION 'START_FORM'
EXPORTING
FORM = 'ZTEST_RAJ'.
LOOP AT ITAB.
AT NEW ZPKSLIP_NO.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = '101'
WINDOW = 'MAIN'.
ENDAT.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = '102'
WINDOW = 'MAIN'.
AT END OF ZPKSLIP_NO.
CALL FUNCTION 'END_FORM'.
CALL FUNCTION 'START_FORM'
EXPORTING
FORM = 'ZTEST_RAJ'.
ENDAT.
ENDLOOP.
CALL FUNCTION 'END_FORM'.
CALL FUNCTION 'CLOSE_FORM'.
In sap script write :
/E 101
P1 ,,&ITAB-ZPKSLIP_NO(R)&
P1
/E 102
P1 ,,&ITAB-ZCARTON_NO(R)&
Regards,
Midhun Anbraham
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
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.