cancel
Showing results for 
Search instead for 
Did you mean: 

Price conditions non modifiable

Former Member
0 Kudos

Sir,

While using T-code VA02, some users are not allowed to edit the condition amount in the "Conditions" Tab i.e. the field of "Amount" for some identified condition types must be in editable mode and for rest all other condition types the field "Amount" must be displayed/gray mode.

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.

the code snapshot is enclosed herewith for needful.

FORM USEREXIT_FIELD_MODIFICATION.

data : v_uname type sy-uname.

if ( sy-tcode = 'VA01' or sy-tcode = 'VA02' ).

select single uname into v_uname

from YUSRS4_KSCHLEDIT

where uname = sy-uname.

endif.

if v_uname is initial.

CASE SCREEN-NAME.

WHEN 'KOMV-KBETR'.

SCREEN-INPUT = 0.

SCREEN-OUTPUT = 1.

ENDCASE.

endif.

ENDFORM.

FORM USEREXIT_PRICING_PREPARE_TKOMP.

data : v_uname type sy-uname.

data : v_kschl type kschl.

if ( sy-tcode = 'VA01' or sy-tcode = 'VA02' ).

select single uname into v_uname

from YUSRS4_KSCHLEDIT

where uname = sy-uname.

endif.

IF NOT V_UNAME IS INITIAL.

LOOP AT XKOMV.

v_kschl = XKOMV-KSCHL.

IF ( v_KSCHL = 'ZR00' or v_KSCHL = 'ZFR1' ).

XKOMV-KMANU = 'C'.

MODIFY XKOMV transporting kmanu.

ENDIF.

clear:v_kschl,XKOMV.

ENDLOOP.

ELSE.

LOOP AT XKOMV.

v_kschl = XKOMV-KSCHL.

IF ( v_KSCHL = 'ZR00' or v_KSCHL = 'ZFR1' ).

XKOMV-KMANU = 'D'.

MODIFY XKOMV transporting kmanu.

ENDIF.

clear:v_kschl,XKOMV.

ENDLOOP.

ENDIF.

ENDFORM.

Please help.

Regards,

+91-9650493434/9650493432

Accepted Solutions (0)

Answers (1)

Answers (1)

Lakshmipathi
Active Contributor
0 Kudos

Better you post in ABAP forum

thanks

G. Lakshmipathi