2014 May 19 4:56 PM
We have a program that receives ECO data from a PLM system in the form of XML files, and updates the material master with the data received. To update material classifications we are calling BAPI_OBJCL_CHANGE. When we pass a characteristic name and value to the BAPI in the ALLOCVALUESCHARNEW, it dutifully adds or changes that classification. However, all of the classifications that were there previously and were not supposed to be changed are wiped out. Looking at the comments at the beginning of the source code for the BAPI, it seems to indicate that classifications in the old data that are not in the new data are deleted. Is this what is happening? Do I have to pass a complete list of existing classifications to the BAPI even though I do not intend to change them? If this is correct, I have two questions:
1. Is there a different BAPI I can use to change material classifications that will not delete other existing classifications?
2. Assuming the answer to 1 is no, what is the best way to retrieve the existing classifications so that I can pass them back into the BAPI?
Thank you for any help you can give me.
2014 May 20 3:27 PM
Hi Keith,
We use BAPI_OBJCL_CHANGE to change characteristic values but first we read their values with BAPI_OBJCL_GETCLASSES.
So, first get all values in allocvalueschar/num/curr from ..._getclasses, change them accordingly and use them in ..._change.
regards,
Edgar
We have a program that receives ECO data from a PLM system in the form of XML files, and updates the material master with the data received. To update material classifications we are calling BAPI_OBJCL_CHANGE. When we pass a characteristic name and value to the BAPI in the ALLOCVALUESCHARNEW, it dutifully adds or changes that classification. However, all of the classifications that were there previously and were not supposed to be changed are wiped out. Looking at the comments at the beginning of the source code for the BAPI, it seems to indicate that classifications in the old data that are not in the new data are deleted. Is this what is happening? Do I have to pass a complete list of existing classifications to the BAPI even though I do not intend to change them? If this is correct, I have two questions:
1. Is there a different BAPI I can use to change material classifications that will not delete other existing classifications?
2. Assuming the answer to 1 is no, what is the best way to retrieve the existing classifications so that I can pass them back into the BAPI?
Thank you for any help you can give me.
2014 May 20 3:27 PM
Hi Keith,
We use BAPI_OBJCL_CHANGE to change characteristic values but first we read their values with BAPI_OBJCL_GETCLASSES.
So, first get all values in allocvalueschar/num/curr from ..._getclasses, change them accordingly and use them in ..._change.
regards,
Edgar
2014 May 20 3:49 PM
Read first document 1664967 - Updating characteristics values on technical objects via BAPI_OBJCL_CHANGE and/or note 922075 - BAPI_OBJCL_CHANGE - Char value assignments disappear.
So first call BAPI_OBJCL_GETDETAIL change data, and then call BAPI_OBJCL_CHANGE.
Regards,
Raymond