on 10-30-2008 5:49 AM
displaying the line items in gr slip i have to trace the serial number.i used perform statement but disaplaying only one item's serial number.How to get serial numbers of all items..
and one item have multiple serial numbers..but my code will display only one serial number.
here is the code..
FORM SER_NUM TABLES IN_TAB STRUCTURE ITCSY
OUT_TAB STRUCTURE ITCSY.
DATA : V_SER_NUM(18) TYPE C.
DATA : LS_MBLNR TYPE MSEG-MBLNR.
DATA : LS_OBKNR TYPE SER03-OBKNR.
DATA : LS_EQUNR TYPE OBJK-EQUNR.
READ TABLE IN_TAB INDEX 1.
MOVE IN_TAB-VALUE TO LS_MBLNR .
SELECT SINGLE OBKNR FROM SER03 INTO LS_OBKNR WHERE MBLNR = IN_TAB-VALUE .
IF SY-SUBRC = 0.
SELECT SINGLE EQUNR FROM OBJK INTO LS_EQUNR WHERE OBKNR = LS_OBKNR.
IF SY-SUBRC = 0.
V_SER_NUM = LS_EQUNR .
READ TABLE OUT_TAB INDEX 1 .
MOVE 'SER_NUM' TO OUT_TAB-NAME.
MOVE V_SER_NUM TO OUT_TAB-VALUE.
MODIFY OUT_TAB INDEX 1.
ENDIF.
ENDIF.
ENDFORM. "SER_NUM
Hi
Number of Serial numbers depend on the quantity. If you have single line item with 3 quantities, that line item can have 3 serial numbers.
So, there will be more than one object number(OBKNR) for a document(MBLNR).
Dont use SELECT SINGLE.
Use SELECT INTO TABLE, And in WHERE condition put the line number as well.
SELECT OBKNR FROM SER03 INTO TABLE LT_OBKNR
WHERE MBLNR = IN_TAB-VALUE AND
ZEILE = IN_TAB-ITEM.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
The subroutine is getting triggered for only one item.
Try to call this routine for each line item. I mean when ever the line items are getting printed - call this routine.
Regards,
Venkatesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
use field ZEILE-----Item in Material Document also ...
while fetching field from mseg fetch field ZEILE and get ser.no based on OBKNR and ZEILE
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.