This will go into USEREXIT_PRICING_PREPARE_TKOMK of MV45AFZZ.
Please check to make sure that this was written correctly and professionally, as well as for performance optimization.
DATA: I_KNVV LIKE KNVV OCCURS 0 WITH HEADER LINE,
I_VBAK LIKE VBAK OCCURS 0 WITH HEADER LINE.
SELECT * INTO TABLE I_VBAK FROM VBAK.
SELECT * INTO TABLE I_KNVV FROM KNVV
WHERE VKORG = I_VBAK-VKORG AND
VTWEG = I_VBAK-VTWEG.
IF SY-SUBRC = 0.
MOVE KNVV-EIKTO TO TKOMK-ZZEIKTO.
Points will be rewarded.