09-17-2006 7:12 PM
Hi,
Can anybody tell me predefined BAPI for change and creation of Materialmasterand Pricing?
Thanks & regards,
Gopianne.
09-17-2006 9:01 PM
Hi Gopianne,
There's a BAPI called BAPI_MATERIAL_SAVEDATA (if u use it as a function from inside SAP. it also has an ALE message type MATMAS_BAPI for incoming IDOCs, if u know what that is, if not - just use the function module). BTW, it can b used to <i>create and change</i> as well.
It's very simple - fill the headdata structure with the data u know that is required for creating a material, than fill the structures u need by the names (e.g: plantdata contains data at plant level, which is mostly the data saved in table MARC. storagelocationdata contains data at storage location data saved in table MARD, etc).
Be sure to marc the corresponding field u wish to update in the same structure with the X at the end (if u put a value in plantdata-mrpprofile, u first have to fill field <i>plant</i> in plantdata <u><i>and</i></u> in plantdatax structures - as it is the key, and then add an X in each field in plantdatax field which u filled in plantdata).
Good luck
Igal
pls reward if helps
09-17-2006 9:56 PM
you can use the BAPI to BAPI_MATERIAL_SAVEDATA create as well as to change material master.
When changing material master data, you need enter only the material
number.
In the header data, you must select at least one view for which data is
to be created. Depending on the view selected, you must maintain other
required parameters. If you do not enter values for all of the required
parameters, the method is ended with an error message.
The corresponding fields in the tables (such as CLIENTDATA) must first
be supplied with data by the calling program. An indicator must also be
set for each of these fields so that the data is written to the database
by the method. This requires the calling program to supply the
corresponding field with the indicator in a checkbox table (for example,
CLIENTDATAX). Checkbox tables exist for tables that do not contain any
language-dependent texts (MAKT, MLTX), International Article Numbers
(MEAN), or tax classifications (MLAN). Several data records for a
material can be created in these tables.
regards
vivek
reward points if it helps
09-18-2006 3:02 AM
Hi,
Try BAPI_MATERIAL_SAVEDATA.
BAPI_MATERIAL_SAVEDATA is used to create new material master data or to change existing material master data.
Refer to function module documentation for a detailed explanation.
Hope this helps.
Regards
Swathi