02-11-2013 10:20 AM
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
02-13-2013 4:27 AM
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
02-12-2013 3:04 PM
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
02-12-2013 3:10 PM
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
02-12-2013 3:13 PM
Frank,
You use BAPI_TRANSACTION_COMMIT after BAPI_OBJCL_CHANGE call. Right?
02-13-2013 4:27 AM
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