Login

Login to view more content!!!





Lost Password?
No account yet? Register

Registered Access

Poll

What area of ABAP are you interested in?
 
Home arrow Tips and Tricks arrow General arrow Function modules: Amount and Currency
Function modules: Amount and Currency PDF Print E-mail
User Rating: / 0
PoorBest 
Written by Anon.   
Thursday, 26 February 2009
  • CURRENCY_AMOUNT_SAP_TO_IDOC - Convert currency to IDOC format
  • CONVERT_TO_LOCAL_CURRENCY - Conversion of currency
  • CLOI_PUT_SIGN_IN_FRONT Move the negative sign from the left hand side of a number, to the right hand side of the number. Note that The result will be left justified (like all
    character fields), not right justified as numbers normally are.
  • CONVERT_TO_FOREIGN_CURRENCY Convert local currency to foreign currency.
  • CONVERT_TO_LOCAL_CURRENCY Convert from foreign currency to local currency

 

Example 1: Convert amount to/from string

Amount to string:

CALL FUNCTION 'HRCM_AMOUNT_TO_STRING_CONVERT'
EXPORTING
betrg = 3000
WAERS = 'DKK'
* NEW_DECIMAL_SEPARATOR =
* NEW_THOUSANDS_SEPARATOR =
IMPORTING
STRING = slam.

String to amount:

CALL FUNCTION 'HRCM_STRING_TO_AMOUNT_CONVERT'
EXPORTING
string = slam2
DECIMAL_SEPARATOR = '.'
* THOUSANDS_SEPARATOR =

WAERS = 'HUF'
IMPORTING
BETRG = b2
* EXCEPTIONS
* CONVERT_ERROR = 1
* OTHERS = 2
.

Related Items:

 
< Prev   Next >

Google Search

Statistics

Contribution Activity
Utilities: 41
Tips and Tricks: 362
Sample Code: 174
Total Contributions: 592

Member Activity
Members: 6688 since 2/1/2007!
New: 3 since yesterday!
Visitors: 1981029
We have 3 guests online

Newest Members

Welcome our newest members:

Google Ads