cancel
Showing results for 
Search instead for 
Did you mean: 

DocTotal in words Crystal Report

Former Member
0 Kudos

Hello,

I am trying to convert DocTotal field into words and not able to do so. Please advise a formula which an help me to get the doctotal in words in Purchase Order Crystal Report Layout

For example by doctotal is 22,750.00 so I want the amount in words as


Twenty Two Thousand Seven Hundred Fifty US Dollors & Zero cents.


Please advise.


Kind Regards,

Ravi





Accepted Solutions (1)

Accepted Solutions (1)

kothandaraman_nagarajan
Active Contributor
0 Kudos

Hi,

Please refer thread http://scn.sap.com/thread/3541205

Thanks & Regards,

Nagarajan

Answers (3)

Answers (3)

Former Member
0 Kudos

Dear All,

Thanks for the help. The issue is resolved.

Regards

Ravi

kothandaraman_nagarajan
Active Contributor
0 Kudos

Hi,

Please close this thread by marking correct or helpful answer.

Thanks & Regards,

Nagarajan

Former Member
0 Kudos

Hi Ravi,

Use this :

----------------------------------------

numbervar RmVal:=0;

numbervar Amt:=0;

numbervar pAmt:=0;

stringvar InWords :="Rupees ";

Amt := <Enter your value here or Pass field here>

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)

Former Member
0 Kudos

You're looking for the ToWords function. Some info is found here.