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: 

Currency Display to Internal Value

Former Member
0 Kudos
1,158

I have a program that transfers monetary values from one cost centre to another.

When the user is prompted the value is displayed in internal format. They need this changing to how it should be displayed.

I can easily change this to be displayed properly by using WRITE... CURRENCY...

However, when the user then enters the value they wish to transfer how can I translate that back to the internally stored value to compare whether what they are trying to transfer is greater than what they are allowed to?

In summary is there a way to revert the WRITE... CURRENCY... result?

Many Thanks

David

1 ACCEPTED SOLUTION

anversha_s
Active Contributor
0 Kudos
633

hi david,

u can us ethis FM

CURRENCY_AMOUNT_DISPLAY_TO_SAP

rgds

anver

if hlped mark points

4 REPLIES 4

anversha_s
Active Contributor
0 Kudos
634

hi david,

u can us ethis FM

CURRENCY_AMOUNT_DISPLAY_TO_SAP

rgds

anver

if hlped mark points

Former Member
0 Kudos
633

I am not 100% certain about ur requirements but as to my understanding ...you can use the same WRITE statement to convert it back to internal format.

Lets say ur original format was in EUR and the user wanted in USD.

so u used ...

WRITE .. CURRENCY USD.

for converting it back.

WRITE ...currency EUR.

former_member223537
Active Contributor
0 Kudos
633

Hi David,

How about having a variable while displaying the value using WRITE ... CURRENCY. Do not modify the value in internal table, but assign the value from internal table to a variable and then display it.

So the value in internal table wont be converted and can easliy be compared.

Best regards,

Prashant

Former Member
0 Kudos
633

Hi David,

When you use the WRITE... CURRENCY command you are only changing the display of the amount. The value that is stored remains the same. Now when the user enters a value as per the display format it will automatically be stored back in the database in the internal format only. You don't need to revert the statement.

Hope this helps!

Regards,

Saurabh