Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Function module

Former Member
0 Likes
309

Hi,

i want a function module that convert integer into characher

ex if i give 1 it has to give FIRST and 2 then it has to give SECOND .

or do we have any other way to get that .

Thanks

Gopan

3 REPLIES 3
Read only

former_member187255
Active Contributor
0 Likes
290

Try this.....

DATA:v_curr LIKE SPELL.
clear v_curr.
CALL FUNCTION 'SPELL_AMOUNT'
 EXPORTING
   AMOUNT          = 100
   CURRENCY        = ' '
*   FILLER          = ' '
*   LANGUAGE        = SY-LANGU
 IMPORTING
   IN_WORDS        = v_curr
 EXCEPTIONS
   NOT_FOUND       = 1
   TOO_LARGE       = 2
   OTHERS          = 3
          .
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.

Read only

Former Member
0 Likes
290

Hi Gopan,

go execute the following code

tables : t001.

DATA:v_curr(100).

DATA: spell LIKE spell.

parameters : P_int type i.

CALL FUNCTION 'SPELL_AMOUNT'

EXPORTING

amount = p_int

currency = t001-waers

filler = space

language = sy-langu

IMPORTING

in_words = spell

EXCEPTIONS

not_found = 01

too_large = 02.

MOVE spell-word TO v_curr.

WRITE : V_CURR.

Regards

Sreeni

Read only

Former Member
0 Likes
290
PARAMETERS: amount TYPE bseg-wrbtr DEFAULT '67000.00'.
 
 
DATA hfield TYPE p DECIMALS 0.
TABLES spell.
 
MOVE amount TO hfield.
 
CALL FUNCTION 'SPELL_AMOUNT'
     EXPORTING
          amount   = hfield
*          currency = waers
*         language = 'EN'
     IMPORTING
          in_words = spell.

Regards,

Santosh