Can we call a procedure defined in a procedure in AM itself AM?

Dear members,

I just want to know is there a way standard oracle to call a procedure defined in AM since another procedure defined in the same AM. For example

AM Code:_

Public Sub proc1()
*{*
System.out.println ("IAM IN PROCEDURE-1");
*}*

Public Sub proc2()
*{*
PROC1;
*}*

Please please let me know if the above coding style is according to standards or not.

Thanks in advance.

Best regards
Arun D. Reddy

Arun,

As Ravi mentioned this way to call the method is correct.
PROC1() could be reusable it is why you call again.

Sometimes a few methods (procedure) is frequent use on the module.
In this case, you can have the method in a commonAM and you extend the commonAM in all your AMs
who will help you compose in all AM having a central place to call.

Thank you

With respect,
Kali.
OSSI.

Tags: Oracle Applications

Similar Questions

  • Can we call the procedure inside the function?

    Hello

    Can we call the procedure inside the function?

    Thank you
    Brij

    845712 wrote:

    Can we call the procedure inside the function?

    Strange question to ask.

    Yes. This is the standard behavior in most (if not all) procedural and object oriented languages.

    A procedure, function or a method is a unit of code.

    You can call one of the other units. Units can call themselves (recursion). Technically, this means simply by pushing the battery current (to save the stack of the current device memory), the call to the new unit and then popping up battery when control is returned to the unity of the appellant.

    There are very few exceptions to this. The only one that comes to mind programming languages I've used through the years, is natural 1 - could not call a new unit of code to replace the existing one in memory. If no call-and-return was possible.

    Exactly what did you ask this question? Some newcomers to confused Oracle SQL and PL/SQL - two different languages aside server. And then also mistaken for PL/SQL client command vocabulary of SQL * more.

    You will need to make sure that understand the basics of programming (applies to most current programming languages) and Oracle concepts.

  • Can we call a procedure in the select statement?

    Can we call a procedure in the select statement?

    Hello

    Raghu_appsdba wrote:
    Can we call a procedure in the select statement?

    # You can call functions, but not procedures.

    If the procedure does not change the State of the database (for example, it isn't updated all tables), then you can wrap it in a function, or re - write function.

    Here is an example of wrapping.

    CREATE OR REPLACE FUNCTION fun_x (in_txt IN VARCHAR2)
    RETURN  VARCHAR2
    IS
    BEGIN
            proc_y (in_txt);
            RETURN  in_txt
    END     fun_x;
    
  • Can I call JSP user-defined in the VB program?

    I made a jsp page self-identified in my pdf, which is triggered by the "onclick event" of a botton, when you open the file in Acrobat.

    Can I call this JSP with VB program from outside, when the pdf file is opened in Acrobat?

    Thank you.

    TSN of right, means JavaScript Server Pages JSP and is a technology that is used on a web server for server JavaScript level. In Acrobat and PDF files, you would use JavaScript in Acrobat implementation. When it comes to JavaScript, there are two parts to every implementation: there is the basic language, which is the same for each application, and there are specific domain extensions. If two JavaScript implementations are incompatible with each other.

    If you have the JavaScript in your document and it does not work, chances are that you are not JSP.

    In this case, take a look here, where I describe how to call functions JavaScript from VB using the JSObject:

    Acrobat, JavaScript and VB walk into a bar... - KHKonsulting LLC

  • can we call a procedure in the service?

    Is that what we call a function procedure?

    If so, please explain with example.

    Thank you
    Aman

    Why don't you try it?

    SQL> set serveroutput on
    SQL> declare
      2   procedure p1 (
      3    i1 in out number
      4   )
      5   as
      6   begin
      7    i1 := 200;
      8   end p1;
      9   function f1
     10   return number
     11   is
     12    l1 number;
     13   begin
     14    p1(l1);
     15    return l1;
     16   end f1;
     17  begin
     18   dbms_output.put_line(f1);
     19  end;
     20  /
    200
    
    PL/SQL procedure successfully completed.
    
    SQL> set serveroutput off
    
  • Call the procedure this file download, but not from the URL

    Hello

    Oracle 11g, Apex 4.1.1.00.23.

    I have a procedure that generates a CSV of a query (BLOB). The query uses the apex collections.
    As it seems impossible to use collections of the apex outside Apex, I can't call this procedure from the URL to download the file (the query fails).

    How can I call my procedure on click of a button, without reloading the page, and without calling the URL ?

    I have some ideas like the creation of a new page, with a conditional header process that calls my procedure to download the file, then call it in a popup, etc... but I need a simple solution...

    Thank you.

    Yann.

    PS: actually, I need the same functionality when you change a process, let us say a process page, in the source attribute, you link < police = "courier" > [Download Source] < / font >, this link simply calls < police = "courier" > javascript:doSubmit('DOWNLOAD') < / font >, but it seems that the page is not reloaded. That's exactly what I need, it does not call for any procedure in the URL, and it does not reload the page.

    Use an application process. These run in the security model for APEX, including the use of the collections.

  • calling a procedure in a db trigger

    Hello
    CREATE OR REPLACE PROCEDURE Balance_quantity_update(V_STORE_ID IN NUMBER,  V_ITEM_SERIAL IN NUMBER) IS
    BEGIN
      UPDATE WH_T_ITEMS A
      SET BALANCE_QTY = ITEM_QTY
      WHERE STORE_ID = V_STORE_ID
      AND ITEM_SERIAL = V_ITEM_SERIAL
      AND ITEM_QTY = (SELECT MAX(ITEM_QTY)
                      FROM WH_T_ITEMS B
                      WHERE A.STORE_ID = B.STORE_ID
                      AND A.ITEM_SERIAL = B.ITEM_SERIAL);
    END;
    /
    This select Quantity MAX selected and returned by a procedure or statement must be added to the accumulated item_qty new

    How can I call this procedure in a db trigger
    After posting the current or: new.item_qty in the subsequent update & post_insert - what

    CREATE OR REPLACE TRIGGER Balance_quantity_update
    
    AFTER UPDATE ON WH_T_ITEMS 
    FOR EACH ROW
    V_BALANCE_QTY NUMBER (17,5);
    BEGIN
    
        V_BALANCE_QTY :=Balance_quantity_update(V_STORE_ID IN NUMBER,  V_ITEM_SERIAL IN NUMBER) ; -- WHAT should i put here as a parameter
    
      :NEW.BALANCE_QTY  := :OLD.BALANCE_QTY  +   V_BALANCE_QTY ;
    
    
    END;
    /
    is this correct... ?

    in your constraint list, as far as I can see it, the combination of transaction-series, of the base and point-set id must be unique. assuming that the different transaction date also means different transactions-series, this should be possible. Maybe you check the name of the constraint violated with the ORA-00001 and then make sure that the columns that are in this constraint.

  • Calling stored procedure - re-edited NullPointerException

    Hi all

    I am re-editing that my first attempt was quite low.

    I want to create a Java application that communicates with an Oracle XE database edition to:

    Class.forName ("oracle.jdbc.driver.OracleDriver");
    JOptionPane.showMessageDialog (null, "Driver loaded");
    Connection con = DriverManager.getConnection ("jdbc:oracle:thin:@//localhost:1521/xe", "SYSTEM", "root");
    JOptionPane.showMessageDialog (null, "database connected");

    This all works fine and I can perform queries and transactional instructions within the instance of java.

    However, I can't call stored procedures that I will receive a null pointer exception. The stored procedure, I try to call returns values however I know it works as I can run it in SQL Developer. The code below is the statement that calls the stored procedure, alll the sources I looked at it's correct, I also tried, cs.executeUpdate and Resultset rs when you try to call the java statement.

    public void thread_actionsperformed (ActionEvent c) //generates son
    {
    Try
    {
    CallableStatement cs = con.prepareCall ("{call PROCEDURE2}"); Calls a stored procedure that would generate threaded emails
    CS. Execute();
    JOptionPane.showMessageDialog (null, "Algorithm Threading successfully Executed");
    }
    catch (SQLException ex)
    {
    ex.printStackTrace ();
    JOptionPane.showMessageDialog (null, "Threading algorithm Executed without success"); Error response
    }
    catch (NullPointerException ex)
    {
    ex.printStackTrace ();
    JOptionPane.showMessageDialog (null, "Threading algorithm Executed without success"); Error response
    }
    }

    The Java application cannot 'see' the sp? Or is it something to do with privileges? I was puzzled by this during some time now, any help would be greatly appreciated.

    java.lang.NullPointerException
    at ETA_Final.thread_actionPerformed (ETA_Final.java:332)
    to ETA_Final$ 5.actionPerformed(ETA_Final.java:141)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
    in javax.swing.AbstractButton$ Handler.actionPerformed (AbstractButton.java:2318)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
    at javax.swing.AbstractButton.doClick(AbstractButton.java:357)
    at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1223)
    in javax.swing.plaf.basic.BasicMenuItemUI$ Handler.mouseReleased (BasicMenuItemUI.java:1264)
    at java.awt.Component.processMouseEvent(Component.java:6263)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3255)
    at java.awt.Component.processEvent(Component.java:6028)
    at java.awt.Container.processEvent(Container.java:2041)
    at java.awt.Component.dispatchEventImpl(Component.java:4630)
    at java.awt.Container.dispatchEventImpl(Container.java:2099)
    at java.awt.Component.dispatchEvent(Component.java:4460)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4574)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
    at java.awt.Container.dispatchEventImpl(Container.java:2085)
    at java.awt.Window.dispatchEventImpl(Window.java:2475)
    at java.awt.Component.dispatchEvent(Component.java:4460)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

    Thank you and best regards,

    K

    Published by: Outbound86 on April 28, 2010 13:58

    Hi Kev,

    I expected this - so is it possible that your dumb object is null when you are in the ActionListener who manages the procedures?
    How will you spend until you use it (line 332), are you using Threads?

    Thnaks,
    Ivaylo

  • Call the procedure problem

    Hello
    It's my first day at procedures SQL, my apologies if this question is stupid
    I wrote this procedure which compiles ok:
    CREATE PROCEDURE ADDLOCATION (lid IN locations.location_id%TYPE, ldes IN locations.description%TYPE)AS
    BEGIN
         INSERT INTO LOCATIONS (location_id,description) 
         VALUES (lid,ldes);
    END ADDLOCATION;
    /
    When I try to call this procedure in the script below, it does not work. I can't call a procedure since the BEGIN clause or is my syntax incorrect? Can you explain or explain the error message I'm getting >(PLS-00103: Encountered the symbol "ADDLOCATION" when expecting one of the following::=.) ( @ % ; The symbol ': = ' was replaced by 'ADDLOCATION' continue.)
    Thanks a mil :)
    DECLARE
           highestlid locations.location_id%TYPE;
    BEGIN
           SELECT 
                max(location_id)
           INTO
                highestlid
           FROM
                locations;
           highestlid:=highestlid+1;
           CALL ADDLOCATION(highestlid,'Lucan'); 
    END;
    /
    DECLARE
           highestlid locations.location_id%TYPE;
    BEGIN
           SELECT
                max(location_id)
           INTO
                highestlid
           FROM
                locations;
           highestlid:=highestlid+1;
           ADDLOCATION(highestlid,'Lucan');
    END;
    / 
    
  • Call a procedure in the application. Frank please check this box

    Hello

    I hv download screen connection on the following site. Now, I'm trying to connect even with my database. I have this hv the field password of the application as previously only username is available in the user interface.

    [http://blogs.oracle.com/shay/simpleJSFDBlogin.zip]

    The problem is that my password of database field is protected by encryption of integrated oracle. There is a procedure I hv in the database for the encryption of the password. How can I call the procedure in the application? In the application I hv submitted business components and I hv attached procedure in demand as' database offline"I hv to fix each source database like this? is this right way that I followed to call the procedure?

    Please guide me

    Thanks in advance

    Dounya.

    Hello

    Take a look at the guide to the developer of the call of stored procedures and functions. Rather than base the query for the form of connection on a VO, you use a stored procedure function in a client method exposed on the VO or AM

    http://download.Oracle.com/docs/CD/E12839_01/Web.1111/b31974/bcadvgen.htm#sm0297

    Frank

  • call a procedure of package DB type complicated if the type defined in the package itself

    Hello world

    I use jdev 11.1.1.7.0

    I defined a package of data with a procedure and internal two types as follows:

    Create Or Replace Package Db_Package As 
    
    Type rec Is Record(Rec_Type Varchar2(10), Rec_Desc varchar2(10) );                        
    Type recordList Is Table Of rec;
    
    Procedure Test_Procedure(p_out out recordList);
    END db_package;
    
    
    

    evil

    I want to call this procedure in the module of the application. I know how to call a procedure or function db AM,

    but in this case that I've defined two types in the package itself and I use one of these types as to the procedure output parameter, I had a problem.

    below is the example of code to call the db procedure, but it does not work because the plsqlBlock.registerOutParameter () setting will not

            CallableStatement plsqlBlock = null;
            String statement = "Begin DB_PACKAGE.Test_Procedure(:1); END;";
            try {
                plsqlBlock = getDBTransaction().createCallableStatement(statement, 0);
                plsqlBlock.registerOutParameter(1, OracleTypes.ARRAY);// it doesn't work
                plsqlBlock.executeUpdate();
                Object object = plsqlBlock.getObject(1);      
    
    
            } catch (Exception e) {
                e.printStackTrace();
            }
    
    
    
    

    I know that if I set the types of packets (rec, recordList) as types of oracle (instead of setting in the packaging itself) so I can call the procedure with success, in this case I should use below:

    plsqlBlock.registerOutParameter(1, OracleTypes.ARRAY,"Recordlist");
    

    but I wonder how you can call a procedure from the package if the types defined in the package itself.

    Kind regards

    Habib

    JDBC supports the types of oracle level package only from 12 c database and jdbc driver ojdbc7 (which requires java 7).

    Dario

  • Case function can be used as a parameter when calling a procedure, please advise...

    Case function can be used as a parameter when calling a procedure, please notify

    The daily procedure is called with the parameter 3 following one of the parameters using a function box between them as shown below.

    Daily_Ins (c1.p_mtrid, c1.p_UOM CASE WHEN "KWH" THEN 1 ELSIF 'KW' THEN 2 END, v_dateHold);

    In my opinion, using decode is illegal, so I think that I cannot say something like :

    Daily_Ins (c1.p_mtrid, ( decode c1.p_UOM, "KWH", 1 'KW', 2), v_dateHold);

    I think I just found something on the net

    SQL > DECLARE

    2 wages NUMBER: = 20000;

    3 employee_id NUMBER: 36325 =;

    4

    5 PROCEDURE give_bonus (emp_id in NUMBER, bonus_amt number) IS

    6 BEGIN

    7 DBMS_OUTPUT. Put_line (emp_id);

    8 DBMS_OUTPUT. Put_line (bonus_amt);

    9 END;

    10

    BEGIN 11

    12 give_bonus (employe_id,

    13 CASES

    14 salary when > = 10000 AND salary<=20000 then="">

    15. WHAT salary > 20000 AND salary<= 40000="" then="">

    16. WHAT > 40000 salary THEN 500

    17 0 OTHERWISE

    18 END);

    END 19;

    20.

    PL/SQL procedure successfully completed.

  • Call a procedure from javascript

    Hello

    I would like to help on the following please.

    I have a JavaScript in page region 'function and Global Variable declaration ':
    function openUrl(pUrl) {
      window.open(pUrl,"_blank","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, copyhistory=no, width=1024, height=768");
    }
    In the same page one have a number of standard reports. A number of columns in each of these reports sets a link. The binding for all the columns settings are defined as follows:
    Target: URL
    URL: javascript:openUrl('http://#SERVERNAME#:9704/xmlpserver/Publications/Dock_Report.xdo?_xpf=&_xpt=0&_xdo=%2FPublications%2FDock_Report.xdo&_xmode=4&_paramsID_USU=#ID_USU#&_paramsIDCR=#IDCR#&_paramsIDCU=#IDCU#&_xt=DPol_Layout&_xf=pdf&_xautorun=true');
    As you see, the user of the application, click on the link on the column of the report and a popup is generated showing the report. It all works very well.

    My requirement is to call a procedure from the augments that are included in the column link that was clicked by the user of the application.
    #ID_USU#
    #IDCR#
    #IDCU#
    My question is how to achieve this as the url is inside a call to javascript?

    Can I use the Javascritp set in the page to extract the details, and then use javascript to call a procedure?

    Any help, pointers, ideas, everything is welcome.

    Request Express 4.0.2.00.07

    Thank you

    Published by: zooid on 4 April 2013 22:47

    Have you seen this javascript API? http://docs.Oracle.com/CD/E17556_01/doc/apirefs.40/e15519/javascript_api.htm#BGBJHEHG

    It has very convenient function: apex.submit (pOptions);

    Specify the target URL as:

    JavaScript:rowClick('#ID_USU#',_'#IDCRM#',_'#IDCU#');

    Then add a function to your page somewhere:

    function rowClick(idUsu, idcrm idcu){
    
      openUrl(/*url*/);
      apex.submit({request: "SOME_REQUEST_VALUE", set: {Px_ID_USU: idUsu, Px_IDCRM: idcrm, Px_IDCU: idcu}});
    
    }
    

    (Where you have page elements for each of the items that you want to set.

    Then you can have a process of PL/SQL page, under condition of request = expression 1, term 1 = SOME_REQUEST_VALUE

    And do you want to ;-)

  • can we create a procedure in a procedure

    DB version: 11 g

    Hello

    I just wanted to ask guys like can create us a procedure in a procedure... If not is there another solution?

    in db2, it is therefore permissible cela oracle support?

    Thank you

    Can you? Sure. Should you? Usually not.

    You can do something like

    CREATE OR REPLACE PROCEDURE p1
    AS
      <>
    
      PROCEDURE p2
      IS
      BEGIN
        <>
      END p2;
    BEGIN
      p2;
    END;
    

    It is rarely indicated, however, to declare nested blocks that way. As always, you should be setting out procedures in packages in any case, it would be much more sensible to define a private procedure in the package body you are calling.

    Justin

  • How to call a method defined in AppmoduleImpl using a groovy expression?

    Hi experts,

    With the help of jdev 11.1.1.5.0 - adfbc battery.

    I followed this post as the blogger says.
    How to call a method defined in AppmoduleImpl using a groovy expression?
    https://blogs.Oracle.com/ADF/entry/how_to_call_a_method

    While a button insert hit

    Suite error survey.
    java.sql.SQLException: ORA-20483: ADM-
    ORA-06512: at "RMSTD.FUNC_FIND_PLNT_DESC", line 22
    ORA-06512: at line 1
    
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:457)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:405)
         at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:889)
         at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:476)
         at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:204)
         at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:540)
    It is my code for the function.
    CREATE OR REPLACE FUNCTION func_find_plnt_desc (
       p_bu        VARCHAR2,
       p_plnt_id   VARCHAR2,
       p_lang      NUMBER
    )
       RETURN VARCHAR2
    IS
       CURSOR cur_find_plant
       IS
          SELECT bup_name1, bup_name2
            FROM bus_unit_plants
           WHERE bup_bu = p_bu AND bup_plant_id = p_plnt_id;
    
       rec_find_plant   cur_find_plant%ROWTYPE;
    BEGIN
       OPEN cur_find_plant;
       FETCH cur_find_plant INTO rec_find_plant;
    --RAISE_APPLICATION_ERROR(-20999,P_BU||P_PLNT_ID);
       IF cur_find_plant%NOTFOUND
       THEN
    
          raise_application_error (-20483, 'ADM' || P_PLNT_ID ||'-'||P_BU);
          --NULL;
       END IF;
    
       CLOSE cur_find_plant;
    
       IF p_lang = 1 THEN
          RETURN (rec_find_plant.bup_name1);
       ELSIF p_lang = 2 THEN
          RETURN (rec_find_plant.bup_name2);
       END IF;
    END;
    /
    Reason behind:
    while hitting the insert means null from the value of the survey so error function.

    If am not hitting doesn't mean no problem. the function works correctly return description.

    can someone help me how to override?

    Published by: ADF7 on April 10, 2012 23:51

    ADF7,
    the subject of the post has nothing to do with the question (for as far as I see it).
    As you can see the error message clearly comes from the procedure pl/sql you call the application module, works of groovy appeal method.

    We cannot decide what makes your service if you pass null as a parameter. You can check the settings before you proceed to the procedure or write the procedure in how it treats null parameters.

    Timo

Maybe you are looking for