on 03-12-2007 10:57 AM
hi friends,
here i am displaying amount in words(USD)
i am getting the out put but
in output i am not getting cents, i am getting only dollors
for eg 100.32
i have to display one hundred dollors and thirty two cents
can anyone help me out to try this issue.
thanks,
check sample program
RF_SPELL
Regards
Prabhu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi eswar
to get the decimal currency you need to create one transparent table named zcurr_text
with feilds mandt,spras,waers and ktext for ktext give the data element as char40
now create entries for example INR with Paise and for US create Cents.
now in the program lines
select ktext from zcurr_text into table it_dec_curr
where spras = 'EN'
and waers = 'USD'.
now concatenate all the four variable (two variable from spell_amount FM and one for unit currency and the other decimal currency for which the above code is ) into one char variable of length char250 and display it in the output.
kindly revert back if you have any doubts.
Reward points if helpful
Regards
Zarina
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Try like this:
split v_amount at '.' into v_number v_decimal.
call function spell_amount and pass v_number and get the value in V_no_wrd.
v_first = v_decimal DIV 10.
v_second = v_decimal MOD 10.
select single WORT into v_wort from T015Z where spras = en
einh = v_first
ziff = v_second.
Now concatenate all
concatenate v_ no_wrd 'DOLLORS' v_wort 'cents' into v_spell_amt.
write v_spell_amt.
Br,
Laxmi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Venkat,
You can use the FM SPELL_AMOUNT to convert figure to words. Then you will have to put the the field SPELL-WORD as Dollars and SPELL-DECWORD as cents.
Reward if this helps.
Regards
Anurag
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
78 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.