How to call the procedure on the page of the ofa

Hi all

I have a button.when I click this button need to call the procedure and should return the values.i tried with below code.am is error.i am passing two parameters to the procedure.please suggest me where I made a mistake in the code.

error while calling procedure.PNG

code in am

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

public String calprorate (String laseid, String billingid)

{

OADBTransaction oadbtransaction = (OADBTransaction) getTransaction ();

OADBTransactionImpl oadbtransactionimpl = (OADBTransactionImpl) getTransaction ();

String retValues;

System.out.println ("number:" + laseid);

StringBuffer str = new StringBuffer();

Str.Append ("BEGIN");

Str.Append (LEASE_PRORATE_PKG ".") LEASE_PRORATE_PROC1 (»);

Str.Append ("p_lease_id = >: 1");

Str.Append ("p_billing_id = >: 2");

Str.Append ("P_PRORATE = >: 3");

System.out.println ("params");

Str.Append (»); «) ;

Str.Append ("END");

System.out.println ("End");

OracleCallableStatement oraclecallablestatement =

(OracleCallableStatement) oadbtransaction.createCallableStatement (str.toString (), 1);

System.out.println ("Oracle");

try {}

oraclecallablestatement.setString(1,laseid);

oraclecallablestatement.setString(2,billingid);

oraclecallablestatement.setInt (1, Integer.parseInt (laseid));

oraclecallablestatement.setInt (2, Integer.parseInt (billingid));

System.out.println ("param");

oraclecallablestatement.registerOutParameter (3, Types.VARCHAR);

System.out.println("3");

oraclecallablestatement. Execute();

System.out.println ("exe");

retValues = oraclecallablestatement.getString (3);

}

catch (System.Exception e)

{

System.out.println ("delivery");

throw OAException.wrapperException (e);

}

Return retValues;

System.out.println ("End");

}

code co:

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

If (pageContext.getParameter ("Calc")! = null) {}

Vo1 OAViewObject = (OAViewObject) am.findViewObject ("AddonBillingVO");

System.out.println ("VO");

{if(VO1!=null)}

CNT int = vo1.getRowCount ();

System.out.println ("count:" + cnt);

If (cnt > 0)

{

RowSetIterator rs = vo1.createRowSetIterator("empIterator");

System.out.println ("EMP");

If (rs! = null)

{

While (rs.hasNext ())

{

AddonBillingVORowImpl line = rs.next ((AddonBillingVORowImpl));

System.out.println ("impl");

If (line! = null)

{

String laseid = row.getAttribute("LeaseId").toString ();

System.out.println (laseid);

String billingid = row.getAttribute("AddonBillingId").toString ();

[Serializable] param = {}

laseid, billingid

};

String newupc = (String) am.invokeMethod ("calprorate", param);

}

}

Khalil.

You can paste your spec procedure here?

Also see: Oracle tips of Johny: OAF: sample code to call the PL/SQL of OA Framework procedure

Tags: Oracle Applications

Similar Questions

  • How to call the OFA PL/SQL procedure.

    Hello

    I'll call the pl/sql stored procedure of the OAF page (AM). the procedure is content parameter 3 IN 1 OUT parameter. all the parameters of character type is integer.


    I put the output parameter and it's returning the value, but I don't have how to configure the setting IN because the settings IN, I need to convert the INT data type number in java.

    Please help me.


    int in_parm1 = 0;
    Number in_param;
    Request_id number;
    request_id = new Number (0);
    getDBTransaction () .commit ();
    TXN OADBTransaction = getOADBTransaction();
    int l_user_id = txn.getUserId ();
    int l_resp_id = txn.getResponsibilityId ();
    int l_resp_appl_id = txn.getResponsibilityApplicationId ();
    Number of ln_user_id = new Number (l_user_id);
    Number of ln_resp_id = new Number (l_resp_id);
    Number of ln_resp_appl_id = new Number (l_resp_appl_id);
    CallableStatement cs = txn.createCallableStatement ("start oaf_request(:1,:2,:3,:4); end; ", 1) ;
    Try
    {
    System.out.println ("run ahead");
    cs.registerOutParameter (3, Types.VARCHAR, 0, 100);
    cs.registerOutParameter(1,in_param);
    cs.registerOutParameter(4,Types.NUMERIC);
    DSI Execute();
    in_parm1 = cs.getInt (4);
    request_id = new Number (in_parm1);
    System.out.println ("Request ID" + in_parm1);
    System.out.println ("run after");
    DSI Close();
    System.out.println ("result");
    }
    catch (System.Exception e)
    {

    throw OAException.wrapperException (e);

    }

    I would tell you to go through the "appeal of PL/SQL procedures and functions" Section in the User Guide.
    Example and the details are there reference.

    Thank you

  • How to call the procedure type table

    Hi I have the below requirement

    Created in the sub table type

    CREATE or REPLACE the TYPE char_type IS the TABLE OF VARCHAR2 (4000);

    create or replace procedure test_proc_type (p_type char_type) is

    Start

    I'm looping 1.p_type.count

    dbms_output.put_line (p_type (i));

    end loop;

    end;

    How to call the procedure with parameter as a type!

    SQL> create or replace type  char_type as table of varchar2(4000)
      2  /
    
    Type created.
    
    SQL> create or replace procedure test_proc_type (p_type char_type)
      2  is
      3  begin
      4    for i in 1..p_type.count loop
      5      dbms_output.put_line (p_type(i) ) ;
      6    end loop;
      7  end;
      8  /
    
    Procedure created.
    
    SQL> set serveroutput on
    SQL>
    SQL> exec test_proc_type(char_type('A','B','C','D','E'))
    A
    B
    C
    D
    E
    
    PL/SQL procedure successfully completed.
    
    SQL>
    
  • How to call the stored procedure when I press the button

    Hello

    I want to know how to call the procedure/SQL statement when I press the button using callable statement.

    can someone give me it please link who knows the steps to do this.

    Thanks in advance,
    SAN

    Hello

    read this good example http://www.baigzeeshan.com/2010/05/calling-plsql-procedure-and-function-in.html

    ~ Abhijit

  • How to call the setting menu of the BIOS on HP DV4 1540us netbook?

    Hi all

    How to call the setting menu of the BIOS on HP DV4 1540us netbook?

    F2 does NOT an on-screen BIOS setting.

    Is there another trick?  Or, perhaps, defining the procedure step by step to start the BIOS?

    TIA

    Power on the laptop and all logo HP being displayed, press F10.

  • How to call the javascript function in ADF

    I have the javascript function stored in a .js file external (try to reuse in another application). How can call the javascript function for an event of ADF faces component. I need to I am a newbie to ADF, all ideas are appreciated.

    Kind regards
    Surya

    Published by: sgodavar on Sep 24, 2010 11:44

    Include JavaScript to the jsff/jspx as page:

    Call it like:

    Type = "dblClick" / >
    Amit

  • How to call the function (function Build-in user) in Pro * C program

    We have developed the application Pro * C program.
    TimesTen version is "TimesTen release 11.2.1.5.0 (64-bit, Linux/x86_64) (tt112150:53308) 2010-03 - 04 T 20: 39:30Z.

    We would like to develop Pro * C program you are using PL/SQL.

    We have a few questions.
    How to call the function (function Build-in user) in Pro * C program?

    #########
    TEST
    #########

    ttisql:
    Command > create or replace FUNCTION F_SAMPLE (i_str IN VARCHAR2)
    > BACK NUMBER
    > o_number NUMBER;
    > START
    > select i_str
    > in o_number
    > double;
    >
    > O_number RETURN;
    >
    > EXCEPTION
    > Others THEN
    > RETURN 0;
    > END;
    > /.
    display errors
    The function is created.
    Order > show errors
    No errors.
    Command >
    Command > set serveroutput on;
    Command > declare
    > number of num1;
    > start
    > num1: = F_SAMPLE ('A');
    > DBMS_OUTPUT. PUT_LINE ("F_SAMPLE" |) ' ' || NUM1);
    > end;
    > /.
    F_SAMPLE 0

    PL/SQL procedure successfully completed.

    Command >


    Pro * C case:

    EXEC SQL BEGIN DECLARE SECTION;
    number of num1;
    EXEC SQL END DECLARE SECTION;

    EXEC SQL EXECUTE
    Start
    : num1: = F_SAMPLE ('A');
    end;
    END-EXEC;

    Make sure to install:
    Error on line 146, column 3, file plsqlPROC.pc:
    Error on line 146, column 3 in file plsqlPROC.pc
    number of num1;
    .. 1
    PCC-S-02201, encountered the symbol "num1" when expecting one of the following conditions:


    Thank you.

    GooGyum

    There are two problems with your variable declaration:

    1. the name of the variable and type are thew misplacement autour.

    2. you may not use a host variable type.

    If you change this to:

    EXEC SQL BEGIN DECLARE SECTION;
    int num1;
    EXEC SQL END DECLARE SECTION;

    Then it will work very well.

    Chris

  • How to call the web service?

    Hello

    I want to know how to call the web service from my application HTML5 & javascript.

    Please help me find this detail as what I can access easily. and I want to access web services online (a method of it) I'm not concered with how background Web service takes place.

    I just want that when you call a web service method, I will return the result.

    Please try this out for a WebService call

    var xmlhttp;
    xmlhttp = new XMLHttpRequest();
    xmlhttp.open("get","your url",true);
    xmlhttp.setRequestHeader("Accept","application/json");
    xmlhttp.setRequestHeader("Content-type", "application/json");
    xmlhttp.onreadystatechange=function() {
     if (xmlhttp.readyState==4) {
      if (xmlhttp.status == 200) {
        console.log(xmlhttp.responseText);
      }
     }
    }
    xmlhttp.send();
    

    This will display the result of the invocation of webservice. The url is the application that you deploy and the type can be get/post. If xmlhttp.send (post) takes argument for the display of the data. You can call it by clicking a button in HTML.

  • How to call the java function with javascript setting in mobile adf?

    How to call the java function with javascript setting in mobile adf?

    The ADF Mobile utility container API can be used from JavaScript or Java.

    Application container API - 11 g Release 2 (11.1.2.4.0)

  • How to call the variables of the scene inside movieClips

    How to call the variables of the scene inside movieClips

    One way would be to use "MovieClip (root)" to target variables in the main timeline... MovieClip (root) .someVariable = someValue;

  • Hi friends I want to know how to call a procedure that has values arrary as parameter?

    I have a procedure as shown below, and I am using oracle 11g.

    create or replace procedure procedureName (v_hospital_id in NUMBER,

    v_process_id VARR_VARRY,

    v_cnt OUT NUMBER);

    Now, how to call this procedure from PLSQL. If v_process_id values ('abc123', 'xyz234', 'sfs234')

    Please present the definition of VARR_VARRY

    If it's a simple table of varchar2.

    declare

    v_cnt NUMBER;

    Start

    procedureName (1, VARR_VARRY('abc123','xyz234','sfs234'), v_cnt);

    end;

  • How to call the page url inside the procedure.

    Hello


    I'm not exhibition in plsql.
    I have some problem in utl_http link.

    I create a procedure. The procedure has been compiled successfully. But the page url does not open...

    I have attached the procedure,

    create or replace procedure p (number of mob)
    IS
    long l_page;
    l_url varchar2 (25000 char);

    Start
    null;
    l_page: = utl_http.request ("http://www.yahoo.com");
    end;


    Please tell me the solution for this problem...


    I await your response.

    Thank you
    Sasi.

    This is a duplicate thread:

    How to open the web page in pl/sql

    the OP doesn't seem to understand the difference between a web browser and a programming language... I can't say I've ever had to explain the difference before...

    Let's say that... the butterflies are not somehow similar to razors electric...

  • How to call the procedure in the process

    Hello

    I have create procedure abc.
    How can I call procedure abc in the process in the processing of the Page.
    I want to call this procedure when I press the "submit" button.

    Thank you

    Hello

    Yes, that is correct

    Kind regards
    Jari

  • How to call the stored procedure from javascript? (Google suggest, AJAX)

    Hi I want to set up a text field so that it behaves like [Google Suggest | http://www.google.com/webhp?complete=1 & hl = en].

    I read this post .

    Now, I installed everything according to this document. But it simply doesn't. And I don't know why.

    I think that problems can fall into the following three categories:
    1. the text field and the page invoking the appropriate javascript?
    2 - is the JavaScript call the stored procedure?
    3. the stored procedure correctly returns the result formatted?

    I'm assertive for 1 and 3, but I'm not sure 2. Because I don't know how if a stored procedure has been called? Is there a PL/SQL statement that I can query in SQL * more?

    Also, I would like to know how to debug AJAX in the APEX. It involves a lot of things.

    Finally, I used APEX 3.2 and Oracle XE. I can't find file dads.conf or marvel.conf. Is ' / apex / "the virtual directory for APEX?

    Thank you very much!

    Buffalo,

    I managed to make it work on XE with APEX 3.2!
    It took more time than expected because my XE installation was still on an earlier version of the Apex and I had put it first...

    But that's what I did:
    -in the ac.js file, I changed the path ' / apex / "and I added the ac.js file to my candidacy as a static file. So as you did.
    -J' copied my request to the XE and copied my procedure on the schema that is related to my request
    -J' gave to run anonymous rights my procedure

    Now at first, it did not work...
    Then I suddenly remembered something: If you want to run a procedure through the pl/sql gateway in the XE, XE please how it is.
    Do you this by changing the APEX_030200.wwv_flow_epg_include_mod_local function!

    This is the code for the function changed for my example:

    CREATE OR REPLACE function APEX_030200.wwv_flow_epg_include_mod_local(
        procedure_name in varchar2)
    return boolean
    is
    begin
        --return false; -- remove this statement when you modify this function
        --
        -- Administrator note: the procedure_name input parameter may be in the format:
        --
        --    procedure
        --    schema.procedure
        --    package.procedure
        --    schema.package.procedure
        --
        -- If the expected input parameter is a procedure name only, the IN list code shown below
        -- can be modified to itemize the expected procedure names. Otherwise you must parse the
        -- procedure_name parameter and replace the simple code below with code that will evaluate
        -- all of the cases listed above.
        --
        if upper(procedure_name) in (
              'MATTHIASH.INCSEARCH') then
            return TRUE;
        else
            return FALSE;
        end if;
    end wwv_flow_epg_include_mod_local;
    /
    

    After that, the AJAX function worked as expected...

    HTH
    Matthias Hoys

    Published by: mhoys on August 13, 2009 15:24

  • How to call the bean support just after JSFF / fragment of page loads?

    Hello

    I have a simple requirement - call the Backing Bean method for my page-fragment AFTER that its loading. The JSFF is delimited to the workflow.

    I tried the solution given here: http://fortunefusionminds.blogspot.com.au/2013/04/how-to-invoke-backing-bean-method-right.html but it does not work for me.

    Every time I tried to access any link layer (i.e. the PanelFormLayout DepartmentId) attribute/property within the refreshRegion method below gives NullPointerException.

    My DepartmentId property is exposed to the Backing Bean by using the Bindings property in the property inspector.

    @Override

    {} public boolean refreshRegion (RegionContext regionContext)

    int refreshFlag = regionContext.getRefreshFlag ();


    if(refreshFlag == RegionBinding.PREPARE_MODEL) {}

    System.out.println (getDepartmentId.GetValue ())

    }

    regionContext.getRegionBinding (.refresh (refreshFlag));

    Returns false;

    }


    {} public void setDepartmentId (RichInputText departmentId)

    this.departmentId = departmentId;

    }

    public RichInputText getDepartmentId() {}

    return departmentId.

    }

    Any help please?

    Thank you

    Hitesh Patel


    Hi all

    Here's how it works for me.

    1. in your backing bean create property & its get accessor for afterPageLoad as below. We don't need a setter method.

    private; channel afterPageLoad

    public String getAfterPageLoad() {}

    If (!.) {AdfFacesContext.getCurrentInstance.isPostBack ()}

    initPage();

    }

    Return afterPageLoad;

    }

    private void initPage() {}

    System.out.Print ("I'm initPage() and called exactly once");

    }

    2. create a hidden field to the bottom of your JSFF page as below.

    Thanks - Hitesh

Maybe you are looking for

  • synchronize bookmarks

    I decided to test Firefox sync today between my laptop and my desktop computer. After that I decided that it wasn't what I was looking for, I removed my devices sync, but now I can't get back my old settings. I have synced my computer to my laptop, a

  • Can not change his usual helmet

    My iPad took all his helmet of the sound through the iPad.  How to return her through iPad?  Not got a lot of help to contact Apple.

  • TX2500 microphone does not work

    My internal microphone does not work. Did not work since the beginning Pavilion TX2500 Realtek High Definition Audio Driver is correctly installed and update is not necessary. Can someone help me?

  • Can anyone unlock my profile

    Hello I'm on my last bit of patience. I'm so close to switching to SONY! My account has been soberly block. I don't know why it would be, I had problems with my console, it's self due not not reading the disc is another who is starting to get on my l

  • Installation of online scrabble

    My scrabble online disk will not install on my laptop with Windows 7?