Message no. VL224 : There are still batch split items with quantity xxxxxx for item yyy

, In

 

Last day , I received error when delete outbound ( not yet invoiced / good issue )

image004   

Not sure the root cause of this error, I think maybe something wrong with configuration of batch splitting but I can not duplicate this error .

image001

Document flow show only 2 relevant doc ( Sale Order –> Outbound ) and invoice status of outbound is C . ???

AT first , I try to update outbound status by program RVDELSTA , this run successfully and change invoice status of outbound to A but the problem still not solved.

After try many solutions, I found one script here can solve the problem:

This ABAP script update outbound quantity to the correct one

 

REPORT ZZLIPS01.
TABLES: LIPS, *LIPS, VBUK, VBUP.
PARAMETERS: VBELN LIKE LIPS-VBELN.
PARAMETERS: POSNR LIKE LIPS-POSNR.
SELECT SINGLE * FROM LIPS WHERE VBELN = VBELN
                            AND POSNR = POSNR.
CHECK SY-SUBRC = 0.
CLEAR: LIPS-KCMENG, LIPS-KCBRGEW, LIPS-KCNTGEW, LIPS-KCVOLUM.
SELECT * FROM LIPS INTO *LIPS WHERE VBELN = VBELN
                                AND UECHA = POSNR.
  LIPS-KCMENG  = LIPS-KCMENG + *LIPS-LGMNG.
  LIPS-KCBRGEW = LIPS-KCBRGEW + *LIPS-BRGEW.
  LIPS-KCNTGEW = LIPS-KCNTGEW + *LIPS-NTGEW.
  LIPS-KCVOLUM = LIPS-KCVOLUM + *LIPS-VOLUM.
  WRITE:/ LIPS-POSNR, LIPS-KCMENG.
ENDSELECT.
IF SY-SUBRC = 0.
  CLEAR LIPS-CHARG. CLEAR LIPS-BWTAR.
ENDIF.
UPDATE LIPS.

Thanks god . 1 full day to delete one outbound .

0 nhận xét:

Post a comment

Blog Archive