05-28-2007 7:45 AM
Hi friends,
I want to display items per batch splits. If Item 10 has 3 batch splits, the line no. will be 10-001, 10-002, 10-003 for each batch split. If Item 20 does not have any batch split, the line number will be 20.
n condition given to me is use last 3 digits of batch split POSNR)
Use VGBEL + VGPOS to determine link of batch split lines to main line.
thanks
himanshu sharma
05-28-2007 9:24 AM
Hi Himanshu,
First get all the line items from LIPS table.
SELECT VBELN POSNR UECHA FROM LIPS
INTO TABLE T_LIPS_SO
WHERE VBELN in VBELN
AND UECHA = 0.
u ll get all the line items for that VBELN. Condition should be UECHA = 0.
If UECHA = 0 u ll get the mail line item.
if UECHA contains value of POSNR for that VBELN that means that item is batch split line item of that main line item.
IF NOT T_LIPS_SO[] IS INITIAL.
SELECT VBELN POSNR MATNR LFIMG VGBEL VGPOS UECHA FROM LIPS
INTO TABLE T_LIPS_SO_TEMP2
FOR ALL ENTRIES IN T_LIPS_SO
WHERE VBELN = T_LIPS_SO-VBELN
AND UECHA = T_LIPS_SO-POSNR.
ENDIF.
Thanks & Regards
Santhosh
05-28-2007 8:23 AM
05-28-2007 9:24 AM
Hi Himanshu,
First get all the line items from LIPS table.
SELECT VBELN POSNR UECHA FROM LIPS
INTO TABLE T_LIPS_SO
WHERE VBELN in VBELN
AND UECHA = 0.
u ll get all the line items for that VBELN. Condition should be UECHA = 0.
If UECHA = 0 u ll get the mail line item.
if UECHA contains value of POSNR for that VBELN that means that item is batch split line item of that main line item.
IF NOT T_LIPS_SO[] IS INITIAL.
SELECT VBELN POSNR MATNR LFIMG VGBEL VGPOS UECHA FROM LIPS
INTO TABLE T_LIPS_SO_TEMP2
FOR ALL ENTRIES IN T_LIPS_SO
WHERE VBELN = T_LIPS_SO-VBELN
AND UECHA = T_LIPS_SO-POSNR.
ENDIF.
Thanks & Regards
Santhosh