10-01-2010 11:48 AM
Hi All,
I am looking for a BAPI which can delete a particular field value (eg: marm-meinh) for a material. Please suggest a BAPI which can accomplish this.
thanx
Mani
Moderator message: please search for available information/documentation before asking.
locked by: Thomas Zloch on Oct 1, 2010 1:51 PM
10-01-2010 12:02 PM
Hi ,
try below way...
Select Single * from mara into xbapimathead where matnr = <material>.
select * from marn table into corresponding fields of xbapi_marn wher matnr = <material>..
and assign flags in xbapi_marmX and also clear the marm-meinh eq space and call the below bapi..
CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
EXPORTING
HEADDATA = xbapimathead
IMPORTING
return = return
TABLES
UNITSOFMEASURE = xbapi_marm
UNITSOFMEASUREX = xbapi_marmx
returnmessages = returnmessages.
Prabhudas
10-01-2010 12:24 PM
Hi,
Depending upon your type of usage you can use any of these to delete a material in BAPI.
BAPI_MATERIAL_DELETE
BAPI_CUSTOMER_MATERIAL_DELETE
BAPI_W4W5INFOUS_DELETE
BAPI_COMPANY_MATERIAL_DELETE
Hope this helps your need,
Regards,