2018 Dec 12 12:13 PM
Hello Experts,
I'm regarding your help according to a problem I encountered as I tried to change characteristics via a custom report.
I'm using instances of the class CL_CHR_MAIN to get characteristics and add/change characteristic values and characteristic value descriptions. To achieve this, I use the methods, which the class implements (set_values, set_valuedescriptions and post).
Up to this point I have no problems and when I debug the program everything looks fine to me (table-entry within the object is done and changed-flag is set)...
Now the problem:
We're using changing numbers for saving the modifications on characteristics. When I'm using the change numbers within the transaction CT04, I can use one change number several times to save modifications on one characteristic (for different characteristic values or their descriptions) and all changes get applied.
But if I'm running my program multiple times, all previous changes from the same change number get removed before saving the new value / value description. This problem occurs at the time, when I execute "commit work". The outcome is the same as if I would call transaction "CCUNDO" and then go to CT04 to apply new "first" changes for the combination of the change number with the characteristic.
I can't explain myself what I'm missing for applying the changes with a change number the same way that the transaction CT04 does.
Is there some step I miss before executing "commit work"?
Thanks in advance.
2018 Dec 12 12:33 PM
Any reason you use direct call of this class which is behind many BAPI_CHARACT_* FM, and not those FM, did you compare your code with the code executed by a BAPI such as BAPI_CHARACT_CHANGE or CREATE?
2018 Dec 12 12:33 PM
Any reason you use direct call of this class which is behind many BAPI_CHARACT_* FM, and not those FM, did you compare your code with the code executed by a BAPI such as BAPI_CHARACT_CHANGE or CREATE?
2018 Dec 12 2:34 PM
Hello Raymond,
thanks for your fast respond.
I tried to use these BAPIs before, but they didn't worked properly for me the first time. Then I went on using the class directly.
Anyway... As you mentioned the FM, I tried it again with BAPI_CHARACT_CHANGE and it went well - seems like I did some mistakes before at filling in the parameters.
Thank you very much!