Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

BAPI for deleting a field in material master

Former Member
0 Kudos

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

2 REPLIES 2

Former Member
0 Kudos

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

Former Member
0 Kudos

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,