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

BAPI_OBJCL_CHANGE lose data???

former_member1137458
Participant
0 Likes
2,115

MSC3N:

Characteristic:

Z_ABC =

Z_XY = 123

when call "BAPI_OBJCL_CHANGE " to update characteristic (Z_ABC) value successfully

Z_XY will auto change to NULL empty

why?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,519

Look in the documentation.

if you want to change some charracteristic value , you need to enter all the characteristic value again. With Bapi_objcl_change if there was an value assgined to a characteristic and you didn't enter it again with the bapi, value will be changed to Null.

Call bapi 'BAPI_OBJCL_GETCLASSES' before you call BAPI_OBJCL_CHANGE and change/add the characteristic values to the internal tables

4 REPLIES 4
Read only

Former Member
0 Likes
1,519

Take a look at the source code. There are comments that explains why it happened.

In other words: works as intended...

Read only

Former Member
0 Likes
1,520

Look in the documentation.

if you want to change some charracteristic value , you need to enter all the characteristic value again. With Bapi_objcl_change if there was an value assgined to a characteristic and you didn't enter it again with the bapi, value will be changed to Null.

Call bapi 'BAPI_OBJCL_GETCLASSES' before you call BAPI_OBJCL_CHANGE and change/add the characteristic values to the internal tables

Read only

Former Member
0 Likes
1,519

Hi,

The working behaviour of this BAPI is like that.

When ever you are changing the characterisitics it will delete the previous one and update the current one which you are giving.

So you need to get the previous updated characteristics and then update with the new & previous one.

With Regards,

Sumodh.P

Read only

0 Likes
1,519

Hi Friends,

I am facing the same problem while updating the Material Characteristics . For this i've done the following steps

1.* Get the classfication description defined for the newly

  • created material from

call function 'CLAF_CLASSIFICATION_OF_OBJECTS'

2.loop at itab_obj_data.

case itab_obj_data-atnam.

when k_ppi_us_price.

endcase.

clear: gs_valueschar.

endloop.

3.call function 'BAPI_OBJCL_CHANGE'

exporting

objectkey = g_objectkey

objecttable = k_objecttable

classnum = k_classnum

classtype = k_classtype

status = '1'

keydate = sy-datum

tables

allocvaluesnumnew = itab_valuesnum

allocvaluescharnew = itab_valueschar

allocvaluescurrnew = itab_valuescurr

return = itab_return.

Can any one tell the alternative methods?

Edited by: beeru yadav on Feb 3, 2011 7:12 AM