on 01-03-2008 6:40 AM
Hi to all,
Here my requirement is to display puchage order number,date,amount for individual order and total purchage order amount in same window in decimal format and i want to display this purchage order total amount in text format in another window ,is it possible or not
please give solution asap urgent.
regards,
surya.
use fm "Spell_amount"
DATA int_betrag LIKE payr-rwbtr value '1000'.
DATA up_spell LIKE spell.
data par_waer LIKE payr-waers value 'INR'.
CALL FUNCTION 'SPELL_AMOUNT'
EXPORTING
amount = int_betrag
currency = par_waer
IMPORTING
in_words = up_spell
EXCEPTIONS
OTHERS = 1.
Edited by: Madhavi t on Jan 3, 2008 7:42 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Surya
It is possible ....jst call the routine in script..
/:PERFORM SPELL_AMOUNT IN PROGRAM ZXYZ
/:USING ®UD-SWNES&
/:USING ®UD-WAERS&
/:CHANGING &WORDS&
/:CHANGING &DECIMAL&
/:CHANGING &WAERS&
/:ENDPERFORM
P1 <C1>&WORDS& AND &DECIMAL&
....and write the code in tht routine program....
data: it_spell like spell.
data: swnes type regud-swnes,
waers type regud-waers,
var1(20) type c,
var2(20) type c.
&----
*& form spell_amount
&----
text
----
-->input text
-->output text
----
form SPELL_AMOUNT tables input structure itcsy
output structure itcsy.
read table input index 1.
input = swnes.
replace all occurrences of '*' in input-value with space.
shift input-value left deleting leading space.
translate input-value using ', '.
condense input-value no-gaps.
split input-value at '.' into var1 var2.
condense: var1, var2.
swnes = input-value.
read table input index 2.
waers = input-value.
call function 'SPELL_AMOUNT'
exporting
amount = swnes
currency = waers
filler = ' '
language = sy-langu
importing
in_words = it_spell
exceptions
not_found = 1
too_large = 2
others = 3
.
if sy-subrc eq 0.
refresh: output.
output-name = 'WORDS'.
condense waers.
case waers.
when 'USD'.
concatenate it_spell-word 'DOLLARS' into
it_spell-word separated by space.
when 'EUR'.
concatenate it_spell-word '' into
it_spell-word separated by space.
concatenate var2 'euros' into var2 separated by space.
when others.
endcase.
output-value = it_spell-word.
append output.
output-name = 'WAERS'.
output-value = waers.
append output.
condense waers.
case waers.
when 'USD'.
concatenate var2 'CENTS***' into var2 separated by space.
when 'EUR'.
concatenate var2 'EUROS' into var2 separated by space.
when others.
endcase.
output-name = 'DECIMAL'.
output-value = var2.
append output.
endif.
endform. "spell_amount
this will give output as TEN DOLLARS & 20 CENTS....
u can change the code as per ur requrement...
Reward if Helpful....
thnx
Rohit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You can use :
CALL FUNCTION 'SPELL_AMOUNT'
EXPORTING
LANGUAGE = SY-LANGU
CURRENCY = CURR " EUR
AMOUNT = '1000.00'
FILLER = SPACE
IMPORTING
IN_WORDS = WF_SPELL
EXCEPTIONS
NOT_FOUND = 1
TOO_LARGE = 2.
WF_SPELL will have the Amount in words.
Regards,
Omkar.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.