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

numeric to character conversion

Former Member
0 Likes
1,451

How to convert the numeric to character format? give me function module.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,361

hi,

U can use SPELL_AMOUNT.

How to convert the numeric to character format? give me function module.

6 REPLIES 6
Read only

Former Member
0 Likes
1,362

hi,

U can use SPELL_AMOUNT.

Read only

Former Member
0 Likes
1,361

Just assign.

V_char = v_num.

if it is an amount type field, then use write statement

write v_amount to v_char.

Regards,

Ravi

Read only

Former Member
0 Likes
1,361

Hi

Why do reuire a fun module for this

just assign the numeric field to char field

V_CHAR = V_NUMC.

<b>Reward points for useful Answers</b>

Regards

Anji

Read only

Former Member
0 Likes
1,361

have you tried like this

REPORT YCHATEST.

DATA : V_NUM TYPE I VALUE 245,
       V_CHAR(5).

V_CHAR = V_NUM.

WRITE : V_CHAR.

Read only

Former Member
0 Likes
1,361

Hi,

Please do the following.

DATA : v_char(10) type c,

v_numc(10) type N.

V_numc = 10000.

v_char = v_numc.

write:/ v_char.

Read only

Former Member
0 Likes
1,361

Hi,

please check out the below program it will help you

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

***********please reward points if the information is helpful to you*******************