09-12-2006 2:58 PM
Hi all,
Is there any function module can convert number to string and convert string to number?
Thank you.
09-12-2006 3:02 PM
09-12-2006 3:02 PM
You can directly assign a number to a string.
CONVERT_STRING_TO_INTEGER
is an fm to convert string to integer.
WOSI_CONVERT_STRING_TO_NUM
also does the same.
09-12-2006 3:02 PM
09-12-2006 3:02 PM
09-12-2006 3:03 PM
number to string
REPORT ZSPELL.
TABLES SPELL.
DATA : T_SPELL LIKE SPELL OCCURS 0 WITH HEADER LINE.
DATA : PAMOUNT LIKE SPELL-NUMBER VALUE '1234510'.
SY-TITLE = 'SPELLING NUMBER'.
PERFORM SPELL_AMOUNT USING PAMOUNT 'USD'.
WRITE: 'NUMBERS', T_SPELL-WORD, 'DECIMALS ', T_SPELL-DECWORD.
FORM SPELL_AMOUNT USING PWRBTR PWAERS.
CALL FUNCTION 'SPELL_AMOUNT'
EXPORTING
AMOUNT = PAMOUNT
CURRENCY = PWAERS
FILLER = SPACE
LANGUAGE = 'E'
IMPORTING
IN_WORDS = T_SPELL
EXCEPTIONS
NOT_FOUND = 1
TOO_LARGE = 2
OTHERS = 3.
ENDFORM. " SPELL_AMOUNT
09-12-2006 3:04 PM
Hi Use this Fm to do that.
CONVERT_STRING_TO_INTEGER
JUST pass string variable to this you will get int valueregards
rgds
anver
07-10-2007 8:09 AM