Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Changing the currency of condition value according to amnt curr in VA01

Former Member
0 Kudos

Hi all,

In VA01 when we select the condition type as EDI2 and change the currency to USDN the currency type in condition value should also be changed to USDN.

Thanks & Regards

Jerry

2 REPLIES 2

Former Member
0 Kudos

Hi all,

I am using the user exit form userexit_change_pricing_rule but only able to get the USDN value in amount field of EDI2 condition but the condition value currency remains as USD.

LOOP AT XKOMV WHERE KSCHL = 'EDI2'.

XKOMV-WAERS = 'USDN'.

MODIFY XKOMV TRANSPORTING WAERS .

SELECT WAERS FROM tcurc INTO xkomk-waerk where waers = xkomv-waers.

endselect.

komk-waerk = xkomk-waerk.

ENDLOOP.

0 Kudos

Hi all,

I found the solution with the user exit userexit_field_modific_kzwi but the problem is when I enter the condition type as EDI2 as enter any amount in the amt field with the USDN as currency then condition value currency of all the condition types is changed to USDN automatically.

Your answers will be rewarded.

LOOP AT XKOMV .

CASE XKOMV-KSCHL.

WHEN 'EDI2'.

XKOMV-WAERS = 'USDN'.

MODIFY XKOMV INDEX SY-TABIX TRANSPORTING WAERS .

KOMK-WAERK = XKOMV-WAERS.

CLEAR XKOMK-WAERK.

WHEN OTHERS.

*komk-waerk = 'USD'.

ENDCASE.

ENDLOOP.

Thanks & Regards

Jerry