Application Development and Automation 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: 
Read only

Material Classifications are disappearing

Former Member
0 Likes
833

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.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
717

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

2 REPLIES 2
Read only

Former Member
0 Likes
718

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

Read only

RaymondGiuseppi
Active Contributor
0 Likes
717

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