Skip to Content

Update the "Revaluation Reason" in MR21

Jun 06, 2017 at 01:10 PM


avatar image

Hi experts,

I need to update the field "Revaluation Reason" (KONGR) for a price change in MR21. The current code is using the FM "BAPI_MATVAL_PRICE_CHANGE" to update the Moving Average Price. However, this BAPI doesn't have this field available for updates.

Do you know any other FM/BAPI/etc. that I could be using to update this field?

Thank you in advance!


10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Raymond Giuseppi
Jun 06, 2017 at 01:40 PM

The BAPI use the FM CKML_MATVAL_PRICE_CHANGE which then call the FM PRICES_POST without passing the PRICES_POST parameter...

Show 6 Share
10 |10000 characters needed characters left characters exceeded

Hi Raymond,

Thank you for your help.

In this case, what would you suggest?


Many solutions... I you have no idea, then try a Z_BAPI wrapper of the BAPI, that add the missing parameter, export/save it somewhere, and look for the best enhancement point in standard code to import/read the value(s) and use those, e.g. at start of PRICES_POST?


Have you tried this one: BAPI_MATVAL_DEBIT_CREDIT?

This BAPI has the field I need, but I don't know if it will do the trick. Will check! Once again, thank you for your help.


I din't try this one as my oldest system is yet in Ehp4 (...) so I'm not allowed to multiply the developments...


Nope... BAPI_MATVAL_DEBIT_CREDIT didn't work as expected. Actually, it's running MR22 instead of MR21, and we don't have the field "Revaluation Reason" in MR22. I also looked for some enhancement point to implement what you suggested but there is nothing available.


So creation of a wrapper Z_BAPI with the reason parameter, export value to memory before calling the standard BAPI, implict enhancement point at start of PRICES_POST there read from memory, override and clear memory, you could even check that the Z_BAPI is active in the Abap stack to prevent problems.