"Maintain delivery schedule for subcontractor scheduling agreement" (ME38) or "Create/change subcontract order" (ME21, ME22):
If several schedule lines were deleted at the same time, only the reservations (for the components, table RESB) of the last deleted schedule line were deleted. If a schedule line was changed and others deleted, no reservations were deleted at all.
Program error.
The program fix is described below.
You can use report ZZHELP01 (described below) to display/delete the old reservations that should have been deleted. This report selects 1) reservations that refer to no-longer-existing schedule lines and 2) reservations that point to existing schedule lines which, however, point to other reservations. Such a situation can arise when the number of deleted schedule line is re-used for a new schedule line. (Incidentally, this is prevented by the correction in Note 35428). In the list display, you can recognized these reservations by the fact that the reservation number from the schedule line is still shown after the schedule line number.
REPORT ZZHELP01.
TABLES: RESB, EKET.
WRITE: / 'The following reservations point to a schedule line'.
WRITE: / 'that has been deleted:'.
SKIP.
WRITE: / 'Number Pos. L E Material Date required',
' Qty. required Qty. consumed',
88 'Purch. doc. Item Sched. line'.
SELECT * FROM RESB
WHERE BDART = 'BB'.
CHECK NOT RESB-EBELN IS INITIAL.
CHECK NOT RESB-EBELE IS INITIAL.
SELECT SINGLE * FROM EKET
WHERE EBELN = RESB-EBELN
AND EBELP = RESB-EBELP
AND ETENR = RESB-EBELE .
IF SY-SUBRC NE 0.
WRITE: / RESB-RSNUM, RESB-RSPOS,
RESB-XLOEK, RESB-KZEAR,
RESB-MATNR, RESB-BDTER, RESB-BDMNG, RESB-ENMNG,
90 RESB-EBELN, 100 RESB-EBELP, 106 RESB-EBELE.
* DELETE RESB.
ELSE.
IF EKET-RSNUM NE RESB-RSNUM.
WRITE: / RESB-RSNUM, RESB-RSPOS,
RESB-XLOEK, RESB-KZEAR,
RESB-MATNR, RESB-BDTER, RESB-BDMNG, RESB-ENMNG,
90 RESB-EBELN, 100 RESB-EBELP, 106 RESB-EBELE,
EKET-RSNUM.
* DELETE RESB.
ENDIF.
ENDIF.
ENDSELECT.
To delete the reservations, please activate the comment line 'DELETE RESB.'.
No comments:
Post a Comment