Skip to Content
0
Former Member
Jan 02, 2018 at 06:54 AM

Pricing procedure calculation type RV64A908 not working as desired

223 Views

Dear All

I have a requirement in which we need the difference between the 2 condition types ZABC and ZXYZ in 3rd condition type ZDEF.

We have assigned one calculation type

RV64A908 to condition type ZDEF and have written below code :

*populate the ZDEF with difference between ZABC and ZXYZ
IF xkomv-kinak NA 'AKLMXZ'.
loop at xkomv INTO ls_xkomv_zabc
WHERE kposn = komp-KPOSN and
kschl = 'ZABC' and
kinak na 'AKLMXZ'.
endloop.

LOOP at xkomv INTO ls_xkomv_zxyz
WHERE kposn = komp-kposn
and kschl = 'ZXYZ'
and kinak NA 'AKLMXZ'.
endloop.

* populate the difference
xkwert = ls_xkomv_zabc-kwert - ls_xkomv_zxyz-kwert .
xkomv-kwert = xkwert.

But the above code is not working and we are not getting the difference values . Kindly advice what variables should be updated so that we will get the difference . Thanks in advance.