Fatal PL/SQL error when calling imported java code

Hi,
I'm developing reports using Report builder 9.0.2 under Win2k and I have the following problem:
I select data into fieds A and B.
I created 2 formulas fA and fB that call a PLSQL function from my report in order to convert A and B based on other data.
I also have a formula fC which is actually fA-fB
I have 3 summary columns on fA, fB and fC. I don't display any of those columns on the report but I created other formulas columns fA_Fmt, fB_Fmt,... to format the values using an imported java class.
This java class is static.
so fA_Fmt looks like this:
function fA_Fmt return Char is
begin
return MyJavaClassPackageName.formatValue( :fA, report_global_variable );
end;
When I run my report under report builder, I get a REP-1401 report error like "fA_Fmt formula: fatal PL/SQL error occured
ORA-39565: Message not found, product RDBMS, facility: ORA"
This happens randomly on any of the formulas.
Sometimes I even get a java.lang.StaskOverFlowError and I have to close and restart report builder.
I've tried to debug and I even caught the exception.
The parameters passed to the java method are fine.
The exception number is 105101 and after a couple of exceptions like this, visual C++ runtime library tells me there's a runtime error in rwbuilder.exe and the application crashes.
I don't know if it's Java, if it's Report builder or even Win2k.
Anyway, I'm stuck with that and I don't know what to do to fix it.
Any idea or work around?
Thanks
Manu

Hi Manu
I suspect the line given below:
return MyJavaClassPackageName.formatValue( :fA, report_global_variable );
Do not pass report values directly. Instead, assign it to a temporary variable and try again. See if this works:
temp1 <Variable_Type>;
temp2 <Variable_Type>;
temp1 := :fA;
temp2 := report_global_variable;
return MyJavaClassPackageName.formatValue( temp1, temp2 );
Note: You may also hit Fatal PL/SQL errors if the arguments happen to be invalid.
Regards
Sripathy

Similar Messages

  • Out of memory error when calling a java stored procedure multiple times

    Trying to run a PL/SQL loop calling a java stored procedure, I get the following error:
    "ORA-04030: out of process memory when trying to allocate 262188 byte callheap,ioc_allocate free)"
    (with some other error lines).
    The stored procedure does two major things:
    1) Open a socket to communicate with a server, of which it queries some data.
    2) Use JDBC (with the default DB connection it has, as a stored procedure) to write the results to a table.
    All socket connections, statements, etc. are properly closed and all memory should be garbage collected between each call.
    Can anyone offer an explanation or additional checks to make? I'm quite sure the code isn't causing the problem, since I've tried running it as a stand alone application (outside of Oracle) and didn't have any problems.
    Thanks.

    Hi,
    Verify that the database parameters are set correctly.
    EA

  • Error when compiling multiple java code files

    Hi,
    Since I installed J2SDK downloaded from this website, it has never compiled my code correctly when written in multiple java files. Below is a sample of my code and the error message I am getting:
    File#1
    class testprint{
    public static void main(String args[]){
         myprint mp = new myprint();
         mp.manageprint();
    File#2
    class myprint{
    void manageprint(){
         System.out.print("please print");
    Here is my error message from the command line:
    c:\print>javac testprint.java
    testprint.java:4: cannot resolve symbol
    symbol : class myprint
    location: class testprint
         myprint mp = new myprint();
    ^
    testprint.java:4: cannot resolve symbol
    symbol : class myprint
    location: class testprint
         myprint my = new myprint();
                   ^
    2 errors
    C:\
    It seems Java is not recognizing myprint.java file. Do I need to configure anything to make my code work? Please help!
    Thanks in advance.

    Are both files in the same directory? Is the directory in your classpath?

  • Error when calling the sample code with client

    The start samples are really good and useful.
    However I get an error when connecting to the API App on Azure. The code generated when "adding the reference" has a file called Values.cs. I get an error on line 219:
    resultModel = StringCollection.DeserializeJson(responseDoc);
    The correct line should be
    resultModel = MyContactsListConsole.Models.
    StringCollection.DeserializeJson(responseDoc);
    I guess there is a naming issue. The StringCollection defined in Contactlists/Models cannot be inferred without a fully qualified path since StringCollection is already in
    System.Collections.Specialized
    When I update the code to point to MyContactsListConsole.Models then it works.
    //Mikael Sand (MCTS, ICC 2011) -
    Blog Logica Sweden

    Sorry you had to discover this bug, Michael. It is a known issue we outlined in the release notes, and have since repaired it in the upcoming release. This is only an issue when your API returns an array of strings, as is the case for the default ValuesController
    file. Sorry about that, but know that we've fixed it. 

  • Getting ie error when calling event from code.

    Hi all!
    I've got an application (running on 6.40 sp8, ep6 sp2) that is pretty basic by all means. Since I want to implement some way to tell the user when he/she has made an error or just to inform him/her about something, I decided to use the ConfirmationDialog.
    I've created an action called onActionShowErrorMessage in my view. This action is tied to my controller and an event defined in the controller.
    Hence, when I want to show the ConfirmationDialog to show the user an error message, I call the controller method and in the method I fire the event that my view method is looking for.
    So far so good..
    When I call my controller method from a button action in the view everything works nicely, but when I try to call it from the wdInit method it fails?! I do get the ConfirmationDialog up but I also get an IE error window telling me that IE is trying to open a page it cannot find. I have no idea why it tries to open any page at all, since there is no navigation defined for this action.
    Anyone got an idea? I couldn't find any good stuff in the system logs either
    Best regards,
    Andreas

    Hello Sam!
    Thanks for your answer! I would like to use something more of a pop thing, since i want to make sure the user sees it. The MessageManager does not work as good as it used to anymore, since it puts all messages in the bottom of the page. This page needs to be scrolled in order to see the error message..
    Anyone got an idea of a workaround? I'm reading a propsfile, and in case I'm not able to read it I want to display this to the user.
    B.R
    Andreas

  • Iam getting the error REP-1401: '': Fatal PL/SQL error occurred. when i

    When i run the report to generate xml file in report builder the following error messages are displayed.
    REP-0069: Internal error
    REP-57054: In-process job terminated:Terminated with error:
    REP-1401: '': Fatal PL/SQL error occurred.
    pls help me.Its urgent
    Regards,
    Kranthi

    Hi;
    What is EBS version? Is it custom report or not?
    See below which is mention similar errors
    Autoinvoice Error: ORA-1403: no data found [ID 1209403.1]
    APXIIMPT - Payable Open Interface Import Fails on "REP-1401: 'cf_source_nameformula': Fatal PL/SQL error occurred. ORA-01403: no data found" [ID 222058.1]
    Regard
    Helios

  • ORA-28868 error when calling Web service over HTTPS from PL/SQL utl_http

    I am getting error message ORA-28868 error when calling Web service over HTTPS from PL/SQL utl_http PL/SQL package,
    when browsed through some of the messages they point to setting Oracle Wallet Manager.
    I am trying to connect
    Any idea on how to resolve this issue ?
    your input is appreciated.
    Thanks
    Ravi

    Duplicate post ... please ignore.

  • ORA-03113 error when running the Java stored proc demos

    Hi there,
    Has anyone else run into this issue. When attempting to transfer an object type from Java to Oracle - through a Java stored proc - the session crashes with:
    ORA-03113: end-of-file on communication channelLooking in the trace file generated the error message looks something like:
    ksedmp: internal or fatal error
    ORA-07445: exception encountered: core dump [0x8fe04468] [SIGTRAP] [unknown code] [0x8FE59034] [] []
    Current SQL statement for this session:
    select pointruntime.jdistance(point(1, 2), point(2, 3)) from dual
    ----- Call Stack Trace -----
    calling              call     entry                argument values in hex     
    location             type     point                (? means dubious value)    
    ksedmp+764           call     ksedst               0 ? 2C4F4A ? 2C ? 98968000 ?
                                                       DB02C ? 27A50000 ?
    ssexhd+956           call     ksedmp               3 ? 0 ? 8FE5E790 ? 5905870 ?
                                                       8FE0434C ? 40895E4 ?
    0x9012c860           call     ssexhd               5 ? BFFEEF70 ? BFFEEFB0 ? 0 ?
                                                       0 ? 0 ?As you can see from the trace snippet above, I was attempting to run one of the Oracle Java stored procedure demos. Has anyone successfully run those demos? Specifically the ones where complex types (table objects or the Point object) are passed back to Oracle from the JVM.
    I would appreciate some help with this. The code works fine in a Windows or Solaris environment but barfs on Apple. Truly annoying....
    Anyone?
    Thanks in advance,
    Alex

    Yes,
    Apologies for not stating that information, Steve. Was a bit naughty of me! I guess the reason I didn't was because I just wanted to hear if anyone else running Oracle on Mac received such errors when executing the Java stored proc demos (specifically, the execution of PointRuntime.jDistance). Nevertheless, here's the relevant info from the trace file:
    Dump file /Users/oracle/admin/sandbox/udump/sandbox_ora_1861.trc
    Oracle Database 10g Enterprise Edition Release 10.1.0.3.0 - Production
    With the Partitioning, Oracle Label Security, OLAP and Data Mining Scoring Engine options
    ORACLE_HOME = /Users/oracle/product/10.1.0/db
    System name:     Darwin
    Node name:     maczilla.local
    Release:     8.3.0
    Version:     Darwin Kernel Version 8.3.0: Mon Oct  3 20:04:04 PDT 2005; root:xnu-792.6.22.obj~2/RELEASE_PPC
    Machine:     Power Macintosh
    Instance name: sandbox
    Redo thread mounted by this instance: 1
    Oracle process number: 10
    Unix process pid: 1861, image: [email protected] for the Java version, according to the readme file in the javavm directory, I am running 1.4.1:
    1.5  Java Compatibility
    This release has been thoroughly tested with Sun's Java Compatibility
    Kit for the JDK 1.4.1. Oracle is committed to OracleJVM keeping pace
    with Java and other Internet standards.

  • REP-1401: Fatal PL/SQL error occurred. ORA-01403: no data found

    Hi guys,
    I am getting error 'REP-1401: Fatal PL/SQL error occurred. ORA-01403: no data found ' when run the report
    and i m also use formula column in my report.
    can any body help me why it's coming.
    following code is used in formula column plz check and verify:
    function CF_3Formula return Char is
    T1 VARCHAR2(100);
    begin
    SELECT
         VAT_REG_NO INTO T1
    FROM
         JA_IN_HR_ORGANIZATION_UNITS JIHOU,
         HR_LOCATIONS HL--,
         --MTL_TXN_REQUEST_HEADERS MTLH
    WHERE
    JIHOU.ORGANIZATION_ID=HL.INVENTORY_ORGANIZATION_ID AND
    JIHOU.LOCATION_ID=HL.LOCATION_ID AND
    --Jihou.ORGANIZATION_ID = Mtlh.Organization_Id AND
    -- Hl.INVENTORY_ORGANIZATION_ID =Mtlh.Organization_Id AND
    -- MTLH.ATTRIBUTE10=SUBSTR(HL.LOCATION_CODE,1,3) AND
    SUBSTR(HL.LOCATION_CODE,1,3)= :TO_ORG1 ;
    RETURN (T1);
    end;
    plz help me out.

    Hi;
    What is EBS version? Is it custom report or not?
    See below which is mention similar errors
    Autoinvoice Error: ORA-1403: no data found [ID 1209403.1]
    APXIIMPT - Payable Open Interface Import Fails on "REP-1401: 'cf_source_nameformula': Fatal PL/SQL error occurred. ORA-01403: no data found" [ID 222058.1]
    Regard
    Helios

  • REP-1401: 'cf_changetotalformula': Fatal PL/SQL error occurred.

    The program is finding no data in some place and is erroring out.
    when i run the report i get the following error
    REP-3000: Internal error starting Oracle Toolkit.
    MSG-00010: EC installation status I
    MSG-00003: Calling the archiving routine with parameters PO, STANDARD, 6677
    REP-1401: 'cf_changetotalformula': Fatal PL/SQL error occurred.
    ORA-01403: no data found
    The following is the program
    function CF_ChangeTotalFormula return Number is
    v_maxrev number:=0;
    v_result_final number :=0;
    v_changes_to_curr varchar2(2000);
    v_changes_to_prev varchar2(2000);
    v_OriginalPOAmount varchar2(2000);
    v_changes_from varchar2(2000);
    v_changes_to varchar2(2000);
    v_seq number ;
    v_rev_num number ;
    v_para varchar2(100);
    begin
         select icx_po_history_details_s.nextval into v_seq from dual;
    select max(revision_num) into v_rev_num from apps.po_lines_archive where po_header_id =:poh_po_header_id;
    for i in 1 .. v_rev_num loop
                        if v_rev_num >1 then
                                  v_para := null;
                        else
                                  v_para := 'ORIGINAL';
                        end if;
                   begin
                             pos_revision_differences.compare_headers(:poh_po_header_id,null,i,v_para,v_seq);
                             exception
                                  when others then
                                  return 0;
                             end;
    end loop;
    Select sum(pol.unit_price*pol.quantity) OriginalPOAmount
    into v_OriginalPOAmount
    from apps.po_lines_archive pol
    where pol.revision_num = 0
    and po_header_id = :poh_po_header_id
    group by pol.po_header_id;
    select max(revision_num)
    into v_maxrev
    from apps.po_lines_archive
    where po_header_id = :poh_po_header_id;
    if v_maxrev > 1 then
    select distinct a.changes_to
    into v_changes_to_curr
    from icx_po_revisions_temp_v a
    where a.header_id = :poh_po_header_id
    and a.field_altered = 'Amount'
    and a.revision_num = v_maxrev
    and a.changes_from <> v_OriginalPOAmount;
    if v_maxrev-1 <> 1 then
    select distinct a.changes_to
    into v_changes_to_prev
    from icx_po_revisions_temp_v a
    where a.header_id = :poh_po_header_id
    and a.field_altered = 'Amount'
    and a.revision_num = v_maxrev-1
    and a.changes_from <> v_OriginalPOAmount;
    else
    select distinct a.changes_to
    into v_changes_to_prev
    from icx_po_revisions_temp_v a
    where a.header_id = :poh_po_header_id
    and a.field_altered = 'Amount'
    and a.revision_num = 1;
    end if;
    v_result_final := v_changes_to_curr - v_changes_to_prev;
    else
    select distinct a.changes_from,a.changes_to
    into v_changes_from,v_changes_to
    from icx_po_revisions_temp_v a
    where a.header_id = :poh_po_header_id
    and a.field_altered = 'Amount'
    and a.revision_num = 1;
    v_result_final := v_changes_to - v_changes_from ;
    end if;
    return v_result_final;
    /* exception
                   when others then
                   return 0; */
    end;
    Can anyone shed a light on this.
    thanks
    kalpana

    The program is finding no data in some place and is erroring out.
    when i run the report i get the following error
    REP-3000: Internal error starting Oracle Toolkit.
    MSG-00010: EC installation status I
    MSG-00003: Calling the archiving routine with parameters PO, STANDARD, 6677
    REP-1401: 'cf_changetotalformula': Fatal PL/SQL error occurred.
    ORA-01403: no data found
    The following is the program
    function CF_ChangeTotalFormula return Number is
    v_maxrev number:=0;
    v_result_final number :=0;
    v_changes_to_curr varchar2(2000);
    v_changes_to_prev varchar2(2000);
    v_OriginalPOAmount varchar2(2000);
    v_changes_from varchar2(2000);
    v_changes_to varchar2(2000);
    v_seq number ;
    v_rev_num number ;
    v_para varchar2(100);
    begin
         select icx_po_history_details_s.nextval into v_seq from dual;
    select max(revision_num) into v_rev_num from apps.po_lines_archive where po_header_id =:poh_po_header_id;
    for i in 1 .. v_rev_num loop
                        if v_rev_num >1 then
                                  v_para := null;
                        else
                                  v_para := 'ORIGINAL';
                        end if;
                   begin
                             pos_revision_differences.compare_headers(:poh_po_header_id,null,i,v_para,v_seq);
                             exception
                                  when others then
                                  return 0;
                             end;
    end loop;
    Select sum(pol.unit_price*pol.quantity) OriginalPOAmount
    into v_OriginalPOAmount
    from apps.po_lines_archive pol
    where pol.revision_num = 0
    and po_header_id = :poh_po_header_id
    group by pol.po_header_id;
    select max(revision_num)
    into v_maxrev
    from apps.po_lines_archive
    where po_header_id = :poh_po_header_id;
    if v_maxrev > 1 then
    select distinct a.changes_to
    into v_changes_to_curr
    from icx_po_revisions_temp_v a
    where a.header_id = :poh_po_header_id
    and a.field_altered = 'Amount'
    and a.revision_num = v_maxrev
    and a.changes_from <> v_OriginalPOAmount;
    if v_maxrev-1 <> 1 then
    select distinct a.changes_to
    into v_changes_to_prev
    from icx_po_revisions_temp_v a
    where a.header_id = :poh_po_header_id
    and a.field_altered = 'Amount'
    and a.revision_num = v_maxrev-1
    and a.changes_from <> v_OriginalPOAmount;
    else
    select distinct a.changes_to
    into v_changes_to_prev
    from icx_po_revisions_temp_v a
    where a.header_id = :poh_po_header_id
    and a.field_altered = 'Amount'
    and a.revision_num = 1;
    end if;
    v_result_final := v_changes_to_curr - v_changes_to_prev;
    else
    select distinct a.changes_from,a.changes_to
    into v_changes_from,v_changes_to
    from icx_po_revisions_temp_v a
    where a.header_id = :poh_po_header_id
    and a.field_altered = 'Amount'
    and a.revision_num = 1;
    v_result_final := v_changes_to - v_changes_from ;
    end if;
    return v_result_final;
    /* exception
                   when others then
                   return 0; */
    end;
    Can anyone shed a light on this.
    thanks
    kalpana

  • Error when calling an Portal Package

    I get the following error when calling a portal30 package. I am logged on to
    another schema. I have run the provsyns.sql (per Doc ID: 122562.996) statement
    but it still doesn't work.
    Any help is appreciated.
    SQL> declare
    2 l_id number;
    3 begin
    4 l_id :=
    portal30.wwsec_api_private.add_portal_user(p_User_Name=>'user1');
    5 end;
    6 /
    declare
    ERROR at line 1:
    ORA-06510: PL/SQL: unhandled user-defined exception
    ORA-06512: at "PORTAL30.WWSEC_API_PRIVATE", line 198
    ORA-06510: PL/SQL: unhandled user-defined exception
    ORA-06512: at "PORTAL30.WWLOG_API", line 183
    ORA-06510: PL/SQL: unhandled user-defined exception
    ORA-06512: at "PORTAL30.WWCTX_SSO", line 849
    ORA-06510: PL/SQL: unhandled user-defined exception
    ORA-06512: at "PORTAL30.WWCTX_SSO", line 669
    ORA-06502: PL/SQL: numeric or value error
    ORA-06512: at line 4
    Thanks,
    Tom Henricksen
    null

    Hi,
    What is the implementation of your Web service? If it's another EJB then you have to define an ejb-local-ref in the deployment descriptor for that other EJB, like this:
    <ejb-local-ref>
        <ejb-ref-name>ejb/MyProcessorBean</ejb-ref-name>
        <ejb-ref-type>Session</ejb-ref-type>
        <local-home>your.package.BiasProcessorLocalHome</local-home>
        <local>your.package.BiasProcessorLocal</local>
    </ejb-local-ref>
    If it's not a J2EE component, there is no java:comp environment naming context (ENC) available. In this case you can look up the EJB local home from the "localejbs/" context, e.g. "localejbs/provider.name/YourAppName/YourEjbName". By default the provider name is "sap.com".
    For more information please refer to <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/java/accessing%20ejb%20applications%20using%20jndi.pdf">this article</a>.
    HTH!
    -- Vladimir

  • Rep-1401: formula name : Fatal Pl/SQL error occured

    Hi,
    I am using report builder 6.0 and recently came across a error while running the report. Rep-1401:<formula name> : Fatal Pl/SQL error occured.
    I created a formula column in the report. In that i have three local variable.
    f_val number := 0;
    s_val number := 0;
    t_val number := 0;
    t_val := f_val/s_val ; --> this gives the above fatal error.
    t_val := (f_val + 1)/s_val; --> this gives the above fatal error
    t_val := f_val/(s_val + 1); ---> no error
    if i change the value of s_val
    s_val := 1;
    t_val := f_val/(s_val - 1) ; ----> this gives the above fatal error.
    Can anyone help me to solve this problem or is it report builder bug.
    Please help me, as i desperately need help.
    Thanks

    Thanks for ur reply.
    I used nvl too, but the same error occurred.
    For the information in my question I by mistake typed
    t_val := (f_val + 1)/s_val; --> this gives the above fatal error.
    but when the value of f_val = zero and s_val is zero why it gives fatal error when i divide, i used nvl on both the variable while dividing but still got the same error.
    but if s_val is greater than zero then no error occurs.
    please help me, I feel it is a bug.

  • Rep-1401 : Fatal PL/SQL error occured

    Hi,
    I am using report builder 6.0 and recently came across a error while running the report. Rep-1401:<formula name> : Fatal Pl/SQL error occured.
    I created a formula column in the report. In that i have three local variable.
    f_val number := 0;
    s_val number := 0;
    t_val number := 0;
    t_val := f_val/s_val ; --> this gives the above fatal error.
    t_val := (f_val + 1)/s_val; --> this gives the above fatal error
    t_val := f_val/(s_val + 1); ---> no error
    if i change the value of s_val
    s_val := 1;
    t_val := f_val/(s_val - 1) ; ----> this gives the above fatal error.
    Can anyone help me to solve this problem or is it report builder bug.
    Please help me, as i desperately need help.
    Thanks

    The best way to handle this is to just add an exception handler that handles a zero divide.
    EX:
    function...blah
    var3:=var/var2...
    EXCEPTION
    when zero_divide then
    var3:= 0;Zero Divide is a built-in exception to handle cases just like this - so if you run into it, you can set it to whatever you want

  • REP-1401:'cf_1formula': Fatal PL/SQL error occured, ORA-01403: no data fou

    hi,
    my report is giving error REP-1401:'cf_1formula': Fatal PL/SQL error occured,
    ORA-01403: no data found
    There are two table emp1 and emp2 created from employees table from HR schema
    I have deleted some records from table emp2 where department id is 110
    main query is
    select employee_id, first_name, department_id from emp1
    now i created a foumula column
    function CF_1Formula return Number is
    dept number;
    begin
    select department_id into dept from emp2 where employee_id = :employee_id;
    return(dept);
    end;
    the above error is given when report is run. i tried
    exception
    when_no_data_found then
    dept:=000
    but problem is not solved
    i want to disply any number in this foumula column if the record is not found

    M. Khurram Khurshid wrote:
    exception
    when_no_data_found then
    dept:=000try this code in formula
    function CF_1Formula return Number is
    dept number;
    begin
    select department_id into dept from emp2 where employee_id = :employee_id;
    if dept is not null then
    return(dept);
    else
    return 0;
    end if;
    end; Hope this will help you...
    If someone response is helpful or correct please, mark is accordingly.

  • REP-1401: 'cf_10formula': Fatal PL/SQL error occurred. ORA-06502: PL/SQL: numeric or value error

    Hi Team,
    I am running one conc programme.
    After running I am getting below  error. I checked the issue on metalink  and other, seems that it is an size related issue. I have increased the size of formula columns and placeholdder too.
    But still getting issue.
    My requirement is to get comma seperated values using SQL query itself. Neither i wanted to create layout of the report , since it is a XML publisher report and nor  I am including it on RTF template.
    I want the CF_10 formula column to be populated with comma seperated values.
    MSG-00187: From Date 01-Sep-2014
    REP-1401: 'cf_10formula': Fatal PL/SQL error occurred.
    ORA-06502: PL/SQL: numeric or value error
    And Here is my code for CF_10
    function CF_10Formula return Number is
    begin
       SELECT NVL(TO_CHAR(sum(Amount),'99,99,99,999'),0) into :CP_5 --NVL(ROUND(sum(Amount)),0) into :CP_5
    --  xxhw_Coll_cat(category)     "Intercat  Catg"
    FROM hhxw_Region_col_v
    WHERE Category IN ('Intercompany - CATV')
    AND trunc(gl_date) BETWEEN TO_DATE(:P_FROM_DATE, 'DD/MM/RRRR') AND TO_DATE(:P_TO_DATE, 'DD/MM/RRRR');
    RETURN ROUND(:CP_5);
    end;
    Anyone please suggest me.
    Regards,
    Sachin

    Hi,
    1)Why are you selecting the value into a report item? Select into a local variable and return that
    RETURN :CP_5 --> This one!!
    2)And you should avoid applying functions to DB columns in where clauses wherever possible, so oracle can use indexes on them if applicable:
    AND gl_date >= To_date(:P_FROM_DATE, 'DD/MM/RRRR')
    AND gl_date < To_date( :P_TO_DATE, 'DD/MM/RRRR') + 1;
    I think you are taking 2 column in the Layout CF_10 and CP_5 right? if so, then use below Query.
    FUNCTION cf_10formula
      RETURN NUMBER
    IS
      v_amount NUMBER:null;
    IS
    BEGIN
      BEGIN
        SELECT nvl(round(SUM(amount)), 0)
        INTO   v_amount --> Retruns the value for CF_10 column
        FROM   hhxw_region_col_v
        WHERE  category IN ( 'Intercompany - CATV' )
        AND    gl_date >= to_date(:P_FROM_DATE, 'DD/MM/RRRR')
        AND    gl_date < to_date( :P_TO_DATE, 'DD/MM/RRRR') + 1;
        :CP_5 := nvl(trunc(v_amount),0); --> Retruns the value for CP_5 column
      EXCEPTION
      WHEN OTHERS THEN
        v_amount := 0;
        srw.message(1003,'Error in Getting  :' ||p_from_date);
      END;
    END;
    And
    If you've got a number function returning into a number field then all you should need to do to make the comma appear is to change the number format mask in field.
    From 40000 to 40,000

Maybe you are looking for

  • IPad- SSID hop doesn't work

    Hello, We have two SSID's Guest and Corp. We are using 5508 controllers. The problem is that if an iPad user is connected to Guest SSID and then try to connect to Corp then it fails saying "Unable to connect to Corp". After 10-15 retires the same iPa

  • HT201229 Number blocking in iO7: Wild card?

    I like the new number blocking, but I would like to be able to block known sources of spam calls without waiting to get called by every one. I have no reason to want calls from Pacific Telecom, for instance, so I'd like to block entire ranges like "(

  • How to get sum from max value

    Hi Experts I stuck with small problem ,any one please solve the problem i appreciate ur help Below is my table , i need to get maximum operation i..e from order 10 the maxi operation is #/02 and for order 20 operation is  #/01 . and i need to sum it

  • Sun.io.MalformedInputException (content conversion)

    Hi In my content conversion the flat files have a line separator as ‘ . It gives me an exception " Conversion of file content to XML failed at position 0: sun.io.MalformedInputException" but when i change the ‘ to ' it works without any error. Did an

  • Slow/Choppy SWF Animation When View Online

    When I view an swf file from my hard drive, the animation is smooth and snappy (a good thing). After I publish the file and view it online (with the same computer), sometimes it is noticeably slower and choppy. I don't know a great deal about what Fl