This discussion is archived
1 Reply Latest reply: Nov 15, 2013 12:13 PM by stopuz RSS

Number in Words output issue

stopuz Newbie
Currently Being Moderated

Hi,

 

We are on EBS R12.1.3. I am modifying a check template using Oracle BI Publisher Template Builder for Word 10.1.3.2.1.

 

My customer's requirement for displaying check amount in words is as follows:

 

Example 1:

Amount: $99

Output: Ninety-Nine Dollars And 0 Cent

 

Example 2:

Amount: $2,452.64

Output: Two Thousand Four Hundred Fifty-Two Dollars And 64 Cents

 

Example 3:

Amount: $2,452.01

Output: Two Thousand Four Hundred Fifty-Two Dollars And 01 Cent

 

I am using the following formula in RTF template, but unable to get the desired result:

 

[code]

<?xdofx:replace(PaymentAmountText,substr(PaymentAmountText, instr(PaymentAmountText, ' And ', -1)+5,instr(PaymentAmountText, 'Cent')-instr(PaymentAmountText, ' And ', -1)-6), substr(to_char(round(to_number(PaymentAmount/Value)-floor(to_number(PaymentAmount/Value)), 2), '.99'), 3))?>

[/code]

 

When I test this in SQL Developer it returns the proper output, but the template builder and the test EBS platform returns different results then SQL Developer.

 

For example;

for the first example, the output is:

Ninety-Nine Dollars And  Cents

 

for the second example, the output is correct:

Two Thousand Four Hundred Fifty-Two Dollars And 64 Cents

 

for the third example, the output is:

Two Thousand Four Hundred Fifty-Two Dollars And One Cent

 

Can you please point out what I am doing wrong? I referred to below document:

 

http://docs.oracle.com/cd/E10091_01/doc/bip.1013/b40017/T421739T481158.htm

 

Thanks,

Sinan

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points