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

Print prgram

Former Member
0 Likes
693

Hi I am working on smartform and their corresponding report. I have one question that suppose I want to Print this" Rs.10000 and same amount in word also like ten thousand rupees only".

How I will do that.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
671

Hi

U have to convert the amount by SPELL_AMOUNT fm.

Max

Hi I am working on smartform and their corresponding report. I have one question that suppose I want to Print this" Rs.10000 and same amount in word also like ten thousand rupees only".

How I will do that.

5 REPLIES 5
Read only

Former Member
0 Likes
672

Hi

U have to convert the amount by SPELL_AMOUNT fm.

Max

Read only

Former Member
0 Likes
671

Hi abhay,

Try this Fm,

TABLES SPELL.

DATA : T_SPELL LIKE SPELL OCCURS 0 WITH HEADER LINE.

DATA : PAMOUNT LIKE SPELL-NUMBER VALUE '123'.

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.

Thanks.

Reward if helpful.

Read only

Former Member
0 Likes
671

Hi,

use this FM.

1....HR_IN_CHG_INR_WRDS

2.... FM SPELL_AMOUNT

3......chk the program RF_SPELL

pls check this program also

REPORT ZTEST.

data: AMT_IN_NUM like PC207-BETRG.

data: words(200) type c.

AMT_IN_NUM = '57.5'.

CALL FUNCTION 'HR_IN_CHG_INR_WRDS'

EXPORTING

AMT_IN_NUM = AMT_IN_NUM

IMPORTING

AMT_IN_WORDS = words

  • EXCEPTIONS

  • DATA_TYPE_MISMATCH = 1

  • OTHERS = 2

.

IF SY-SUBRC <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

pls give reward if it helpful

Thanks

Vana

Read only

Former Member
0 Likes
671

Hi Abhay,

Use FM

<b>HR_IN_CHG_INR_WRDS

SPELL_AMOUNT</b>

Reward points if helpful.

Regards,

Hemant

Read only

0 Likes
671

hi

use the FM SPELL_AMOUNT

regards,

santosh