Reg Currency Description and Amount in words
Hi
Can anybody help me out in finding Function Module for Currency Descripton and Amount in words.
For Example, if currency type is <b>USD</b> and the amount is <b>29,012.50</b>
then it should display the currency description as <b>The sum of US Dollars</b> and the amount in words as <b>Twenty Nine Thousand Twelve and Cents Fifty</b> and it should work for any currency type.
Thanks in Advance.
Swathi
Hi swathi,
Cents are not known in SAP only USD with decimal places in known.
however check if this can solve teh problem...
for indian currency inr use the below function module....
HR_IN_CHG_INR_WRDS
for usd currency use the following code as an example..
data: amt_in type pc207-betrg value '29012.50'.
data: words type spell.
data: result type string.
call function 'SPELL_AMOUNT'
exporting
amount = amt_in
currency = 'USD'
FILLER = ' '
LANGUAGE = SY-LANGU
importing
in_words = words
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.
concatenate 'USD' words-word 'AND' words-decword 'CENTS'
into result separated by space.
write:/ result.
hope this helps,
all the best,
sampath
award helpful answers
Similar Messages
-
Amount and Date in words (Spanish, if logon language is english)
Dear all,
hope sb can help me with my issue.
We have to print within our system for Spain. That means the check itself have to be in spanish.
But we don't have spanish as logon language available. So the logon language is english.
If we print our checks we use the fields
®UD-ZALIW& (for Date in words)
and
&SPELL-WORD& (for Amount in words).
Unfortunately the words are not in spanish but in english. Additionally the day is not in words at all.
Could anybody help me? How can I get the words in Spanish?
Thanks in advance
PhilipHi, u have to use this function
CALL FUNCTION 'SPELL_AMOUNT'
EXPORTING
amount = w_dmbtr
currency = 'CLP'
language = 'ES'
IMPORTING
in_words = w_spell
EXCEPTIONS
not_found = 1
too_large = 2
OTHERS = 3.
where w_dmbtr is the amount of the check.
and for the date
but before u need to set up the sy-langu = 'S'. of spanish
after u get the value set it again to english.
CALL FUNCTION 'CONVERSION_EXIT_LDATE_OUTPUT'
EXPORTING
INPUT = p_date
IMPORTING
OUTPUT = MONTH.
Regards -
Crystal Report-Amount in Words Need correction and Delivery date.
Dear Experts,
Issue 1
In crystal reports i'm converting Amount in to words using the following formula. In that i am getting Every thing in Uppercase with - i.e. RUPEES ONE THOUSAND-FIVE HUNDRED AND .
I need in Sentence case i.e all First Letters in Capital and also want to Remove '-'
Amount in Word
numbervar RmVal:=0;
numbervar Amt:=0;
numbervar pAmt:=0;
stringvar InWords :="Rupees ";
Amt := {OPOR.DocTotal};
if Amt > 10000000 then RmVal := truncate(Amt/10000000);
if Amt = 10000000 then RmVal := 1;
if RmVal = 1 then
InWords := InWords + " " + towords(RmVal,0) + " crore"
else
if RmVal > 1 then InWords := InWords + " " + towords(RmVal,0) + " crores";
Amt := Amt - Rmval * 10000000;
if Amt > 100000 then RmVal := truncate(Amt/100000);
if Amt = 100000 then RmVal := 1;
if RmVal = 1 then
InWords := InWords + " " + towords(RmVal,0) + " lakhs"
Else
If RmVal > 1 then InWords := InWords + " " + ToWords(RmVal,0) + "Lakhs";
Amt := Amt - Rmval * 100000;
if Amt > 0 then InWords := InWords + " " + towords(truncate(Amt),0);
pAmt := (Amt - truncate(Amt)) * 100;
if pAmt > 0 then
InWords := InWords + " and " + towords(pAmt,0) + " paisa only"
else
InWords := InWords + " only";
UPPERCASE(InWords)
Issue 2.
At Delivery terms I'm using the following formula to display the delivery data. If the document date and due date is same it will print Delivery Immediate otherwise it should calculate the Delivery date from document date, but now it's printing DocDue date.
I need to calculate Delivery Date = DocDuedate - DocDate.
If {OPOR.DocDate} = {OPOR.DocDueDate} Then
"2. Delivery immediate"
Else
"2. Delivery on or before " & {OPOR.DocDueDate}
Thanks
KamalHi
Try this formula
numbervar RmVal:=0;
numbervar Amt:=0;
numbervar pAmt:=0;
stringvar InWords :="Rupees ";
Amt := {@GrandTotal} ;
if Amt > 10000000 then RmVal := truncate(Amt/10000000);
if Amt = 10000000 then RmVal := 1;
if RmVal = 1 then
InWords := InWords + " " + ProperCase (towords(RmVal,0)) + " crore"
else
if RmVal > 1 then InWords := InWords + " " + ProperCase (towords(RmVal,0)) + " crores";
Amt := Amt - Rmval * 10000000;
if Amt > 100000 then RmVal := truncate(Amt/100000);
if Amt = 100000 then RmVal := 1;
if RmVal = 1 then
InWords := InWords + " " + ProperCase (towords(RmVal,0)) + " lakhs"
Else
If RmVal > 1 then InWords := InWords + " " + ProperCase (ToWords(RmVal,0)) + " Lakhs";
Amt := Amt - Rmval * 100000;
if Amt > 0 then InWords := InWords + " " + ProperCase (towords(truncate(Amt),0));
pAmt := (Amt - truncate(Amt)) * 100;
if pAmt > 0 then
InWords := InWords + " and " + ProperCase (towords(pAmt,0)) + " paise only"
else
InWords := InWords + " only";
ProperCase(InWords)
Regards
Vivek -
Changing: Currency and Amount for Automatic Payment
Hi Folks,
I need to change the value for currency and amount for automatic payment (bseg-pycur and bseg-pyamt) from a user exit from the MIR7. I have found the following exit:
EXIT_SAPLMRMC_002
However didn't see the respective fields to change it.
Another problem is that MIR7 create parked invoices, by this the document isn't in the bseg yet, by this moment the document is in the vbsegk. However I still don't find how to modify this 2 fields that I need from a User Exit.
Hope can help me with this.
Regards,
Gilberto LiHi Pava,
MICR - It is nothing but Bank Key BNKA - BANKL
IFSC - I think it is SWIFT code international payments - BNKA- SWIFT
Assign points if useful
~Rajesh -
Reg: Convert amount in values to amount in words
Dear All,
Want to convert amount value into words and it will displays on UDF which is created in Marketing document. How can i do that.
Plese help me
Thanks & Regards
Venkatesh NHi,
Check Re: Amount in Words in INR for solution.
Create function in SQL and then apply FMS to get that function in udf.
Thanks,
Neetu -
Amount in words with 'AND' in between.
Hi All,
I have a requiremnt where in i neeed to convert my amount to words and display in SAP script.
I can use the FM SPELL_AMOUNT.This will give the result in words.I need to have the AND in b/w these.
eg:123456789
result:ONE HUNDRED TWENTY-THREE MILLION FOUR HUNDRED FIFTY-SIX THOUSAND SEVEN HUNDRED EIGHTY-NINE.
My requirement:ONE HUNDRED AND TWENTY-THREE MILLION FOUR HUNDRED AND FIFTY-SIX THOUSAND SEVEN HUNDRED AND EIGHTY-NINE.
Any pointers would be appreciated.Hi,
DATA: w_words(200).
After calling FM USe: Concatenate IN_WORDS-WORD 'AND' IN_WORDS-DECWORD into W_WORDS. Now W_Words Will contain the string you required.
Regards
Raju Chitale -
Amount in document currency and amount local currency in F-65
hi everybody
im doing a functional spec whereby we are getting a text file which contains data for tcode F-65
Im wondering if we can transfer amount in document currency and amount in local currency data by writing a program or we have to transfer only amount in document currency and SAP calculates amount in local currency
plz advisei know that
but the users dont want SAP to convert the document amount, you see
they want the data uploaded to appear on the screen i.e.
if document amount is 5000 and local amount is 3500 in the file, they want these values to be uploaded
and not that document amount 5000 is uploaded and the local amount is calculated by SAP -
Condition type and amount in VI01 transaction
Hi All,
I want to update condition type and amount in VI01 transaction.
process : transaction VI01 --> enter shipment number -->enter
then double click on item inside that>it will open new screen for that item> here you can see CONDITION tab...i have to update condition type and amount over there.
Please suggest me what i suppose to do..as i have tried all user exit but in vain...even badi alsoHi,
have u tried these user-exits
Exit Name Description
V54B0001 Shipment costing: Configure pricing
V54B0003 Shipment Costs Calculation: Determine Rate Type and Currency
V54B0004 Shipment Cost Calculation: Determine Status
V54C0001 Shipment costing: Description(s) shipement cost item(s)
V54C0002 Shipment costing: Create shipment cost sub-items
V54C0003 Shipment Costs Processing: Determine Invoicing Party
V54C0004 Shipment Costs Processing: Determine Loc. for Tax Invoice
V54D0001 Shipment Costing: Determining the Tax Countries
V54KSFRC Determining the factors for apportionment of shipment costs
V54P0001 Extended Function Codes for Shipment Cost Information
V54U0001 Shipment cost processing: Check whether changes made
V54U0002 Check shipment costs for completion
V54U0003 Specification of shipment cost number
V54U0004 Formatting for update of new objects (shipment costs)
V54U0005 Updating new objects in shipment cost processing
V54U0006 Shipment Purchase Order - Header Data Supply
V54U0007 Shipment Purchase Order - Item Data Supply
Reward points if useful..
Regards
Nilesh -
Function Module to convert amount to amount in words
Dear Guru ,
I want to know is there any sap standard Function Module to convert amount value to amount in words
Thanks & RegardsHi..
Use FM SPELL_AMOUNT.
This function module converts an amount or number into words. It can be used as follows:
Convert a number into words
To do this, the transfer parameters LANGUAGE and AMOUNT have to be entered.
Convert an amount into words
To do this, the fields LANGUAGE, CURRENCY, and AMOUNT have to be entered.
Program RF_SPELL contains a sample call of the function module. You can use it for test purposes.
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
I hope it helps.
Reward pts if helpful
Regards
- Rishika Bawa -
HI All,
I need to convert the amount into words in my smartforms.
How is this achieved?
Thanks & Regards,
MurthyHi kan murthy ,
let say in sf the amount is sf_amt...
*Declare varibles in SF like this in global
data: v_word type spell, "structure
v_amt type string.
*Calling Function SPELL_AMOUNT in Program Lines
and Import parameters are V_AMT and Export Parameters are
*V_WORD
call function 'SPELL_AMOUNT'
exporting
amount = v_amt
currency = 'INR'
language = sy-langu
importing
in_words = v_word
exceptions
not_found = 1
too_large = 2
others = 3.
Use V_WORD Where need to print
Regards,
sg -
Convert total amount into words
Hi
My requirement is to convert total amount into words.
For this i used function module SPELL_AMOUNT.
But its giving wrong (i.e. problem is in the paise).
I tried with other function module also, its not giving output.
how i can get exactly correct output.
Reward points if helpful.Hi
execute this code .
REPORT ZCOVERTION.
TABLES SPELL.
DATA : T_SPELL LIKE SPELL OCCURS 0 WITH HEADER LINE.
DATA : PAMOUNT LIKE SPELL-NUMBER VALUE '23.45'.
SY-TITLE = 'SPELLING NUMBER'.
PERFORM SPELL_AMOUNT USING PAMOUNT 'USD'.
WRITE: 'NUMBERS', T_SPELL-WORD ,'and', 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
Hope this will solve ur problem
Thanks
Krushna
oputput: -
Converting the amount in words
Hi ,
Issues is like if the amount is $137,510.82 for US currency it should give as ONE HUNDRED THIRTY-SEVEN THOUSAND FIVE HUNDRED TEN USD and 82/100.
But when the document currency is german in the check it should give as ONE HUNDRED THIRTY THOPUSAND AND 51082/100.
THE LOGIC SHOULD BE CURRENCY DEPENDENT.
HOW DO I DI THIS...following is a customized report to convert amount to words...
*& Report ZCFM_REPT_RUPEE_CONVERSION *
*This report is a copy of report 'ZRUPECO1' in Tengl server *
Date : 25-Oct-2006 *
Author : Amiya Shrivastava *
Title : Report to convert amount into words as per*
Indian spelling conventions *
Original Request number : DEVK917286 *
report zcfm_rept_rupee_conversion .
include zcfm_incl_rupee_conv_data.
*& Form COVERSION1
text
-->NUMBER text
-->ANS text
form coversion1 using number changing ans.
clear: gtab,
giritab,
giriline,
girijtab,
line ,
ans,
init, initnam, initno , init1,
cnam1, cnam2, cnam3,cnam4, point,jpoint,
kpoint,lpoint1, lpoint2,lpoint,fpoint,
cnt1 , cnt2, cnt3 ,
flhun, flth, flla, flcr1,flcr2, flchu1, flchu2, flpt, res.
refresh :
itab ,
ktab ,
jtab .
init = number.
init1 = init.
cnt1 = strlen( init ).
cnt2 = cnt1 - 1.
do cnt1 times.
initnam = init+0(1).
shift init by 1 places left.
if initnam = '.'.
cnam1 = init1+0(initno).
endif.
initno = initno + 1.
enddo.
do cnt1 times.
cnam2 = init1+0(1).
shift init1 by 1 places left.
if cnam2 = '.'.
point = init1+0(2).
exit.
endif.
enddo.
do 2 times.
jpoint = point+0(1).
shift point by 1 places left.
if sy-index = 1.
kpoint = point.
endif.
perform points.
enddo.
cnt1 = strlen( cnam1 ).
do cnt1 times.
cnam2 = cnam1+0(1).
perform calcu .
shift cnam1 by 1 places left.
enddo.
sort itab descending by index.
loop at itab.
if sy-tabix = 1.
jtab-result = itab-result.
jtab-index = itab-index.
append jtab.
else.
if itab-result = 'One ' and ( sy-tabix = 2 or sy-tabix = 5 or
sy-tabix = 7 or sy-tabix = 9 ).
perform teens.
move space to line-result.
modify jtab from line index cnt3 transporting result .
else.
if itab-result <> space.
perform ties.
else.
jtab-result = itab-result.
jtab-index = itab-index.
append jtab.
endif.
endif.
endif.
cnt3 = sy-tabix.
res = itab-result.
endloop.
skip.
loop at jtab.
case sy-tabix.
when 10.
if jtab-result <> space.
if flcr1 = 'X' and flcr2 = 'X'.
concatenate jtab-result 'Hundred Crores' into line-result
separated by ' '.
modify jtab from line index sy-tabix transporting result.
else.
concatenate jtab-result 'Hundred AND' into line-result
separated by ' '.
modify jtab from line index sy-tabix transporting result.
endif.
endif.
when 9.
if flcr1 = 'X'.
if jtab-result <> space.
concatenate jtab-result 'Crores' into line-result
separated by ' '.
modify jtab from line index sy-tabix transporting result.
else.
flcr2 = 'X'.
endif.
endif.
when 8.
if jtab-result <> space.
concatenate jtab-result 'Crores' into line-result
separated by ' '.
modify jtab from line index sy-tabix transporting result.
else.
flcr1 = 'X'.
endif.
when 7.
if flla = 'X'.
if jtab-result <> space.
concatenate jtab-result 'Lacs' into line-result
separated by ' '.
modify jtab from line index sy-tabix transporting result.
endif.
endif.
when 6.
if jtab-result <> space.
concatenate jtab-result 'Lacs' into line-result
separated by ' '.
modify jtab from line index sy-tabix transporting result.
else.
flla = 'X'.
endif.
when 5.
if jtab-result <> space.
if flth = 'X'.
concatenate jtab-result 'Thousand' into line-result
separated by ' '.
modify jtab from line index sy-tabix transporting result.
endif.
endif.
when 4.
if jtab-result <> space.
concatenate jtab-result 'Thousand' into line-result
separated by ' '.
modify jtab from line index sy-tabix transporting result.
else.
flth = 'X'.
endif.
when 3.
if jtab-result <> space.
if flchu1 = 'X' and flchu2 = 'X'.
concatenate jtab-result 'Hundred' into line-result
separated by ' '.
else.
concatenate jtab-result 'Hundred AND' into line-result
separated by ' '.
endif.
modify jtab from line index sy-tabix transporting result.
else.
flhun = 'X'.
endif.
when 2.
if jtab-result = space.
flchu2 = 'X'.
endif.
when 1.
if jtab-result = space.
flchu1 = 'X'.
endif.
endcase.
endloop.
*SORT JTAB ASCENDING BY INDEX.
loop at jtab.
if sy-tabix = 1.
cnam4 = jtab-result.
else.
concatenate jtab-result cnam4 into cnam4 separated by space.
endif.
endloop.
if lpoint2 = space and lpoint1 = space.
lpoint = 'only'.
else.
concatenate 'Paise' lpoint2 lpoint1 'only' into lpoint separated by
space.
endif.
if cnam4 <> space.
shift cnam4 left deleting leading space.
concatenate 'Rupees' cnam4 lpoint into ans separated by space.
*WRITE : / 'RUPEES', CNAM4.
*WRITE : / ANS.
endif.
endform. "COVERSION1
*WRITE : / LPOINT NO-GAP.
form ties.
jtab-index = itab-index.
if sy-tabix = 2 or sy-tabix = 5 or sy-tabix = 7 or sy-tabix = 9.
case itab-result.
when 'Two '.
jtab-result = 'Twenty'.
when 'Three'.
jtab-result = 'Thirty'.
when 'Four '.
jtab-result = 'Fourty'.
when 'Five '.
jtab-result = 'Fifty'.
when 'Six '.
jtab-result = 'Sixty'.
when 'Seven'.
jtab-result = 'Seventy'.
when 'Eight'.
jtab-result = 'Eighty'.
when 'Nine '.
jtab-result = 'Ninety'.
when space.
jtab-result = space.
endcase.
else.
jtab-result = itab-result.
endif.
append jtab.
endform. "TIES
*& Form TEENS
text
form teens.
jtab-index = itab-index.
case res.
when 'One '.
jtab-result = 'Eleven'.
when 'Two '.
jtab-result = 'Twelve'.
when 'Three'.
jtab-result = 'Thirteen'.
when 'Four '.
jtab-result = 'Fourteen'.
when 'Five '.
jtab-result = 'Fifteen'.
when 'Six '.
jtab-result = 'Sixteen'.
when 'Seven'.
jtab-result = 'Seventeen'.
when 'Eight'.
jtab-result = 'Eighteen'.
when 'Nine '.
jtab-result = 'Nineteen'.
when space.
jtab-result = 'Ten'.
endcase.
append jtab.
endform. "TEENS
*& Form CALCU
text
form calcu .
itab-index = sy-index.
case cnam2.
when '1'.
itab-result = 'One'.
when '2'.
itab-result = 'Two'.
when '3'.
itab-result = 'Three'.
when '4'.
itab-result = 'Four'.
when '5'.
itab-result = 'Five'.
when '6'.
itab-result = 'Six'.
when '7'.
itab-result = 'Seven'.
when '8'.
itab-result = 'Eight'.
when '9'.
itab-result = 'Nine'.
when '0'.
itab-result = space.
endcase.
append itab.
endform. "CALCU
*& Form POINTS
text
form points.
if sy-index = 2.
if fpoint = space.
case jpoint.
when '1'.
lpoint1 = 'One'.
when '2'.
lpoint1 = 'Two'.
when '3'.
lpoint1 = 'Three'.
when '4'.
lpoint1 = 'Four'.
when '5'.
lpoint1 = 'Five'.
when '6'.
lpoint1 = 'Six'.
when '7'.
lpoint1 = 'Seven'.
when '8'.
lpoint1 = 'Eight'.
when '9'.
lpoint1 = 'Nine'.
when '0'.
lpoint1 = space.
endcase.
endif.
endif.
if sy-index = 1.
case jpoint.
when '1'.
perform lpointy.
when '2'.
lpoint2 = 'Twenty'.
when '3'.
lpoint2 = 'Thirty'.
when '4'.
lpoint2 = 'Forty'.
when '5'.
lpoint2 = 'Fifty'.
when '6'.
lpoint2 = 'Sixty'.
when '7'.
lpoint2 = 'Seventy'.
when '8'.
lpoint2 = 'Eighty'.
when '9'.
lpoint2 = 'Ninety'.
when '0'.
lpoint2 = space.
endcase.
endif.
endform. "POINTS
*& Form LPOINTY
text
form lpointy.
case kpoint.
when '1'.
lpoint2 = 'Eleven'.
when '2'.
lpoint2 = 'Twelve'.
when '3'.
lpoint2 = 'Thirteen'.
when '4'.
lpoint2 = 'Fourteen'.
when '5'.
lpoint2 = 'Fifteen'.
when '6'.
lpoint2 = 'Sixteen'.
when '7'.
lpoint2 = 'Seventeen'.
when '8'.
lpoint2 = 'Eighteen'.
when '9'.
lpoint2 = 'Nineteen'.
when '0'.
lpoint2 = 'Ten'.
endcase.
lpoint1 = space.
fpoint = 'X'.
endform. "LPOINTY -
Hi,
Using PE51, net salary amount can display in words as,
pe51--> form name-->Betrg(double click)--->select RT
Table field : Betrg
Identifier: /560
Output length: 30
Convertion: 23
Eg:17,714.44 (Net Salary)
While i was doing like this i am getting the amount in words as
SEVENTEEN THOUSAND SEVEN HUNDRED FOURTEEN
But i want the output like this SEVENTEEN THOUSAND SEVEN HUNDRED FOURTEEN AND 44/100 DOLLARS
Thanks in Advance.hi,
data: AMOUNT(20),
CURRENCY(3)
FILLER(1)
LANGUAGE(2),
IN_WORDS(900).
DESCRIBE FIELD AMOUNT TYPE TYPE DECIMALS DECIMALS.
IF TYPE EQ 'P'.
INT_AMOUNT = AMOUNT * ( 10 ** DECIMALS ).
ELSE.
INT_AMOUNT = AMOUNT.
ENDIF.
INT_DECIMAL = 0.
INT_FILLER = SPACE.
INT_FILLER+1 = FILLER.
INT_LANGUAGE = LANGUAGE.
IF CURRENCY NE SPACE.
IF CURRENCY EQ '0'. "Sicherheitsabfrage (sonst Loop
TCURX-CURRDEC = 0. "bei fehlendem Eintrag 0)
ELSE.
SELECT SINGLE * FROM TCURX
WHERE CURRKEY EQ CURRENCY.
IF SY-SUBRC NE 0.
TCURX-CURRDEC = 2.
ENDIF.
ENDIF.
INT_DIVISOR = 1.
INT_CURRENCY = CURRENCY.
DO TCURX-CURRDEC TIMES.
INT_DIVISOR = INT_DIVISOR * 10.
ENDDO.
INT_DECIMAL = INT_AMOUNT MOD INT_DIVISOR.
INT_AMOUNT = INT_AMOUNT DIV INT_DIVISOR.
INT_DIVISOR = 1000000000.
DO TCURX-CURRDEC TIMES.
INT_DIVISOR = INT_DIVISOR / 10.
ENDDO.
INT_DECIMAL = INT_DECIMAL * INT_DIVISOR.
ENDIF.
IF LANGUAGE CA 'PS'.
IF CURRENCY EQ SPACE.
INT_GENUS = 'M'.
ELSE.
IF TCURC-WAERS NE CURRENCY.
CLEAR TCURC.
SELECT SINGLE * FROM TCURC WHERE WAERS EQ CURRENCY.
ENDIF.
IF ( 'ADP/CYL/CZK/DKK/EEK/EGP/ESP/GBL/GBP/IDR' CS TCURC-ISOCD OR
'IEP/INR/ITL/LBP/LKR/MTL/MUR/NOK/NPR/PKR' CS TCURC-ISOCD OR
'SCR/SDP/SEK/SKK/SYP/TRL' CS TCURC-ISOCD )
AND TCURC-ISOCD NE SPACE.
INT_GENUS = 'F'.
ELSE.
INT_GENUS = 'M'.
ENDIF.
ENDIF.
ENDIF.
IF LANGUAGE EQ 'R'.
CLEAR TCURC.
SELECT SINGLE * FROM TCURC WHERE WAERS EQ CURRENCY.
ENDIF.
IF INT_AMOUNT(5) NE '00000'.
MESSAGE E074 WITH INT_AMOUNT RAISING TOO_LARGE.
ELSE.
INT_ZAHL = INT_AMOUNT+5.
ENDIF.
PERFORM ZIFFERN_IN_WORTEN.
PERFORM BETRAG_IN_WORTEN.
PERFORM NACHKOMMA_IN_WORTEN.
IN_WORDS = SPELL. -
SAP Script : Amount in Words
Dear All,
I am working on bank Check, I need to print the amount value in Words. Amount field ®UD-SWNES&, I need to print this amount in words.
I mean to say that, regud-swnes = 1000.69, I have to print this as One Thousand and 69/100. please advice me, how Can I do that.
Thanking you.
with kind Regards
Venkat.hi venkat,
split the command at decimal and u can design ur code for 69/1000.for displaying 1000 u can use the fm 'SPELL_AMOUNT'.
sample:
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.
reward if helpful.
regards,
keerthi. -
Covert Amount in words in other format
Hi,
I have a value say 222.20 .
When I use CALL FUNCTION 'HR_IN_CHG_INR_WRDS' then it gives output as:-
TWO HUNDRED TWENTY TWO Rupees TWENTY Paise.
But I want output as:
TWO HUNDRED TWENTY TWO And 20/100.
Plz. help.
Thanks in advance.
Manoj kumari guess you can not get such o/p by any FM .
but you can do it programatically.
1) just split the amount at decimal.
2) pass the whole no to function module and get the word description in one sting.
3) get the decimal part converted to whole no like 0.55 will be converted as .55*100 = 55.
4)then take a string and get values concatenated like 55,/,100.
where / and 100 will always remain same.
5) now concatenate the string 1 from word desc and this string 2 in staring3
6) string 3 is the required o/p.
Maybe you are looking for
-
How do I save tracks in order to format ipod from Mac to windows?
I have been given an ipod that was originally used on a Mac but i have Windows. Is there any way I can save the tracks before formatting it ? When i plug in the ipod to my computer it only gives me the option of formatting it. There are some 11 g's o
-
I'm no longer able to use the projector VPL-ES4 with win7, he accuses error frequency
I'm no longer able to use the projector VPL-ES4 with win7, he accuses error frequency. Working at a university here in Brazil Unicamp. Here we have several projectors model VPL-ES4, we were using this projector with win7 however a few days they all s
-
Iweb 08: Media now missing after update
We installed Iweb 08 last week, and now little by little we are finding bugs here and there. Layouts become randomly warped and Video content that was published does not show up once uploaded to the website. The file is not even in the directory, jus
-
Why won't Photoshop open?
I just reinstated my subscription and photoshop won't open. I've also been waiting for phones for about an hour. Seriously getting mad over here.
-
Distiller 9 Font Dropping Off in some places
Our work flow is as follows: .ps files are created in Quark 7.5, exported to a watched folder and distilled (all fonts embedded) generating a pdf. Said pdf files are then placed into a new multi-page Quark document (the pdfs are ad files in a newspap