Convert numbers to Indian Rupees format in Oracle Forms / Reports.

Create the below mention function in Oracle Forms / Reports and call it with passing a number parameter.

FUNCTION INR_words( p_number In number, vFrDec varchar2 Default 'Paisa Only')
RETURN varchar2 As
TYPE myArray Is Table Of varchar2(255);     
TYPE myArray2 Is Table Of varchar2(255);
l_str    myArray := myArray( '',
                   ' Thousand ', ' Lac ',
                   ' Crore ', ' Arab ',
                   ' Kharab ', ' quintillion ',
                   ' Sextillion ', ' Septillion ',
                   ' Octillion ', ' Nonillion ',
                   ' Decillion ', ' Undecillion ',
                   ' Duodecillion ' );
l_str2 myArray2 := myArray2('Rs Paisa', '$ Pany');
    l_num   varchar2(50) Default Trunc( p_number );
    l_dec   varchar2(50) Default Substr(To_Char(p_number - Trunc(p_number), '.99'),2);
    l_return varchar2(4000);
    j number := 3;
BEGIN
    For i In 1 .. l_str.Count
    LOOP
        EXIT When l_num Is Null;
        IF ( Substr(l_num, Length(l_num)-(j-1), j) <> 0 ) Then
           l_return := To_Char(To_Date(
                            Substr(l_num, Length(l_num)-(j-1), j),'J' ), 'Jsp' ) || l_str(i) || l_return;
        END IF;
        l_num := Substr( l_num, 1, Length(l_num)-j );
        j:=2;
    END LOOP;
    IF l_dec > 0 Then
        l_return := rtrim(l_return) || ' and ' || rtrim(inr_words(Substr(l_dec,2), Null)) || ' ' || rtrim(Initcap(vFrdec));
    END IF;
    RETURN Replace(l_return, '-', ' ');
END;

Number To Indian Rupee Words in Oracle Forms / Reports的更多相关文章

  1. Find Current Job Openings For Oracle Forms & Reports

    Oracle Form & Reports developer jobs are always in demand, candidates who have Oracle D2k, Oracl ...

  2. How To Install Oracle Forms 12c On Windows 7

    Below is the step by step guide to install Oracle Forms 12c on Windows 7. To install Oracle Forms 12 ...

  3. Displaying Window In Center In Oracle Forms 6i

    Center window automatically  in Oracle Forms 6i, use the following procedure by passing window name ...

  4. Adding List Item Element At Runtime In Oracle Forms

    Add combo list / drop down list item element at runtime in Oracle forms.SyntaxPROCEDURE ADD_LIST_ELE ...

  5. Populating Tree Item With Record Group In Oracle Forms

    The below plsql program unit could be used in a WHEN-NEW-FORM-INSTANCE trigger to initially populate ...

  6. Determining Current Block and Current Item in Oracle Forms

    SYSTEM.CURSOR_BLOCK Determining current block in Oracle Forms Using SYSTEM.CURSOR_BLOCK system varia ...

  7. An Example of On-Error Trigger in Oracle Forms

    I wrote this trigger around 4 years ago to handle errors in an application based on Oracle Forms 6i. ...

  8. Pre-Update and Pre-Insert Trigger Examples For Oracle Forms

    See also: Why And When To Use Pre-Update and Pre-Insert Triggers In Oracle FormsPre-Update Fires dur ...

  9. Checking For User Permissions Before Updating or Inserting The Records in Oracle Forms

    Suppose you want to check the user permissions on inserting or updating the records in Oracle Forms, ...

随机推荐

  1. Android课程---布局管理器之相对布局(一)

    下面示例的是在父容器里如何设置按钮的位置,难度:***,重点是找到一个主按钮,设置它的id,然后根据它来设置其他按钮在父容器的位置. 代码示例: <?xml version="1.0& ...

  2. html5:地理信息 LBS基于地理的服务和百度地图API的使用

    地理位置请求 单次定位请求getCurrentPosition(请求成功函数,请求失败函数,数据收集方式) 多次定位请求watchPosition(请求成功函数,请求失败函数,数据收集方式) 关闭更新 ...

  3. ng-model和ng-bind区别

    ng-bind has one-way data binding ($scope --> view). It has a shortcut {{ val }} which displays th ...

  4. hover事件优化(延时操作)

    JQ的hover事件拓展 编写原因:当鼠标滑过某个带有hover事件的元素,但是仅仅是路过,并不是希望查看此部分内容的时候,效果不理想 $.fn.extend({ delayed : function ...

  5. 动画 CABasicAnimation animationWithKeyPath 一些规定的值

    CABasicAnimation animationWithKeyPath Types When using the ‘CABasicAnimation’ from the QuartzCore Fr ...

  6. 系统隐式 Intent

    1. 找出系统中所有视频 private void choiceFile() { Intent intent = new Intent(Intent.ACTION_PICK, android.prov ...

  7. 作为团队leader,怎样激发每个人的最大战斗力

    之前总在讨论怎么做运营,也就是业务本身,这次聊聊管理. 有人说,我还没带团队. 也没关系,现在从业者都很年轻,可能用不了一两年你也会开始面试别人和带团队,即使2个人也算团队. 另外,其他同事即使不是你 ...

  8. MyBatis操作指南-搭建项目基础环境(基于Java API)含log4j2配置

  9. 弹出框以及提示插件lghdialog.js的使用

    以下使用方法 swfupload的使用

  10. tomcat server需要重启的时刻

    1.修改了web project的任何配置文件,都需要重启tomcat 2.修改了任何java class文件,都需要重启tomcat server 3.在项目中添加了任何的文件,包括配置文件.jav ...