7 Replies Latest reply on Dec 28, 2012 8:22 PM by TexasApexDeveloper

    to call a package


      I am trying to call a package.
      Any one can help me out?

      Thanks in advance,

        • 1. Re: to call a package
          You call PROCEDURES & FUNCTIONS inside the package, not the package itself.. Example:

          Package SamplePackage has a procedure called y and a function called z, to call procedure y you do this: Execute SamplePackage.y(Parameters, Go, Here);

          to call a function you would do this:

          (q is a declared local variable of type varchar2(100))

          q := SamplePackage.z(Parameters,Go,Here);

          Thank you,

          Tony Miller
          Webster, TX

          "I am a Ranger. We walk in the dark places no others will enter. We stand on the bridge and no one may pass. We live for the One, we die for the One."
          • 2. Re: to call a package
            Thank Tony Miller,

            I have to use page process or anything else.

            I create a region and apex made sql statements. I convert the SQL to PLSQL store procedure as a procedure in package.

            I want to call it. Please let me know step by step how to call it.


            • 3. Re: to call a package
              Hi Sam,

              You can convert the existing page P/SQL process like this


              v1 varcahr2(10);
              v2 varcahr2(10);
              v3 varcahr2(10);


              select into ...

              update table set ...

              commit ;

              pkg_name.pkg_procedure( v1, v2,v3 OUT);

              :P1_PROCESS_RESULT := V3;


              so "pkg_name.pkg_procedure" is taking care all process

              Hope this clarifies.

              • 4. Re: to call a package
                Thank Benz,

                When I create a form, I am able to choose from procedure.
                I want to select the option when I build a form.

                I would like to know how to call from APEX the procedure is in DB.

                Thanks again,

                • 5. Re: to call a package
                  Do you mean you want a drop down list of the procedures in the package to select from?
                  I imagine that if that is the case and you had the right authorization, you could use a query from the DBA_* (or ALL or USER) views to get a list and build a dynamic call that way. Haven't tried it though.
                  • 6. Re: to call a package

                    Edited by: ARGGH99 on Dec 28, 2012 11:59 AM
                    • 7. Re: to call a package
                      Please refrain from posting to a LONG SINCE DEAD thread..

                      Thank you,

                      Tony Miller
                      Ruckersville, VA