2009 Mar 17 4:57 PM
hi all,
we have a requirement to delete uom data for mpn materials. the problem is for mpn materials the mm02 don't show uom tab so we can't create bdc or lsmw for the same.
we tried with bapi 'BAPI_MATERIAL_SAVEDATA' by specifying the deletion flag in uom data table. but the uom data is not getting deleted and is still visible in table MARM.
Can anyone tell me how to delete uom data for mpn material using 'BAPI_MATERIAL_SAVEDATA' or is there any other bapi to perform this task.
thanks & regards
vijay
2009 Mar 17 6:21 PM
2009 Mar 18 4:18 AM
Hi Mathews,
This is how i am calling bapi.
data: headdata type BAPIMATHEAD,
UNITSOFMEASURE type table of BAPI_MARM,
wa_uom type BAPI_MARM,
RETURN TYPE BAPIRET2.
wa_uom-ALT_UNIT = 'J10'.
WA_UOM-DEL_FLAG = 'X'.
APPEND WA_UOM TO UNITSOFMEASURE.
headdata-MATERIAL = '919775_MPN1'.
CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
EXPORTING
headdata = headdata
IMPORTING
RETURN = RETURN
TABLES
UNITSOFMEASURE = UNITSOFMEASURE .
it is working fine for normal material but for mpn materials its not working.
regards
vijay
2009 Mar 18 4:53 AM
Sorry for the delay , it was late into the night for me yesterday .
What I understand is usualy when you create a MPN material you associate that with another material of your own. For each each MPN material there is an associated material in your material master with type 'HERS'
So if you identify your material master record which corresponds to your MPN material and use that in your BAPI, may be that should help.
Mathews
2009 Mar 18 5:12 AM