Skip to Content
0

User EXIT COPA002 - For calculating particular value fields

Dec 26, 2016 at 07:29 AM

71

avatar image
Former Member

Dear SAP experts,

We use above user exit for calculating two value fields in COPA. But unfortunately the values gets updated only in particular value fields.

Explanation in detail

Function module :

EXIT_SAPLKEAB_002 -

User Exit for Planning Data valuation.

Standard-Mengeneinheit aus MARA + Standardmenge aus MARM
ce1_1000-vv005_me = mara-meins.
SELECT *
into marm
FROM marm
WHERE matnr = ce1_1000-artnr
AND meinh = 'M3'.
ce1_1000-vv005 = ce1_1000-vv002 * marm-umrez / marm-umren.
ENDSELECT.

ce1_1000-vv004 = 0.
SELECT * FROM marm
into marm
WHERE matnr = ce1_1000-artnr
AND meinh = 'PK'.
ce1_1000-vv004 = ce1_1000-vv005 * marm-umren / marm-umrez.
ce1_1000-vv004_me = 'PK '.
ENDSELECT.

ce1_1000-vv028 = 0.
SELECT * FROM marm
into marm
WHERE matnr = ce1_1000-artnr
AND meinh = 'PAL'.
ce1_1000-vv028 = ce1_1000-vv005 * marm-umren / marm-umrez.
ce1_1000-vv028_me = 'PAL'.
ENDSELECT.

Here Value field VV004 & VV028 is calculated based on this exit. Both are quantity fields and their base value is VV005. VV004 - PK & VV028 - PAL

Problem here , VV0028 is updated as PAL and VV004 is not updated.

Kindly help me out in this issue.

regards,

Karthik

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

0 Answers