2006 Sep 25 9:39 AM
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
2006 Sep 25 9:47 AM
hi david,
u can us ethis FM
CURRENCY_AMOUNT_DISPLAY_TO_SAP
rgds
anver
if hlped mark points
2006 Sep 25 9:47 AM
hi david,
u can us ethis FM
CURRENCY_AMOUNT_DISPLAY_TO_SAP
rgds
anver
if hlped mark points
2006 Sep 25 9:48 AM
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.
2006 Sep 25 9:49 AM
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
2006 Sep 25 9:54 AM
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