Skip to Content
0
Former Member
Aug 06, 2014 at 02:50 PM

VA02 Price conditions is not modifiable same working in va01

1455 Views

Hi Experts ,

Howerver we tried the user-exit include MV45AFZZ and used the FORMS ( USEREXIT_FIELD_MODIFICATION and USEREXIT_PRICING_PREPARE_TKOMP ) to meet the requirement. the changes are working in VA01 but working improperly in VA02.

when i run the tcode VA02 by giving the Sales order no xxxx, I click on "Conditions" Tab to see the pricing conditions, I found that the field "Amount" is editable for condition type "xxxx" and "xxxx" wheras this these two condition types must be only editable for identified users only. for rest users, it must be disable mode."

the same is working in VA01 but not in VA02.


Please find the code below .



Validation for user profile

IF lt_profile[] IS NOT INITIAL.

REFRESH: lt_agr_1016[].

SORT: lt_profile BY bapiprof.

SELECT agr_name profile

FROM agr_1016 INTO TABLE lt_agr_1016

FOR ALL ENTRIES IN lt_profile[]

WHERE agr_name = lc_agr_name

AND profile = lt_profile-bapiprof.


IF lt_agr_1016[] IS NOT INITIAL.

LOOP AT xkomv INTO lwa_xkomv.

lv_index = sy-tabix.

lwa_xkomv-kmanu = 'D'.

MODIFY xkomv FROM lwa_xkomv INDEX lv_index TRANSPORTING kmanu.

CLEAR: lv_kschl, lwa_xkomv, lv_index.

ENDLOOP.

ENDIF.

Please help us to achieve the requirement

Regards

Ravi