Calling a procedure from a package or another procedure

Hi all,
I am trying to call a couple of procedures defined in a package using the 'call' method without any success.
i tried to create a third procedure and call the other two procedures from there, still without success. Can some one tell me the right method? also i've been trying to research a lot, but havent found any helpful documentation. where would i look for good help material on PL/SQL?
Purvi.

All Oracle's documentation is available online at http://tahiti.oracle.com. In particular, the PL/SQL User's Guide would probably be the most helpful to you.
"call" is something that is generally used on client applications (ODBC and JDBC based). It is not used when calling stored procedures in PL/SQL. If you have procedures proc1 and proc2, you can call them from a third stored procedure proc3 like this
CREATE OR REPLACE PROCEDURE proc1
AS
BEGIN
  dbms_output.put_line( 'proc1' );
END;
CREATE OR REPLACE PROCEDURE proc2
AS
BEGIN
  dbms_output.put_line( 'proc2' );
END;
CREATE OR REPLACE PROCEDURE proc3
AS
BEGIN
  proc1();
  proc2();
END;If both proc1 and proc2 were in a package called myPkg, and proc3 was a standalone procedure, you would need to modify it to reference the package name
CREATE OR REPLACE PROCEDURE proc3
AS
BEGIN
  myPkg.proc1();
  myPkg.proc2();
END;Justin
Distributed Database Consulting, Inc.
http://www.ddbcinc.com/askDDBC

Similar Messages

  • Help on ORA-06550 & PLS-00363 Error while running a procedure from a packag

    Greeting All,
    I ran the following procedure from a package on a command line in sqlplus:
    SQL> exec QUALITY_ASSURANCE.COPY_SW_RESOURCES(2009,2010,9508);Where '2009' is the old fiscal year, '2010' is the new fiscal year and '9508' is the error code passed from the calling program. But, I received the following error messages:
    ERROR at line 1:
    ORA-06550: line 1, column 53:
    PLS-00363: expression '9508' cannot be used as an assignment target
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    Any thoughts, suggestions and/or advice to resolve these errors.
    Thanks in advance.

    Orchid wrote:
    Justin,
    Thanks for your response and information. Yes, Theoa was correct the 3rd parameter is an OUT variable, and it is a numeric field. The procedure was called by a form as follows:
    QUALITY_ASSURANCE.COPY_SW_RESOURCES(:BLK_CONTROL.FROMFY,:BLK_CONTROL.TOFY,V_ERR);But the form does not work so I am trying to isolate the problem by running the procedure by itself in sqlplus to make sure there is no problem with the procedure.
    Yesterday, I was able to run the procedure in Toad for Oracle to a successful completion by providing the 3 parameters: (2009, 2010, null). Just wonder why I cannot run the same procedure with the same parameters on a command line in sqlplus as follows:
    exec QUALITY_ASSURANCE.COPY_SW_RESOURCES(2009,2010,null);So, if I understand your suggestion correctly, in order to run the procedure with the 3 parameter successfully in sqlplus,
    I have to declare the 3rd parameter in PL/SQL. That is to create a PL/SQL file as suggested and run the file, correct? CORRECT!

  • Move a procedure from one database to another database

    Hi all,
    I have a procedure belonging to a schema in one of the databases in a server (say host A).
    I have a new server (say host B) and I have installed RDBMS and have created a database.
    Now, I want to move that particular procedure (in host A) to the new schema of a database in host B.
    What are the steps to be followed? please help me out.
    Note: It is not moving a procedure from one database to another, infact from one host to database in another host.
    Thanks,
    ora_sri

    The steps are:
    1. Pay more attention to your instructor in school.
    2. Do your web searches using google.com so as not to ask other people to help you cheat on your exams.
    3. Apologize to your instructor.
    How do I know you are a student?
    1. No version number.
    2. No such thing as host A and B
    3. If you had ever written a procedure in your life you would already know the answer.
    So let us add #4 to the first list.
    4. Write a stored procedure, save it to your hard disk, and then stare at the file you created until inspiration strikes you.
    Sorry for being harsh here but I spent 10 years teaching Oracle at the University of Washington and I failed students
    who did what you did. Even asked that one be expelled. So I am doing you quite a favor and hope you learn the lesson
    I am trying to teach for your own good.

  • How to call a function from one viewmodel to another viewmodel

    Hi ,
    How to call a funtion of another viewmodel in a viewmodel . This help would be much appreciated
    Thank You
    Jeevan Vinay

    Please close your previous threads by marking helpful posts as answer before you start a new one.
    You need to either get a reference to the second view model from the first one or you could use some kind of messenger or event aggregator to pass a message from the first view model to the second one. The latter approach is preferable as it doesn't create
    a tight coupling between the two view model classes.
    Please refer to my blog post for more information and an example of how to use Prism's EventAggregator to do this:
    http://blog.magnusmontin.net/2014/02/28/using-the-event-aggregator-pattern-to-communicate-between-view-models/
    You will need to download and install Prism to be able use the EventAggregator class:
    https://www.nuget.org/packages/Prism/
    Another popular framework out there is the MvvmLight which contains a Messenger class that works pretty much the same. Andy has provided and example of how to use this one:
    http://social.technet.microsoft.com/wiki/contents/articles/26070.communicating-between-classes.aspx
    You can download and install MvvmLight via Nuget (Tools->Nuget Package Manager->Package Manager Console in Visual Studio):
    https://www.nuget.org/packages/MvvmLight/
    Please remember to close your threads by marking all helpful posts as answer and then start a new thread if you have a new question.

  • Calling a report from a form based on procedure

    I created a form based on a procedure.
    It is a entry form where the user is selecting or enters data then on submit I must display the report based on selected data.
    I know I can simply create a report with all bind variable and do the job.
    My question is what is the syntax to call the report from the procedure for the selected parameters values.
    Thanks
    Lawrence

    If you want to display other HTML page after successful submission, you need to use
    either go or call method.
    I created a form on SCOTT.EMP and a report on SCOTT.EMP and the report accept a parameter for
    the deptno. Here is my on successfull submission code:
    declare
    l_dept number;
    l_url varchar2(2000);
    begin
    l_dept := p_session.get_value_as_number('DEFAULT', 'A_DEPTNO', 1);
    l_url := 'scott.rpt_mask_1.show?p_arg_names=emp.deptno&p_arg_values='| |l_dept;
    go(l_url);
    end;
    null

  • Calling a drawLine() from one class to another from an ActionEvent

    I have several JPanel objects called and placed on a JFrame. The JFrame has a RadioButton group with radio buttons. If I select a radio button and call a drawLine() method from a JPanel, I receive a "NullPointerException". Is it not possible to call this graphic method from one class to another?
    Thanks for any input you can provide.
    John

    Remember that each panel draws it's own current state. So you need the ActionPerformed to change the state in your target panel.
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.geom.*;
    import javax.swing.*;
    import javax.swing.event.*;
    public class PanelComm extends JPanel {
      private SubPanelOne subPanelOne = new SubPanelOne();
      private SubPanelTwo subPanelTwo = new SubPanelTwo();
      public class SubPanelOne extends JPanel {
        public SubPanelOne () {
          setLayout ( new BorderLayout() );
          setBorder ( BorderFactory.createTitledBorder ( "SubPanel One" ) );
          Reactor     reactor    = new Reactor();
          ButtonGroup group      = new ButtonGroup();
          JPanel      radioPanel = new JPanel(new GridLayout(0, 1));
          JRadioButton buttonOne = new JRadioButton ( "One" );
          buttonOne.addActionListener ( reactor );
          group.add ( buttonOne );
          radioPanel.add ( buttonOne );
          JRadioButton buttonTwo = new JRadioButton ( "Two" );
          buttonTwo.addActionListener ( reactor );
          group.add ( buttonTwo );
          radioPanel.add ( buttonTwo );
          JRadioButton buttonThree = new JRadioButton ( "Three" );
          buttonThree.addActionListener ( reactor );
          group.add ( buttonThree );
          radioPanel.add ( buttonThree );
          add ( radioPanel ,BorderLayout.LINE_START );
        protected void paintComponent ( Graphics _g ) {
          super.paintComponent ( _g );
          Graphics2D g = (Graphics2D)_g;
          g.setRenderingHint ( RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON );
      public class SubPanelTwo extends JPanel {
        private JLabel text = new JLabel();
        public SubPanelTwo () {
          setLayout ( new BorderLayout() );
          setBorder ( BorderFactory.createTitledBorder ( "SubPanel Two" ) );
          text.setFont ( new Font ( "Verdana" ,Font.PLAIN ,30 ) );
          text.setHorizontalAlignment ( JLabel.CENTER );
          add ( text ,BorderLayout.CENTER );
        protected void paintComponent ( Graphics _g ) {
          super.paintComponent ( _g );
          Graphics2D g = (Graphics2D)_g;
          g.setRenderingHint ( RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON );
        public void setChoice ( String cmd ) {
          text.setText ( cmd );
      public class Reactor implements ActionListener {
        public void actionPerformed ( ActionEvent e ) {
          subPanelTwo.setChoice ( e.getActionCommand() );
      public PanelComm () {
        setLayout ( new GridLayout ( 1 ,2 ) );
        add ( subPanelOne );
        add ( subPanelTwo );
      //  main
      public static void main ( String[] args ) {
        JFrame f = new JFrame ( "Panel Communication" );
        f.setDefaultCloseOperation ( JFrame.EXIT_ON_CLOSE );
        f.getContentPane().add ( new PanelComm() ,BorderLayout.CENTER );
        f.setSize ( 320 ,120 );
        f.setVisible ( true );
      }  // main
    }

  • What are the methods called while navigating from one applet to another one

    Hi All,
    Could any one brief me about "When you navigate from one applet to another what are the methods called ?".
    Thanks in advance.
    Best Regards,
    N.Madhusudhanan.

    http://forum.java.sun.com/thread.jsp?forum=421&thread=426771&tstart=0&trange=100

  • How to call a form from one form to another form with parameter..

    i'm having a from that will shows the info about the orders that the client has. and i want to show the information of the client. for that i have created one form and i want to call the form from my current form with the given client name as a parameter. then the client_info form has to query with the given parameter. so im passing the :client_order_info.client_name as parameter to the call_form('client_info.fmx',:client_order_info.client_name); but my question is how to access that parameter in the client_info form.. plz help me.. i tried a lot ..

    Create a parameter (object navigator -> parameters) with the name client_name and you can access that value in your client info form using :PARAMETER.client_name.
    P.S. while calling you can pass parameter using 'cilent_name =>' to make sure that the correct parameter is getting assigned to the value.

  • Package importing problem from 1 package to another package.

    Hi All,
    I have made to package, "forum" and "utility". DBhandler java file is in "utility" package and Forumhandler is in "forum" package.
    I want to import DBhandler classes from "utility" package into "forum" package for this i write
    "import utility.*" in forum package's Forumhandler java file. But it is giving error.
    The error is -
    forum/ForumHandler.java:13: cannot resolve symbol
    symbol : class DBHandler
    location: class forum.ForumHandler
    DBHandler dbhand = new DBHandler();

    is the class DBHandler declared a public class in utitlity? Does it start with the line
    package utitility;
    Is it in the directory:
    %CLASSPATH%/utility/
    Have you read the tutorials and done a search for packages on these forums?

  • How to export and import Guide Procedure from one portal to another portal

    Hi all,
    I have accomplished a Guide Procedure on one portal, but I want to export this Guide Procedure and import it to another portal, please tell me what can I do?
    Best regards & Thanks!

    Sam,
    Did you get to check this help document yet.
    http://help.sap.com/saphelp_nw70/helpdata/EN/69/31d0cdb7094d00aa11f935221fb5bf/frameset.htm
    Hope this helps.
    Good Luck!
    Sandeep Tudumu

  • Calling Parameterized Method from one class to another class

    Hi, below is my sample code
    test.java
    public class test
         int op1[][]=new int[][]{{1,2},{2,3},{4,5}};
         int row=0;
        public void  test() {
              int op2[][]=new int[][]{{2,3},{4,5},{6,7}};
                             row=1010;
              getRow(row);
        int[][] getList()
             return op1;
       public  int getRow(int klm)
             System.out.println("Row Value in GetRow Method  is:     "+row);
             return klm;
    test_2.java
    package aa;
    public class test_2
    int a;
         test t11=new test();
         int abc[][] = t11.getList();
         int rowCount=t11.getRow(a);
         public void test_2()
              System.out.println("Row Value is:     "+rowCount);
              System.out.println("Value in abc[1][1] is:     "+abc[0][1]);
    main_class.java
    package aa;
    public class main_class {
         public static void main(String args[])
              test ab=new test();
              ab.test();
              test_2 ba=new test_2();
              ba.test_2();
        public main_class() {
    }now that my question is,for 'rowCount' in class test_2.java i need to get the value of 'row'(which is 1010)from class test.java. How could that be done?
    Any reply is highly appreciable.
    Thanks in advance

    netbeans2eclipse wrote:
    hmm, i did chaged the test object in main method to same as the test object that i used in test_2 (ie; i changed test ab=new test() in main_class.java to test t1=new test()).What? How does this help?
    Again, simplify the problem
    For instance, say you have a class, Fubar1, like so:
    class Fubar1
      int value = 0;
      public void setValue(int v)
        value = v;
      public int getValue()
        return value;
    }and two different Fubar2 classes, both which try to get the value from Fubar1, one doing it badly:
    class Fubar2Bad
      Fubar1 f1 = new Fubar1(); // totally internal Fubar1 object
      public int getFubar1Value()
        return f1.getValue();
    }and one that does it well, that holds a reference to whatever Fubar1 object is passed to it:
    class Fubar2Good
      Fubar1 f1;
      public Fubar2Good(Fubar1 f1)
        this.f1 = f1;
      public int getFubar1Value()
        return f1.getValue();
    }Then if you test these:
    public class TestFubars
      public static void main(String[] args)
        Fubar1 f1 = new Fubar1();
        f1.setValue(35);
        Fubar2Bad f2Bad = new Fubar2Bad();
        Fubar2Good f2Good = new Fubar2Good(f1); // here we pass a reference to the main's Fubar1 object into the Fubar2Good object.
        System.out.println("Bad: " + f2Bad.getFubar1Value());
        System.out.println("Good: " + f2Good.getFubar1Value());
    }

  • Copying pricing procedure from sales document to another

    Hi all,
    I have a sales document type ZDSI that has a specific pricing procedure and one
    sales document type DR that doesn't have pricing procedure.
    When I create a sales order DR referencing the sales document type ZDSI ,
    the item is copied but without any pricing procedure (total sum is 0).
    On the Copying Control: Sales Document to Sales Document - I already tried to set for the item category pricing type = G,E & D.
    I need that the system will use the pricing procedure that was copied for the item ,do you know how can I change it to copy from the referenced sales document?
    TX
    Dana Siman

    Hi dana siman
    In VOV8 For the document type DR check what Document pricing procedure (Dupp) has been maintained and also check in the document type ZDSI what Document pricing procedure (Dupp) has been maintained.In both the document types DR and ZDSI  Dupp should be same  So if you have pricing procedure RVAA01 and its Dupp is A then check in the DR document type what Dupp has been maintained.If the Dupp is same then the same pricing procedure will get copied
    Regards
    Srinath

  • How to Transfer Objects from one Package to another?

    Hi,
    I have Objects(Form Layouts,ABAP Programs....ect) in Package. Is there a particular Transaction that could be used to move these objects to another Package.
    Thanks
    Kishan

    Hi,
    You can also find more detailed explanation at <a href="http://help.sap.com/saphelp_erp2004/helpdata/en/d1/801972454211d189710000e8322d00/frameset.htm">this link</a>.
    Regards,
    Anand Mandalika.

  • Drivers Moving from one package to another?

    I have had OSD working well for 6 months.....last week things abruptly fell apart when another SCCM administrator started importing new models into the driver catalog. Here is the common structure that we have setup:
    The behavior that we are seeing now: After a new model is imported into the drivers node and the drivers are added to a package, all the drivers within the new package that existed in another package are removed. The duplicate drivers only exist in the newly
    created package.
    So, when a new model is imported with duplicate drivers, all the existing packages containing those drivers are essentially broken.
    Any help or direction on this would be greatly appreciated. I have deleted the whole driver catalog and started re-importing and re-creating packages but the same behavior occurs.

    Thank you for the reply Jason.
    The import location and package source are different:
    Source: \\server\modelsw7x64\2056
    Package Source: \\server\sccmmodels\W7X64\2056W7X64
    Example: I imported 4173W7X64 and lost drivers in 5 other packages(2355W7X64, 7661W7X64, etc). The package source version is not changed and there is no information in the package logs:
     I have found your forum posts invaluable by the way. This is the first time I am stuck and had to post. It is a strange problem as all of this was working without issue previously. Same directory structure, same import process.

  • How to call a method from one viewmodel to another viewmodel

    Hi,
    I have a functionality in first viewmodel , i need the functionality to be functioned in the second viewmodel . How can i do that . Help would be much appriciated .
    Jeevan Vinay

    Perhaps derive both of the classes from common base. The common functionality and data will be defined (moved) inside the base class.

Maybe you are looking for