Hi all
I am updating the customer classification with the function module BAPI_OBJCL_CHANGE:
call function 'BAPI_OBJCL_CHANGE'
exporting
objectkey = w_objkey
objecttable = 'KNA1'
classnum = w_classnum
classtype = '011'
keydate = sy-datum
tables
allocvaluesnumnew = i_ze_valnum
allocvaluescharnew = i_ze_valchar
allocvaluescurrnew = i_ze_valcurr
return = i_return.
call function 'BAPI_TRANSACTION_COMMIT'
exporting
wait = c_x.
In addition, I am checking with ENQUEUE_EXKNA1/DEQUEUE_EXKNA1 whether or not the customer master is locked before executing the code above.
The problem is that it happens occasionally that the classification is not being updated even though the correct values are submitted with the function module. The return table brings back the message "Saving changes to assignments". I am not able to create the issue if I run it manually or in debugging mode.
Has anybody experienced the same and eventually got hold of the problem and found a solution?
Thank you,
Daniel