Wednesday, December 22, 2010

  • 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 justifed 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

0 comments:

Post a Comment

Your useful comments, suggestions are appreciated.Your comments are moderated.

Followers

Contact Form

Name

Email *

Message *

Web Dynpro ABAP Book

An SAP Consultant

Follow US


Want to Contribute ?

If you are interested in writing about the new stuff you learn everyday while working, please write to the.sap.consultants@gmail.com.

Click on Contribution for more details.