28.2.11

SAP Note 23787 - Update term. during goods receipt for purchase order

Symptom:

During the goods receipt for the purchase order with transaction MB01, the update in function module MB_UPDATE_MATERIAL_VALUES terminates, if a valuation type (EKPO-BWTAR) is entered in the unassigned order item in question although the material in question is not valuated separately (the valuation category of material MBEW-BWTTY is initial).

Cause and prerequisites

The valuation category was cancelled in the material master although a purchase order exists. This, however, must not be allowed by the system.

Solution
Please make the following changes in FORM routine MATERIAL_LESEN in program FM07MFM0:
...
IF MBEFU-BWTTY IS INITIAL.
IF NOT MBEFU-BWTAR IS INITIAL.
MESSAGE E051 WITH M-MATNR M-WERKS.
ENDIF.
IF NOT M-BWTAR IS INITIAL AND NOT MBEFU-WERTU IS INITIAL. <--- new
MTCOM-KENNG = 'MBEW '. <--- new
CLEAR MTCOM-BWTAR. <--- new
CALL FUNCTION 'MATERIAL_READ' <--- new
EXPORTING <--- new
SCHLUESSEL = MTCOM <--- new
IMPORTING <--- new
MATDATEN = MBEW <--- new
RETURN = MTCOR <--- new
TABLES <--- new
SEQMAT01 = DUMMY. <--- new
IF NOT MTCOR-RMBEW IS INITIAL. <--- new
MESSAGE E077 WITH MTCOM-MATNR MTCOM-BWKEY MTCOM-BWTAR. <--- new
ENDIF. <--- new
XMTCOR-RMBEW = MTCOR-RMBEW. <--- new
MOVE-CORRESPONDING MBEW TO MBEFU. <--- new
CLEAR M-BWTAR.
ENDIF. <--- new
ELSE.
...

No comments:

Post a Comment