cancel
Showing results for 
Search instead for 
Did you mean: 

convertion of integer data into relevant text

Former Member
0 Kudos

hi

i would like to know if its possible to convert a data given as an integer in the parameter field to its relevant text.

thanks,

jyothi

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Use the Function Module:- SPELL_AMOUNT to get the spelling of the number entered.

e.g

Input 100

Output One hundred

If you want to change the data type from number to char then directly assign it to a variable of type char.

Hope this is helpful.

Regards,

Sameena

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

If you want to convert the number into corresponding text,

you can use FM

<b>SPELL_AMOUNT.</b>

If you just want to assign integer value to string, you can directly assign or use MOVE.

Regards,

Shashank

Former Member
0 Kudos

hi Jyothi,

WELCOME TO SDN

you can use<b> CASE ENDCASE</b> Statement for that ...i.e, based on the value that u give as a parameter in a selection screen and display the text accordingly....

Regards,

Santosh

Former Member
0 Kudos

Hi,

Use the FM : SPELL_AMOUNT

DATA amt TYPE i VALUE '1000'.
DATA words LIKE SPELL.

CALL FUNCTION 'SPELL_AMOUNT'
 EXPORTING
   AMOUNT          = amt
   LANGUAGE        = SY-LANGU
 IMPORTING
   IN_WORDS        = words
          .
WRITE words-word.

Regards,

Wenceslaus

Former Member
0 Kudos

yes use direct assignment to char variable of lenght u want

or if u want number to relevent word then use

i.e 1-> one

2-->two

then use follwing function module

HR_IN_CHG_INR_WRDS -


number (price) to words.

SPELL_AMOUNT -


Same

Message was edited by: Manoj Gupta