‎2009 Apr 16 12:58 PM
Hi,
Please help me know a the FM to convert data in the following way
i/p: 2510.15
o/p:+00000000251015
i/p: -12.45
o/p:+00000000124500
Thanks & Regards
ChK
‎2009 Apr 16 1:00 PM
Hi Harsha,
CURRENCY_AMOUNT_SAP_TO_IDOC - Convert currency to IDOC format
CONVERT_TO_LOCAL_CURRENCY - Conversion of currency
HRCM_AMOUNT_TO_STRING_CONVERT - Convert amount to string
HRCM_STRING_TO_AMOUNT_CONVERT - Convert amount from string
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
Another as per your Requirement...
Language Dependent Formatting of Amount and Currency
To format a currency amount with decimals according to the currency use WRITE and the CURRENCY option.
Currency keys an d numbers of decimals are defined in table TCURX Decimal Places in Currencies.
Example 1: Formatting an amount in Kuwatian Dinars:
Dmbtr = 123456.
Write dmbtr currency 'KUD'
123.456
Write dmbtr currency 'USD'
1234.56
Note that the formatting does not depend on the number of decimals in the number in the program.
Dmbtr = '12.3456'.
Write dmbtr currency 'USD'
1234.56
Regards,
Prabhudas
‎2009 Apr 16 1:01 PM
dear use this funtion module
HR_NZ_ROUNDING_DECIMALSrgds ankit
‎2009 Apr 16 1:03 PM
Multiply the value by 100 and use FM CONVERSION_EXIT_ALPHA_INPUT
‎2009 Apr 16 1:08 PM
Use the FM CONVERSION_EXIT_ALPHA_INPUT to get leading zeroes for the variable
‎2009 Apr 16 3:59 PM
You requirement seems to be weird !
how do you distinguish between negative and positvie numbers.
Can you specify the requirement precisely
Regards,
Lalit Mohan Gupta.
‎2009 Apr 16 4:04 PM
Hi,
Use this functionmodule to convert it into string
HRCM_AMOUNT_TO_STRING_CONVERT
and then use CONVERSION_EXIT_ALPHA_INPUT
to keep leading zeros
Regards
Krishna
‎2009 Apr 17 6:53 AM