Application Development 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: 

BAPI_OBJCL_CHANGE old values are empty only new value is filled.

Former Member
0 Kudos

Hello,

I am changing batch characteritcs using BAPI_OBJCL_CHANGE.

The new characterics value is added correctly.
But after the call the values of the old characteristics are empty.

I use the following code.

     REFRESH lt_return.

     CLEAR ls_allchar.

     ls_allchar-charact = 'BM_TYPE'.

     ls_allchar-value_char = ls_zbatch_update-value_char.

     ls_allchar-value_neutral = ls_zbatch_update-value_neutral.

     APPEND ls_allchar TO lt_allchar.

     CALL FUNCTION 'BAPI_OBJCL_CHANGE'

       EXPORTING

         objectkey          = ls_zbatch_update-objnum

         objecttable        = 'MCH1'

         classnum           = ls_zbatch_update-classnum

         classtype          = '023'

       TABLES

         allocvaluesnumnew  = lt_allnum

         allocvaluescharnew = lt_allchar

         allocvaluescurrnew = lt_allcurr

         return             = lt_return.

Does anyone can explain me how i can change this code that the old values does not change.

Thanx in advance

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Use this below BAPI Sequence for your issue .

pass get detail information to change bapi with your new values then Commit  .

" BAPI_OBJCL_GETDETAIL"

"BAPI_OBJCL_CHANGE"

"BAPI_TRANSACTION_COMMIT"

Regard's

Smruti

4 REPLIES 4

Former Member
0 Kudos

I am  shocked i did not get any reply on this.
it is well known that all the old characteristics well disappear if they are not given as parameter to the bapi.
So i have to get them and put them in this bapi tpogether with this new value.
Can some one help me with this

0 Kudos

I'm shocked you get the name of the change BAPI, and you don't find the name of the get detail BAPI.

Regards,

Raymond

0 Kudos

Frank,

You use BAPI_TRANSACTION_COMMIT after BAPI_OBJCL_CHANGE call. Right?

Former Member
0 Kudos

Use this below BAPI Sequence for your issue .

pass get detail information to change bapi with your new values then Commit  .

" BAPI_OBJCL_GETDETAIL"

"BAPI_OBJCL_CHANGE"

"BAPI_TRANSACTION_COMMIT"

Regard's

Smruti