How to run the procedure

Procedure test_proc(Req_Hdr_id IN VARCHAR2, uname IN VARCHAR2
is
l_request_id NUMBER:=0;
p_resp_appl_id NUMBER :=401;
p_resp_id NUMBER := 20634;
p_user_id NUMBER := 5993;
BEGIN
update xxkfupm01.kfupm_mcr_request_header
set status='Under_Proc'
where request_hdr_id=Req_Hdr_id;
commit;
This is procedure is define in package .how to run this procedure.
Regards
Arif
Edited by: user11309801 on Jan 2, 2011 9:38 PM

Try This:-
DECLARE
req_hdr_id VARCHAR2 (200);
uname VARCHAR2 (200);
BEGIN
req_hdr_id := NULL;
uname := NULL;
<<PackageName>>.test_proc (req_hdr_id, uname);
COMMIT;
END;
Also ,add exceptions in the procedure.

Similar Messages

  • How to run the procedure in SQL editor

    Schema Temp, Package Name = Pk_DRmanagement
    PROCEDURE LoadCardRefundRequests(v_streamer_batch_id IN NUMBER,
    vDebugLevel IN NUMBER DEFAULT 0, RowsProcessed OUT NUMBER )
    I use the following in SQL editor to compile and encounter problem. Can you help me with the correct implementation
    begin
    declare vCnt number;
    execute vCnt := Temp.Pk_DRmanagement.LoadCardRefundRequests(10407, 0);
    end;
    Thanks
    Just Do It

    declare
    vCnt number;
    begin
    Temp.Pk_DRmanagement.LoadCardRefundRequests(10407, vCnt );
    end;

  • How to run the same procedure in parallel for different parameter value.

    Hi There,
    I am currently working on extracting data in to flat file and I am able to do so for one revenue month (e.g. 200101) using PL/SQL procedure(get_rev_data). it takes almost 1 hour to execute the procedure completely and it generates 400 MB data file. Now I have to run this procedure for last 10 yrs of data (i.e. 120 revenue months) . my prolem here is to figure out a way/logic in such a way that I can run the procedure in parallel for each revenue month and at the same time it will write the data in respective data file for each revenue month. so the final result of this exercise would be 120 flat files, one for each revenue month with file names like
    EXTRACT_00001001 to EXTRACT_00001120.
    where
    first five digits : 00001 will indicate the Extract run number and
    last three digits : 001 will indicate the thread number for each run.
    I am thinking of doing this by creating a table "RevMonth" with two values (revenue_month, thread_num) and calling the procedure in a simple select statement and passing revenue_month as parameter of the procedure like
    SELECT get_rev_data(revenue_month, thread_num)
    FROM REVMONTH;
    But I am not sure if that will do the needful. Any idea on how to achieve this will be of great help. Thank you.

    Hi Smit,
    Thanks for the advise. I am not planning to run for all 120 months at once. actually I am planning to run like 1 year (12 revenue months at a time). I am not sure if that will work well but I was planning to run this through shell script (Unix) and will call the same procedure with different parameter (revenue_month and Thread_number) values and see what happens. I hope that will run in parallel for each revenue month.
    Let me know if you have more knowledge about it. THanks a lot.
    Thanks,
    .

  • How to run stored procedure in run-time not in design

    hello:
    I have download the ODT software
    and i installed VS 2003 environment
    amd i have oracle 9i on the server and oralce client on my computer
    and I know how to run the ODT inside the VS2003 and how to use it
    I built a package and inside it a procedure that does not take any parameter
    PROCEDURE "TEST1" IS
    BEGIN
    insert into emp (empno,ename)
    values (3003,'jon');
    END "TEST1";
    this procedure is valid and I can run it in ODT (by right click over the procedure name and select "Run")
    but when I drag it and drop this procedure on a form in application I have a dialog with errors that's not understandable
    for example:
    ORA-06550: line 1, column 27
    PLS-00315: PL/SQL TABLE Declarations must currently use binary_integer indexes
    and many other errors
    ok I want to know how I can call the procedure in the code and give to it the in parameters and then get the out parameters
    I hope to find replay
    thank you

    Hi,
    You have to take care of certain measures other thatn just drag and drop the Oracle procedure to the .NET form.
    Following is a simple code to call an Oracle procedure from the C#.Net form
    ============================================================
    using System;
    using System.Collections;
    using System.ComponentModel;
    using System.Drawing;
    using System.Web;
    using System.Web.SessionState;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using System.Web.UI.HtmlControls;
    using System.Data;
    using Oracle.DataAccess.Client;
    using Oracle.DataAccess.Types;
    namespace TEST1
         public class CallingProcs : System.Web.UI.Page
              protected System.Web.UI.WebControls.Button Button1;
              protected System.Web.UI.WebControls.TextBox txtYear;
              OracleConnection conn;
              private void Page_Load(object sender, System.EventArgs e)
                   // Put user code to initialize the page here
                   string oradb = "Data Source=ORA1;User Id=SCOTT;Password=TIGER;";
    conn = new OracleConnection(oradb);
                   conn.Open();
              #region Web Form Designer generated code
              override protected void OnInit(EventArgs e)
                   // CODEGEN: This call is required by the ASP.NET Web Form Designer.
                   InitializeComponent();
                   base.OnInit(e);
              /// <summary>
              /// Required method for Designer support - do not modify
              /// the contents of this method with the code editor.
              /// </summary>
              private void InitializeComponent()
                   this.Button1.Click += new System.EventHandler(this.Button1_Click);
                   this.Load += new System.EventHandler(this.Page_Load);
              #endregion
              private void Button1_Click(object sender, System.EventArgs e)
                   //OracleCommand dbcmd = new OracleCommand();
                   OracleCommand dbcmd = conn.CreateCommand ();
                   dbcmd.CommandType = CommandType.StoredProcedure;
                   dbcmd.CommandText = "TEST1";
                   try
                        dbcmd.ExecuteNonQuery ();
                        Response.Write("Excecuted succesfully");
                   catch(Exception ex)
                        Response.Write(ex.Message);
    ============================================================
    Most of the above code is generated automatically. I am using Visual Studio .NET 2003 , C# for it.
    The design view of the form contains a button named 'Button1' and the code is aimed to call the procedure 'TEST1' on clicking the button.
    Hope this will give you a start to using oracle from .NET

  • How to run the cursor

    HI
    can i knw how to run the cursor from the package. The cursor name is "cursor fet_rec".
    procedure update_hdr is
    cursor fet_rec is
    i rhave the run procdure but i am unable to run the cursor.
    procedure update_hdr is
    cursor fet_rec is
    select status, request_hdr_id
    from xxkfupm01.kfupm_mcr_request_header
    where status = 'Approved'
    for update;
    cnt1 NUMBER := 0;
    cnt2 NUMBER := 0;
    BEGIN
    for rec in fet_rec Loop
    select count(*)
    into cnt1
    from XXKFUPM01.kfupm_mcr_request_details
    where request_hdr_id = REC.REQUEST_HDR_ID;
    select count(*)
    into cnt2
    from XXKFUPM01.kfupm_mcr_request_details
    where request_hdr_id = REC.REQUEST_HDR_ID
    and status = 'Complete';
    if (cnt1 = cnt2) THEN
    update xxkfupm01.kfupm_mcr_request_header
    set status = 'Complete'
    where current of fet_rec;
    END IF;
    END LOOP;
    Regards
    Arif
    Edited by: user11309801 on Jan 3, 2011 6:56 AM
    Edited by: user11309801 on Jan 3, 2011 7:00 AM

    http://tkyte.blogspot.com/2005/06/how-to-ask-questions.html
    http://www.oracle.com/pls/db102/homepage
    http://www.oracle.com/pls/db112/homepage

  • How to run the JNLP from Command Line

    Hi All,
    how to run the JNLP file from the remote machine from our command line. I have requirement to run this JNLP file in java 1.4.2 version. Can any one tell me the procedure or the steps that are needed to run this file at command prompt.
    Regards,
    Prasanna.
    Edited by: VPrasanna on May 19, 2008 4:43 AM

    >
    I am getting "**java.security.AccessControlException: access denied (java.net.SocketPermission wwwgate0.mot.com:1080 connect,resolve)**" when I start the Web Start Client. >This seems like a largely separate problem to running the JNLP from the command line. It might have been better to end this thread (assign the dukes) and start a new one.
    >
    ..Can you help me in resolving this issue. >However, I suspect I can guess the problem.
    If this app. is normally hosted on wwwgate0.mot.com then it can 'phone home' to the server without further permission, but if you are running it from the command line, that might not be the codebase anymore.
    If you wish to do 'local testing' of such an app., I would recommend setting up a server like Tomcat on the local machine, and serving the test app. directly off that.
    >
    ..Its urgent...>Sun offers a number of options for urgent matters, such as support tickets. Perhaps you should look into one of those.

  • How to run the code generator

    I urgently need to know how to run the code generator using creator. Can anyone assist? I cant find any tips in the forums.

    I am following the procedure to create a new custom component (or extend an existing component) available at http://developers.sun.com/prodtech/javatools/jscreator/reference/techart/2/writing_custom_components.html.
    Part of the procedure says: you need to use the JSC to run the code generator based on sun-faces-config.xml metadata.

  • How to run the BAPI after creation or Modification ?

    HI Abapers,
    How to run the BAPI after creation or Modification ? What is the step by step procedure to run the the BAPI?
    Immediate reply is highely appriciable.
    Regards,
    Chow.

    Hi
    If you have done with BAPI creation correctly Run it similar to the fun mdule which we run in SE37 calling this BAPi in the program with CALL FUNCTION and passing the necessary parameters
    see the sample bapi code how it is called in Program
    data : w_resb_header like bapirkpfc.
    data: begin of itab_resb occurs 0.
    include structure bapiresbc.
    data: end of itab_resb.
    data: begin of itab_bapi_return occurs 0.
    include structure bapireturn.
    data: end of itab_bapi_return.
    data : w_resb_no like bapirkpfc-res_no.
    w_resb_header-plant = p_werks.
    w_resb_header-res_date = sy-datum.
    w_resb_header-created_by = sy-uname.
    w_resb_header-cost_ctr = '0000010001'.
    w_resb_header-move_type = '201'.
    w_resb_header-gr_rcpt = w_room_time.
    w_resb_header-part_acct = 'OR'.
    *ITEM DATA
    loop at i_details.
    itab_resb-material = i_details-matnr.
    itab_resb-plant = i_details-werks.
    itab_resb-store_loc = i_details-lgort.
    itab_resb-quantity = i_details-qty.
    itab_resb-unit = i_details-meins.
    append itab_resb.
    clear itab_resb.
    clear i_details.
    endloop.
    call function 'BAPI_RESERVATION_CREATE'
    exporting
    reservation_header = w_resb_header
    NO_COMMIT =
    MOVEMENT_AUTO =
    importing
    reservation = w_resb_no
    tables
    reservation_items = itab_resb
    return = itab_bapi_return
    call function 'BAPI_TRANSACTION_COMMIT'
    exporting
    wait = 'X'
    IMPORTING
    RETURN =    .
    wait up to 5 seconds.
    w_resb_no contains your reservations numnber
    Regards
    Anji

  • How to run the job using DBMS_SCHEDULER

    How to run the job using DBMS_SCHEDULER
    pleas give some sample Iam very new to DBMS_SCHEDULER

    Hi
    DBMS_SCHEDULER
    In Oracle 10g the DBMS_JOB package is replaced by the DBMS_SCHEDULER package. The DBMS_JOB package is now depricated and in Oracle 10g it's only provided for backward compatibility. From Oracle 10g the DBMS_JOB package should not be used any more, because is could not exist in a future version of Oracle.
    With DBMS_SCHEDULER Oracle procedures and functions can be executed. Also binary and shell-scripts can be scheduled.
    Rights
    If you have DBA rights you can do all the scheduling. For administering job scheduling you need the privileges belonging to the SCHEDULER_ADMIN role. To create and run jobs in your own schedule you need the 'CREATE JOB' privilege.
    With DBMS_JOB you needed to set an initialization parameter to start a job coordinator background process. With Oracle 10g DBMS_SCHEDULER this is not needed any more.
    If you want to user resource plans and/or consumer groups you need to set a system parameter:
    ALTER SYSTEM SET RESOURCE_LIMIT = TRUE;
    Baisc Parts: Job
    A job instructs the scheduler to run a specific program at a specific time on a specific date.
    Programs
    A program contains the code (or reference to the code ) that needs to be run to accomplish a task. It also contains parameters that should be passed to the program at runtime. And it?s an independent object that can referenced by many jobs
    Schedules
    A schedule contains a start date, an optional end date, and repeat interval with these elements; an execution schedule can be calculated.
    Windows
    A window identifies a recurring block of time during which a specific resource plan should be enabled to govern resource allocation for the database.
    Job groups
    A job group is a logical method of classifying jobs with similar characteristics.
    Window groups
    A window groups is a logical method of grouping windows. They simplify the management of windows by allowing the members of the group to be manipulated as one object. Unlike job groups, window groups don?t set default characteristics for windows that belong to the group.
    Using Job Scheduler
    SQL> drop table emp;
    SQL> Create table emp (eno int, esal int);
    SQL > begin
    dbms_scheduler.create_job (
    job_name => 'test_abc',
    job_type => 'PLSQL_BLOCK',
    job_action => 'update emp set esal=esal*10 ;',
    start_date => SYSDATE,
    repeat_interval => 'FREQ=DAILY; INTERVAL=10',
    comments => 'Iam tesing scheduler');
    end;
    PL/SQL procedure successfully completed.
    Verification
    To verify that job was created, the DBA | ALL | USER_SCHEDULER_JOBS view can be queried.
    SQL> select job_name,enabled,run_count from user_scheduler_jobs;
    JOB_NAME ENABL RUN_COUNT
    TEST_abc FALSE 0
    Note :
    As you can see from the results, the job was indeed created, but is not enabled because the ENABLE attribute was not explicitly set in the CREATE_JOB procedure.
    Run your job
    SQL> begin
    2 dbms_scheduler.run_job('TEST_abc',TRUE);
    3* end;
    SQL> /
    PL/SQL procedure successfully completed.
    SQL> select job_name,enabled,run_count from user_scheduler_jobs;
    JOB_NAME ENABL RUN_COUNT
    TEST_ABC FALSE 0
    Copying Jobs
    SQL> begin
    2 dbms_scheduler.copy_job('TEST_ABC','NEW_TEST_ABC');
    3 END;
    4 /
    PL/SQL procedure successfully completed. Hope it will help you upto some level..!!
    Regards
    K

  • How to run the form that is only installed on a PC and not using a server?

    Hi
    I am new to Oracle and have taken the forms class. But I do not understand how to run the form from my PC using XP windows. (Do not have access to a server).
    I have started the OC4J, made sure the listener was started, compiled the form and then when I run it, it automatically goes to the HTTP:
    ERROR: res://ieframe.dll/acr_depnx_error.htm#,http://kevin:8889/forms/frmservle
    I connected to the database correctly. I can process a report and it does nor try to access the internet. My only issue is running the form. I verified it compiled.
    Sorry for a basic question. Could someone please help, I tried reviewing other questions, but not sure if they are connecting to a server or not.
    I see webutil but is it required if I don't have a server? Thank you in advance.

    Regardless of the version, it appears that you may not have configured the Builder. Do the following:
    1. Open the Builder
    2. From the menu, select Edit > Preferences > Runtime
    3. In the box labeled "Application Server URL:", enter a local URL needed to run a form OR click the button labeled "Reset to Default". If you decide to manually enter a value, it would looks something like this:
    http://localhost:8889/forms/frmservlet
    4. In the field labeled "Web Browser Location:", enter the path and executable to your preferred browser. So for example if IE is your browser of choice the entry would most likely look like this:
    C:\Program Files\Internet Explorer\IEXPLORE.EXE
    5. Click on OK and retest.
    By the way, you can manually enter a URL in the browser. Clicking the RunForm button from the Builder is strictly optional. To run the "test" form directly from the browser enter the following into the browser's address field:
    http://localhost:8889/forms/frmservlet?form=test
    More information about Forms can be found on OTN:
    http://www.oracle.com/technology/products/forms/index.html

  • How to use the procedure column in reports

    Hi all
    How to call the procedure in reports as source.. If possible how to use columns of procedure in the layout column of report????

    Hi,
    Your query is not clear.
    1. In subject are you asking total column.
    A. Edit pivot view and go to Rows and click Total BY option here you can find option like (none,before,after) the you can select after it will display total all culms.
    2. I want use the columnC in columnD ? -- Am not understand.
    A. What my understand is you want to see the report only C and D values only.
    If it is correct we can apply filter in report level click column filed and apply not equal to A then it will show only C and D only.
    If it is wrong pleas post me correct one with example. Will try to help out this.
    I am not sure this is what your looking so far.
    Award points it is useful.
    Thanks,
    Satya

  • How to run the ejb project in j2ee server

    How to run the EJB project.
    I give like
    java conveterClient converterClient.jar
    here conveterClient is class file name and converterClient.jar is deployed file
    like wise i give some exception is come
    give some help pls friends

    Navigate to the "DBOrders" module in the catalog, right click on the "ORDERS" database below and click "Export Schema Stucture". That will produce a file containing the DML needed to create the database

  • HOw to run the Applet in dos mode

    how to run the applet in Command Prompt(DOS).
    I have save this in directory D/vijay/javap/A.java and my JDK is in C drive.
    Plz send me reply as soon as possible.
    My code is :-
    import java.applet.*;
    import java.awt.*;
    public class A extends Applet
    private int w, h;
    public void init( )
         w = 45;
         h = 50;
    public void paint(Graphics g)
         g.drawRect(w, h, 20, 80);
    }

    import java.applet.*;
    import java.awt.*;
    public class A extends Applet
    private int w, h;
    public void init( )
    w = 45;
    h = 50;
    public void paint(Graphics g)
    g.drawRect(w, h, 20, 80);
    <applet class="A" height="200" width="200" code="A.class">
    </applet>
    */And in command prompt
    javac A.java
    appletviewer A.java
    Message was edited by:
    passion_for_java

  • How to run the programes in NetBeans

    any body know how to run the java progarm in NetBeans.
    can u please guide me?
    Advance in thanks

    thanks for ur reply.
    this is my code.
    public class sample11 {
    /** Creates a new instance of sample11 */
    public sample11() {
    public static void main(String args[])
    System.out.println("nithya");
    i did watever u told. but i don't have o/p. wat can i do? how to it display the o/p?

  • How to run the query in  screen painter

    i am using the patch 36 in business one so pls give information  about 
       how to run the query in  screen painter 
    regard
      sandip adhav

    Hope u have reached Screen painter interface,
    1. Click 'Add Grid' from tool bar.
    2. Go to 'Collections' tab in 'Properties' window.
    3. Choose 'Data Tables' from the Drop down list.
    4. Click 'New' found at the bottom of the Properties Window(same window)
    5. U'll find the place to insert ur query.
    6. U can rename the table name from 'DT_0'
    7. Choose type as 'Query'
    8. Clear content from box 'Query'
    9. Enter ur query there. Dont forget to Click 'SET'
    10. Go to Preview option from tool bar.
    now ur query will be displayed as table format.
    Note: First try with simple query b4 going for linking option.
    Regards,
    Dhana.

Maybe you are looking for