Dear Experts,
I have created a customized routine 9XX that would calculate the Condition Value, if the value is not 0 for the Exch.rate-acct. field on the Financial Accounting tab on the Sales Order header.
My routine code is as follows:
if komk-kurrf ne '0.00000'.
if sy-subrc = 0.
temp_val = ( komp-mglme * xkomv-kbetr ) / 1000.
xkwert = ( temp_val * komk-kurrf ) / 100000.
xkomv-kwert = xkwert.
modify xkomv.
endif.
endif.
However, the calculated value is not reflected in the Condition Value column during Sales Order creation, change or view. I have included my routine to the condition type in tcode V/O8.
Per my checking, the routine appears in the include list for the main program SAPLV61A.
When I debug, I found that the value in structure xkomv is overridden by value in structure rettkomv, because wertformel = space.
I have gone through the messages below but I am still stuck:
1. losing-values-in-xkomv-structure
2. How to set condition rate using VOFM pricing formula
I'd appreciate your assistance.
Thank you.
HJMY