Quantcast
Channel: SCN: Message List - Reporting and Printing
Viewing all articles
Browse latest Browse all 2719

Re: Need Indian Rupees Format in PLD - SAP B1

$
0
0

Hi Guhan,

 

there is some another way to display amount in words.

just copy above code into an formula.

 

 

numbervar RmVal:=0;

numbervar Amt:=0;

numbervar pAmt:=0;

stringvar InWords :="";

Amt := (Sum ({Item.amount}));

if Amt > 10000000 then

RmVal := truncate(Amt/10000000);

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 RmVal = 1 then

InWords := InWords + " " + towords(RmVal,0) + " Lakh"

else if RmVal > 1 then

InWords := InWords + " " + towords(RmVal,0) + " Lakhs";

Amt := Amt - Rmval * 100000;

InWords := InWords + " " + towords(truncate(Amt),0);

pAmt := (Amt - truncate(Amt)) * 100;

if pAmt > 0 and {Header.Doccur}="INR" then

InWords := "Rs. " + InWords + " And " + towords(pAmt,0) + " Paisa Only"

else if {Header.Doccur}="USD" then

InWords := "$. " + InWords + " And " + towords(pAmt,0) + " Cent Only"

else if {Header.Doccur}="INR" then

InWords := "Rs. " + InWords + " Only"

else if {Header.Doccur} ="USD" then

InWords := "$. " + InWords + " Only";

 

 

ProperCase(InWords)

 

Thanks & Regards,

Nishit Makadia


Viewing all articles
Browse latest Browse all 2719

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>