The list 'Deliveries for Goods Issue' (transaction VL19) displays deliveries for which the goods issue has already been posted.
Cause and prerequisitesThere are matchcodes for matchcode object VMVL that were not reduced.
SolutionPlease create the following program which will analyze the situation:
REPORT TEST.
TABLES: M_VMVLA, M_VMVLB, M_VMVLC, VBUK.
PARAMETERS TEST DEFAULT 'X'.
ULINE.
WRITE:/ 'A'.
SELECT * FROM M_VMVLA.
SELECT SINGLE * FROM VBUK WHERE VBELN = M_VMVLA-VBELN.
IF SY_SUBRC NE 0 OR VBUK-GBSTK = 'C'.
WRITE:/ M_VMVLA-VBELN, SY-SUBRC.
IF TEST = ' '. DELETE M_VMVLA. ENDIF.
ENDIF.
ENDSELECT.
ULINE.
WRITE:/ 'B'.
SELECT * FROM M_VMVLB.
SELECT SINGLE * FROM VBUK WHERE VBELN = M_VMVLB-VBELN.
IF SY_SUBRC NE 0 OR VBUK-GBSTK = 'C'.
WRITE:/ M_VMVLB-VBELN, SY-SUBRC.
IF TEST = ' '. DELETE M_VMVLB. ENDIF.
ENDIF.
ENDSELECT.
ULINE.
WRITE:/ 'C'.
SELECT * FROM M_VMVLC.
SELECT SINGLE * FROM VBUK WHERE VBELN = M_VMVLC-VBELN.
IF SY_SUBRC NE 0 OR VBUK-GBSTK = 'C'.
WRITE:/ M_VMVLC-VBELN, SY-SUBRC.
IF TEST = ' '. DELETE M_VMVLC. ENDIF.
ENDIF.
ENDSELECT.
If you execute the program with parameter = X, you will first get a list of all documents in question.
Then you can delete the matchcodes with test = ' ' that are no longer required.
No comments:
Post a Comment