Application Development and Automation 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: 
Read only

Function Modules for local currency convertions

Former Member
0 Likes
876

HI,

could you please tell me Functional module to convert local currency to foreign .

i have found one but i dont think its useful.. plz give me in brief detail abt it,

if any code is there,, it would be grateful.

thanks & regards

syedtaj

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
717
5 REPLIES 5
Read only

Former Member
0 Likes
717

Hello ,

try Fm CONVERT_TO_FOREIGN_CURRENCY and see its documentation.

regards

Prabhu

Read only

0 Likes
717

Hi prabhu garu,

actually i got that function module but iam not getting .

my problem is in table ekpo field netwr(net order value) is in usd. i found it is in usd by seeing the field in ekko-waers

so iam displaying it in alv but in alv display my last field should be local currency .

am confusing in this ,

so plzz help me to solve this .

thanks

Read only

0 Likes
717

Hello ,

so whats ur local currency ? , u can use any FM but u need to provide bothe source & target currency keys............

u have to get local currency key based on the company code.... so goto t001 with given company then get local currency key value and finally call that FM to convert.

regards

Prabhu

Read only

Former Member
0 Likes
718
Read only

Former Member
0 Likes
717

hi,

use the function module 'CONVERT_TO_FOREIGN_CURRENCY'.

sample code..

CALL FUNCTION 'CONVERT_TO_FOREIGN_CURRENCY'

EXPORTING

DATE = BKPF-WWERT

FOREIGN_CURRENCY = BKPF-WAERS

LOCAL_CURRENCY = T001-WAERS

LOCAL_AMOUNT = BSEG-DMBTR

RATE = BKPF-KURSF

TYPE_OF_RATE = 'M'

IMPORTING

EXCHANGE_RATE = KURS

FOREIGN_AMOUNT = BSEG-WRBTR

FOREIGN_FACTOR = FAKTOR-F

LOCAL_FACTOR = FAKTOR-L

EXCEPTIONS

NO_RATE_FOUND = 4

NO_FACTORS_FOUND = 8.

Have a look at the below link for an example.

https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/fm%2bcurrency%2bconversion

hope this will help you

Regards,

Kiran

hope this will help you..