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

Changing class values with bapi_objcl_change

Former Member
0 Likes
1,286

In the case where you have a numeric value (allocvaluesnumnew-value_from or value_to), that needs to be deleted, the BAPI is converting blank to zero and setting the characteristic value as zero instead of no value. According to the BAPI documentation, the information transferred in this BAPI replaces the old information completely. An empty field means "delete entry", not "no change" (or in this case should not change to zero).

I can not delete the object using bapi_objcl_delete since the material is assigned to a batch and the classification cannot be deleted. Any ideas?

3 REPLIES 3
Read only

nitesh_jain3
Active Participant
0 Likes
767

Dear Kenneth,

The Characteristics whose values r passed during the BAPI_OBJCL_CHANGE call will be updated and the values of the Characteristics not passed will be set to initial status. So u need to pass the values of all the characteristics which should hold values irrespective of the fact not all have changed.

The characteristic does not get deleted from the object.

regards

Nitesh

Read only

Former Member
0 Likes
767

Yes, I'm using BAPI_OBJCL_GETDETAIL to get all the values to pass back, but since the numeric fields of the valuesnum structure are defined as floating point, even characteristics values which previously had no value (blank) are updated to zeroes whan I apply the changes. I'm working on BDC program now since updating through transaction MM02 seems to handle blank values correctly. Thanks for your response.

Regards,

Ken

Read only

Former Member
0 Likes
767

Nevermind, I understand now. If you wish to remove a value for a characteristic you just remove the characteristic entry alltogether from the valuesxxx table that you pass to BAPI_OBJCL_CHANGE.

Thanks,

Ken