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 saving material fields.

Former Member
0 Kudos

Hi All

Can anybody suggest me some BAPI names which have flexibility to save only certain required fields of a material into mara, marc , makt and mvke.

In my program i am using some interanl tables for the above mentioned table fields and i want to save them.

Please suggest me.

10 REPLIES 10

Former Member
0 Kudos

Use this FM

BAPI_MATERIAL_SAVEDATA

former_member242255
Active Contributor
0 Kudos

BAPI_MATERIAL_SAVEDATA

Former Member
0 Kudos

HI,

Please check the BAPI below.

BAPI_MATERIAL_SAVEDATA

Edited by: Dande on May 15, 2009 11:18 AM

0 Kudos

Actuallay this bapi is already used there..

now the requiremnet is I want to change only certain fields.. and update only that fields. if i use this al the fields will be updated again.

an u help as per this?

0 Kudos

Hi ,

You have to user

BAPI_MATERIAL_SAVEDATA

but with different combinations .

Like if you want update Plant data which resides in MARC table then you have to use

import parameters 

PLANTDATA and PLANTDATAX with your required fields which you want to update , suppose if you want 

update/modify storage location data which resides in MARD table you have use STORAGELOCATIONDATA 

and STORAGELOCATIONDATAX with your required fields which you want to modify .

Like in this way you can use only the required parameter and its flag structure which ends with 'X'.

Regards,

Raghavendra

0 Kudos

Hi Raghavendra,

Thanks for youe information.

But see I want to update only these fields. These are not specific to one structure/table.

Description

UPC Code

MPG

SPPG Price

FS01 Plant Code

Weight and Measures

Suppose for updating upc code if i use clientdata and clientdatax then all the other values in clientdata are also intialized na?

Please suugetme or correct me if am wrong? I need all the other data corresponding to that materil shoild be as it is.

0 Kudos

Hi,

If you are updating upc code in the structure clientdata and clientdatax, then only UPC code will get updated. The rest of the data will remain as it is. The only data for which u pass as 'X' in the structurex in this case upc code in clientdatax, will be updated.

Regards,

Nikhil

0 Kudos

Thank you nikhil..

Former Member
0 Kudos

Using BAPI_MATERIAL_SAVEDATA

Import structures:

Parameter id Reference type Data type Description

HEADDATA LIKE BAPIMATHEAD Header segment with control information

CLIENTDATA LIKE BAPI_MARA Client-specific material data

CLIENTDATAX LIKE BAPI_MARAX Information on update for CLIENTDATA

PLANTDATA LIKE BAPI_MARC Plant-specific material data

PLANTDATAX LIKE BAPI_MARCX Information on update for PLANTDATA

PLANNINGDATA LIKE BAPI_MPGD Planning data

PLANNINGDATAX LIKE BAPI_MPGDX Information on update for PLANNINGDATA

STORAGELOCATIONDATA LIKE BAPI_MARD Storage-location-specific material data

STORAGELOCATIONDATAX LIKE BAPI_MARDX Information on update for STORAGELOCATIONDATA

VALUATIONDATA LIKE BAPI_MBEW Valuation data

VALUATIONDATAX LIKE BAPI_MBEWX Information on update for VALUATIONDATA

SALESDATA LIKE BAPI_MVKE Sales data

SALESDATAX LIKE BAPI_MVKEX Information on update for SALESDATA

STORAGETYPEDATA LIKE BAPI_MLGT Storage-type-specific material data

STORAGETYPEDATAX LIKE BAPI_MLGTX Information on update for STORAGETYPEDATA

Import/export tables:

Parameter id Reference type Data type Description

MATERIALDESCRIPTION LIKE BAPI_MAKT Use for more than one material description translation.

TAXCLASSIFICATIONS LIKE BAPI_MLAN Table for tax classification

RETURNMESSAGES LIKE BAPI_MATRETURN2 Result of calling a function

Former Member
0 Kudos

-