01-09-2015 3:58 AM
Hi Team,
I am using the BAPI "BAPI_MATERIAL_SAVEDATA" to extend the plant data (MARC table fields). In this BAPI, i have the section "PLANTDATA" & "PLANTDATAX".
I would like to update the "MRP Controller" as "010", "MRP Type" as "PD", Lot Size as "FX" and Schedule Margin key as "030" & execute the BAPI, i am getting the below error.
Message: "Key fields for use data PLANTDATA and checkbox structure PLANTDATAX are different"
What is the importance of the section "PLANTDATAX"?
How to solve this?
Thanks
01-09-2015 4:53 AM
Hi sk ,
same data you have to pass , plantdata as well as plantdatax.
compare field by field can find the solution.
At the same please check , in header data are you passing platadata value.
Regards,
Krishna
01-09-2015 5:30 AM
Hi Krishna,
I am executing this BAPI in SE37. In the "PLANTDATAX" section, we can pass only one character (Eg: X). How can i pass the same value "Plantdata" as well as "Plantdatax"?
Shall i pass "X" in the section "Plantdatax"?
Thanks
01-09-2015 5:37 AM
Hi ,
ex:
1) in plant data
plant =1111.
mrptype = 01.
pur_grp = 100.
2) in plantdatax
plant = 1111.
mrptype = 'X'.
pur_Grp = 'X'.
..
like this you have to pass.
Regards,
Krishna
01-09-2015 8:13 AM
Hi Krishna,
Thank you for your clarification.
Can you please let me, What is the importance of passing "X" in the "Plantdatax" section?
Suppoes, if input as below & execute the BAPI, will it be error?
in plant data
plant =1111.
mrptype = 01.
pur_grp = 100.
2) in plantdatax
plant = 1111.
mrptype = 'X'.
pur_Grp = ' '.
Thanks
01-09-2015 8:25 AM
Hi SK,
When you pass 'X' to a field in plantdatax structure, then only respective value passed in plant data is updated to the database.
In the above example you have mentioned, only MRPTYPE 01 is updated to database. as pur_grp in plantdatax is blank... even though you have passed 100 in plantdata strucure... database will not be updated .
if you dont update plantdatax structure, system will not consider for changes. So please pass X for all the fields you need to change in plantdata .
From BAPI documentation:
This (checkbox) structure determines which fields in the assigned user data structure (PLANTDATA) contain change-relevant information.
This makes it possible to supply valid values only to the relevant fields in the assigned user data structure. These fields are then selected in the checkbox structure, ensuring that all nonselected fields retain their current value in the database.
Hope this helps.
Regards
Sri
01-09-2015 8:32 AM
Hello SK
datax tells to the BAPI which fields should be managed
In your example, MRP Type will be updated, Purchase Group not, since in DATAX you are "saying" that PUR_GRP = ' ' (not to be managed)
01-09-2015 8:45 AM
Hi SK,
BAPI_MATERIAL_SAVEDATA - Function module used to Create and Change Material Master Data.
Below is a brief description of the FM Functionality :
You use this method to create new material master data or to change existing material master data. The data on a material can be transferred for each call.
When creating material master data, you must transfer the material number, the material type, and the industry sector to the method. You must also enter a material description and its language.
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 PLANTDATA) 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, PLANTDATAX).
Thanks & Regards,
Seshadri..