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: 

Currency fields

Former Member
0 Kudos

Hi experts,

I am facing following problem:

In my report I need some data from the table mbew. I need the value in field stprs. Where can I find the reference currency in this field and how can I convert it to dollar for using it in my smartform.

Thanks a lot for your help,

Christoph

6 REPLIES 6

Former Member
0 Kudos

>

> Hi experts,

>

> In my report I need some data from the table mbew. I need the value in field stprs. Where can I find the reference currency in this field and how can I convert it to dollar for using it in my smartform.

> Christoph

you can find reference field in mbew table itself (currency/quantity fields)

t001-->WAERS

Please search SDN for FM-convert currency (SD_CONVERT_CURRENCY)

or se37> convertcurrency*>press f4 you can see lot FM,choose as per your requirement

Former Member
0 Kudos

Hi Christoph

Just go to table MBEW ,

there If you double click on the field STPRS , it will open another window where you will find teh information you need.

Also while being on the field STPRS in MBEW, if you click on the button Currency/Quantity Fields(Upper right corner) , then also you will get the information about the referenced field.

I hope this is what you are looking for...

Regards,

Uma Dave

0 Kudos

Hi,

thanks for the information so far. I found the currency in table t001 --> that´s fine. But I don´t know how I can convert the currency (CHF) to USD. I used different function modules, but it does not work.

Thanks for your help,

Christoph

0 Kudos

Hi Christoph,

If you have any correct test data with you then you can check out in standard transactions , there you will get the exact factor used for conversion and you can accordingly calculate the amount and then hard code currency as USD

You can also try using this function module

CALL FUNCTION 'CONVERT_TO_LOCAL_CURRENCY'

EXPORTING

  • CLIENT = 001

date = sy-datum

foreign_currency = wa-waers

local_currency = tcurr-fcurr

foreign_amount = wa-dmbtr

  • RATE = 0

type_of_rate = 'M'

  • READ_TCURR = 'X'

IMPORTING

exchange_rate = tcurr-ukurs

  • FOREIGN_FACTOR =

local_amount = wa-total

  • LOCAL_FACTOR =

  • EXCHANGE_RATEX =

  • FIXED_RATE =

  • DERIVED_RATE_TYPE =

EXCEPTIONS

no_rate_found = 1

overflow = 2

no_factors_found = 3

no_spread_found = 4

derived_2_times = 5

OTHERS = 6

Regards,

Uma

Edited by: UmaDave on Jun 2, 2010 10:30 AM

0 Kudos

The exchange rates are maintained in the table TCURR. Check in TCURR if the rates are maintained for CHF --> USD.

0 Kudos

Hi, thanks for your replies.

It is working now.

Christoph