How to Execute the procedure?

Hi,
How to execute a below procedure with refcursor output parameter,
in that procedure refcursor declare in package
create or replace PROCEDURE prc_sam(
P_LIST OUT pkg_sam.REF_CURSOR_TYPE) IS
BEGIN
OPEN P_LIST FOR
SELECT 1+1 FROM dual;
EXCEPTION
WHEN OTHERS THEN
RAISE_APPLICATION_ERROR(-20001,SQLERRM);
END prc_sam;
Regards,
Fame

SQL> create or replace PROCEDURE prc_sam(
2 P_LIST OUT SYS_REFCURSOR) IS
3 BEGIN
4
5 OPEN P_LIST FOR
6 SELECT 1+1 FROM dual;
7 EXCEPTION
8 WHEN OTHERS THEN
9 RAISE_APPLICATION_ERROR(-20001,SQLERRM);
10 END prc_sam;
11 /
Procedure created.
SQL> VARIABLE P_CURSOR REFCURSOR;
SQL> EXEC prc_sam(:P_CURSOR);
PL/SQL procedure successfully completed.
SQL> PRINT P_CURSOR;
1+1
2
Intead of SYS_REFCURSOR, you can use ur pkg_sam.REF_CURSOR_TYPE inside a package
AND
execute a procedure like EXEC pkg_sam.prc_sam(:P_CURSOR);
like this, then you will get the result............................
Thanks,
Ann

Similar Messages

  • How to execute the procedure in sap b1

    Hai to all,
                 I done a procedure in sql server .but i don't know how to execute that  procedure in sap b1?
    can anyone help me immediately.
    Regards,
    Ramya.S

    Dear Ramya.S,
    You could execute the store procedure by using Recordset object in SDK DI code. It is like:
    Dim myRecordSet As SAPbobsCOM.Recordset
    myRecordSet =                                   
    SBO_Company.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecord
    set)
    myRecordSet.Command.Name = "TestStoredProcedure"
    myRecordSet.Command.Parameters.Item("@ItemLike").Value = "IT%"
    myRecordSet.Command.Parameters.Item(2).Value = "C0001"
    myRecordSet.Command.Execute()

  • Can you tell me how to execute the procedure?

    create or replace get_dob
    (ss_number varchar2,dob out date)
    as
    begin
    select birth_dae
    into dob
    from person
    where soc_sec_num=ss_num;
    exception when no_data_found
    error_notify(ss_num);
    end;
    the question is that when i want to execute this procedure,how can I use the command?
    I try to use the "execute get_dob('wang');"in the sql/plus,but the system give me wrong information.

    Errors:
    1. You left out the word PROCEDURE after CREATE OR REPLACE.
    2. You used ss_number in one place and ss_num in two others. These must be the same name.
    3. You left out the word THEN after WHEN NO_DATA_FOUND.
    Possible errors:
    1. Is birth_dae spelled correctly? Or, should it be birth_date?
    2. Is error_notify a user-defined procedure?
    Additional suggestions:
    1. It is better to use table_name.column_name%TYPE instead of specifying NUMBER, VARCHAR2, DATE, etc. for your parameters. That way if the column data types are changed in the future, you don't have to change your code.
    2. You will need to SET SERVEROUTPUT ON and use DBMS_OUTPUT.PUT_LINE to display the contents of the variable that holds the value of the out parameter.
    3. Please see suggested code for creation of procedure and execution of procedure below. I have included one row of test data so that some output will be displayed. I commented out the exception section, in order to test it, since I don't have your error_notify procedure.
    SQL> -- test data:
    SQL> CREATE TABLE person
      2    (birth_dae   DATE,
      3     soc_sec_num NUMBER)
      4  /
    Table created.
    SQL> INSERT INTO person
      2  VALUES (SYSDATE, '123456789')
      3  /
    1 row created.
    SQL> SELECT * FROM person
      2  /
    BIRTH_DAE SOC_SEC_NUM
    06-DEC-02   123456789
    SQL>
    SQL>
    SQL> -- create procedure:
    SQL> CREATE OR REPLACE PROCEDURE get_dob
      2    (ss_number IN  person.soc_sec_num%TYPE,
      3     dob       OUT person.birth_dae%TYPE)
      4  AS
      5  BEGIN
      6    SELECT birth_dae
      7    INTO      dob
      8    FROM      person
      9    WHERE  soc_sec_num = ss_number;
    10  -- EXCEPTION
    11  --  WHEN NO_DATA_FOUND THEN
    12  --    error_notify (ss_number);
    13  END get_dob;
    14  /
    Procedure created.
    SQL> SHOW ERRORS
    No errors.
    SQL>
    SQL>
    SQL> -- execute procedure:
    SQL> SET SERVEROUTPUT ON
    SQL> DECLARE
      2    v_dob DATE;
      3  BEGIN
      4    get_dob ('123456789', v_dob);
      5    DBMS_OUTPUT.PUT_LINE (v_dob);
      6  END;
      7  /
    06-DEC-02
    PL/SQL procedure successfully completed.

  • How to execute the parametered stored procedure in sql *plus ?

    how to execute the parametered stored procedure in sql *plus ?
    my storedprocedure format
    CREATE OR REPLACE PROCEDURE SMS_SELECTMPLOYEE
    (empDOB out date, empEmpName out varchar2)
    thanks & regards
    mk_mur

    Oh, sorry... making many reading-too-fast mistakes today...
    You can't declare date variables in SQL*Plus (seel help var), but you can cast to varchar2:
    TEST> CREATE OR REPLACE PROCEDURE SMS_SELECTMPLOYEE (empDOB out date, empEmpName out varchar2) IS
      2  d date := sysdate;
      3  e varchar2(10) := 'bob';
      4  begin
      5  empdob := d;
      6  empempname := e;
      7  end;
      8  /
    Procedure created.
    TEST> var d varchar2(30)
    TEST> var n varchar2(30)
    TEST> call  SMS_SELECTMPLOYEE(:d,:n);
    Call completed.
    TEST> print d n
    D
    11/07/06
    N
    bobYoann.

  • How to execute the packaged procedure(having out param) in TOAD for Oracle

    Hi.
    Could you help me
    How to execute the packaged procedure having out parameters in TOAD for Oralce..
    Thanks..

    Use anonymous PL/SQL block to execute it.
    Example.
    DECLARE
      <out variable name> <out variable data type>;
    BEGIN
      <package name>.<procedure name>(<out variable name>);
    END;

  • How to execute a procedure in the same db session of the framework page

    i am using oaframework personalization to create a link. when the link is clicked i will execute a database procedure using /psl/DAD/procedurename. currently when the user clicks on the link it will get executed in separate database session.
    but i want execute the procedure in the db session on the current oa page. is there a way to achive this.
    Thanks
    sreekanth.g

    You can do this, create a simple stackLayout region, add an AM, Controller to it. Add a submit button or link with fireAction set on it. Write a method in your AM and call it from your controller's processFormRequest by capturing the button or link event. In the AM method you can invoke the procedure. Use personalization and attach the region to the page.

  • Database is Hanging after executing the Procedure ...

    Dear All i am using 10G.
    I Have a procedure . After executing the Procedure when i try to call that procedure it is hanging ...
    it is creating Locks .. As our DBA told..And told to check the code ...
    Can any one tell me how can i put mu codes with formatting ? When i copy paste my code it is showing properly but after POST MESSAGE it is showing like i have written history ...--*
    I am Executing the procedure like this ...
    EXEC simulator_validation ('0|BP-V1|20101004|01|1|2430962.89|27|2430962.89|MUR|20100928120106','04-SEP-2010',27,2430962.89,'MUR','000111111111');
    And my code is :-
    {Create Or Replace Procedure simulator_validation (lstring varchar2,ldate date,lno_item number,ltotal number,lcur varchar2,lac_no Varchar2)
    IS
      l_swift_code_acno number;
      l_ACno_Valid number;
      l_swift_code_others Number;
      lpcode varchar2(5);
      lCcode Varchar2(4);
      lval number;
      lacno varchar2(16);
      v_file varchar2(20);
      v_path varchar2(50);
      LToken   VARCHAR2(100) ;
      i        PLS_INTEGER := 2 ;
      lfirst_char  number;
      lvalue  Varchar2(100) ; 
      lcol number:= 1;
    Begin
      lfirst_char := Substr(lstring,0,1);
      Dbms_output.put_line(lfirst_char);
          IF lfirst_char  = '0' Then ------------------- For the 1st Line - Should be start from 0
                Loop
                  LToken := mcb_simulator_pkg.Split( lstring, i , '|') ;  
                  lvalue := LToken;
                      IF lcol=1 then
                             If lvalue='BP-V1' THEN
                                   Dbms_output.put_line('1');
                             Else
                                 Insert into MU_SIMULATOR_output_ERR (load_no,ERR_CODE,ERR_DESC) values (1111,'0003','Invalid file type and version number');
                                Dbms_output.put_line('2');
                            End if;
                      Elsif lcol=2 then
                              If lvalue=To_Char(ldate,'YYYYMMDD') THEN
                                 Dbms_output.put_line('3');                                                                                                                                                                                                                                       
                            Else
                                 Insert into MU_SIMULATOR_output_ERR (load_no,ERR_CODE,ERR_DESC) values (1111,'0004','Due date differs from the value inputted in the loading screen');
                                 Dbms_output.put_line('4');
                            End if;
                      Elsif lcol=3 then
                                   Begin
                                         Select PAYMENT_PURPOSE_CODE into lpcode
                                         From MU_PURPOSE_CODE
                                         Where PAYMENT_PURPOSE_CODE = lvalue;
                                     IF lpcode = lvalue Then
                                           Dbms_output.put_line('5');
                                     Else
                                          Insert into MU_SIMULATOR_output_ERR (load_no,ERR_CODE,ERR_DESC) values (1111,'0006','Invalid payment purpose code');
                                          Dbms_output.put_line('6');
                                     End If;
                                Exception
                                    When No_data_found Then
                                    Insert into MU_SIMULATOR_output_ERR (load_no,ERR_CODE,ERR_DESC) values (1111,'0006','Invalid payment purpose code');
                                End;
                      Elsif lcol=4 then
                                    If lvalue='1' THEN
                                         Dbms_output.put_line('7');
                                    Else
                                       Insert into MU_SIMULATOR_output_ERR (load_no,ERR_CODE,ERR_DESC) values (1111,'0008','Total number of debit records in header does not tally with number                   debit records in the file.');
                                      Dbms_output.put_line('8');
                                   End if;
                      Elsif lcol=5 then
                                    If lvalue=ltotal THEN
                                          Dbms_output.put_line('9');
                                    Else
                                        Insert into MU_SIMULATOR_output_ERR (load_no,ERR_CODE,ERR_DESC) values (1111,'0010','Total debit transaction amount in header does not tally with the sum of debit transaction amount in the file');
                                       Dbms_output.put_line('10');
                                  End if;
                     Elsif lcol=6 then
                                    If lvalue=lno_item THEN
                                         Dbms_output.put_line('11');
                                    Else
                                        Insert into MU_SIMULATOR_output_ERR (load_no,ERR_CODE,ERR_DESC) values (1111,'0025','Number of credit records does not tally with credit records in the file.');
                                    End if;
                     Elsif lcol=7 then
                                    If lvalue=ltotal THEN
                                         Dbms_output.put_line('12');
                                    Else
                                         Insert into MU_SIMULATOR_output_ERR (load_no,ERR_CODE,ERR_DESC) values (1111,'0026','Sum of credit records does not tally with total transaction amount as inputted in the loading screen');
                                    End if;
                    Elsif lcol=8 then                
                                    If lvalue=lcur  THEN
                                          Begin
                                                    Select Cur_CODE into lCcode
                                                      From Mu_currency_Code
                                                    Where Cur_CODE = lvalue;
                                                    Dbms_output.put_line('13');
                                          Exception
                                              When No_data_found Then--------------------
                                                 Insert into MU_SIMULATOR_output_ERR (load_no,ERR_CODE,ERR_DESC) values (1111,'0014','Invalid Currency');
                                          End;
                                    Else
                                          Insert into MU_SIMULATOR_output_ERR (load_no,ERR_CODE,ERR_DESC) values (1111,'0013','Currency differs from the value inputted in the loading screen');
                                   End if;
                     Elsif lcol=9 then
                                    If lvalue=Null  THEN
                                          Insert into MU_SIMULATOR_output_ERR (load_no,ERR_CODE,ERR_DESC) values (1111,'0015','Timestamp should not be null');
                                    Elsif lvalue <> lvalue Then
                                         Insert into MU_SIMULATOR_output_ERR (load_no,ERR_CODE,ERR_DESC) values (1111,'0046','Timestamp in header should be in the format YYYYMMDDHHMMSS');
                                    End if;
                       End IF;
                      EXIT WHEN LToken IS NULL ;
                         i := i + 1 ;
                         lcol:=lcol+1;
                       End LOOP;
              Else
                                      Insert into MU_SIMULATOR_output_ERR (load_no,ERR_CODE,ERR_DESC) values (9999,'0002','First line should always start with 0');
              End if ;}
    -------------------- For the 2nd Line , should be start from 9 .-----------------------------
    {  lfirst_char := Substr(lstring,0,1);
    IF lfirst_char = '9' Then
    LOOP
    LToken := mcb_simulator_pkg.Split( lstring, i , '|') ;
    lvalue := LToken;
    IF lcol=1 then
    If lvalue < 0 THEN
    Insert into MU_SIMULATOR_output_ERR (load_no,ERR_CODE,ERR_DESC) values (1111,'0017','Amount should be greater than zero');
    Elsif lvalue = ltotal THEN
    Dbms_output.put_line('20');
    Else
    Insert into MU_SIMULATOR_output_ERR (load_no,ERR_CODE,ERR_DESC) values (1111,'0018','Transaction amount differs from the value inputted in the loading screen');
    End if;
    ELSIF lcol = 2 THEN
    If lvalue = Substr(lac_no,4,9) THEN
    mcb_simulator_pkg.Acct_no_Validator(lvalue,1111,l_ACno_Valid);
    mcb_simulator_pkg.Swift_code_validator_for_ac_no(lvalue,1111,l_swift_code_acno);
    Else
    Insert into MU_SIMULATOR_output_ERR (load_no,ERR_CODE,ERR_DESC) values (1111,'0020','Account number differs from the account number inputted in the loading screen');
    End if;
    ELSIF lcol = 3 THEN
    If lvalue is not null THEN
    mcb_simulator_pkg.Swift_code_validator_for_other(lvalue,1111,l_swift_code_others);
    Else
    Dbms_output.put_line('21');
    End if;
    END IF;
    EXIT WHEN LToken IS NULL ;
    i := i + 1 ;
    lcol:=lcol+1;
    End Loop;
    Else
    Insert into MU_SIMULATOR_output_ERR (load_no,ERR_CODE,ERR_DESC) values (8888,'0016','Second line should start with 9');
    End IF; }
    -------------------- For the 3rd Line Should be start from 1.--------------------------
    { LOOP
    lfirst_char := Substr(lstring,0,1);
    IF lfirst_char = '1' Then
    Loop
    LToken := mcb_simulator_pkg.Split( lstring, i , '|') ;
    lvalue := LToken;
    IF lcol=1 then
    If lvalue > 0 THEN
    Dbms_output.put_line('24');
    Else
    Insert into MU_SIMULATOR_output_ERR (load_no,ERR_CODE,ERR_DESC) values (1111,'0017','Amount should be greater than zero'); End if;
    ELSIF lcol=2 then
    Mcb_simulator_pkg.Acct_no_Validator(lvalue,1111,l_ACno_Valid);
    Mcb_simulator_pkg.Swift_code_validator_for_ac_no(lvalue,1111,l_swift_code_acno);
    ELSIF lcol = 3 THEN
    If lvalue is not null THEN
    mcb_simulator_pkg.Swift_code_validator_for_other(lvalue,1111,l_swift_code_others);
    Else
    Dbms_output.put_line('26');
    End
    END IF;
    EXIT WHEN LToken IS NULL ;
    i := i + 1 ;
    lcol:=lcol+1;
    End Loop;
    Else
    Insert into MU_SIMULATOR_output_ERR (load_no,ERR_CODE,ERR_DESC) values (7777,'0022','The third line onward should start with 1');
    End if;
    END LOOP;
    Commit;
    End;}
    Edited by: LuKKa on Oct 4, 2010 9:20 PM
    Edited by: LuKKa on Oct 4, 2010 9:25 PM

    Yes i gave {} but it is also coming like this ...Yes, since you should use {noformat}{noformat} before and after your example, and not putting your example between a '{' and a '}'.
    So, when you post/type/copypaste:
    {noformat}select *
    from emp;{noformat}
    on this forum, it will appear as:select *
    from emp;See the FAQ for more tags/tips:
    http://forums.oracle.com/forums/help.jspa                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • How to execute the content of varchar  variable like a simple query

    Hi everyone!
    I did a PL/SQL region in apex, in this region I did the query which is storaged in a variable; it was did it concatenate several times,
    in the procedure I have several sentences.
    I thought that the command 'execute immediate' would get a good result but it do not print the result.
    declare
    variable varchar2(1000);
    begin
    --sentences
    --execute inmmediate( variable );
    --return variable
    end;
    I only want to how to execute the content of varchar variable.
    For example, suppose that the result of this procedure is
    'SELECT SYSDATE FROM DUAL'
    How and what do I must do for this query execute like a normal query that is in apex?
    I expect your prompt reply.
    Thank you for your help.
    Best regards

    Let us say your table containing SQL is
    t_sql_table
    and has two columns
    primary_key
    and
    sql_query.
    You would need to do the following:
    1. Create a Report of type "Function returning SQL Query"
    2. Put the following there:
    DECLARE
       v_query   VARCHAR2 (4000);
    BEGIN
       SELECT sql_query
         INTO v_query
         FROM t_sql_table
        WHERE primary_key = 1;
       RETURN v_query;
    END;Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

  • How to execute private procedures in a package

    Hi
    I have created private procedures in a package.
    now i want to execute the private procedure. how to execute the private one

    Hi;
    Pelase see below which could be helpful for your issue:
    Private procedures in a package
    http://stackoverflow.com/questions/924490/how-do-i-execute-private-procedures-in-an-oracle-package
    Regard
    Helios

  • How to execute the content of varchar as query

    Hi everyone!
    I did a PL/SQL region in apex, in this region I did the query which is storaged in a variable; it was did it concatenate several times,
    in the procedure I have several sentences.
    I thought that the command 'execute immediate' would get a good result but it do not print the result.
    declare
    variable varchar2(1000);
    begin
    --sentences
    --execute inmmediate( variable );
    --return variable
    end;
    I only want to how to execute the content of varchar variable.
    For example, suppose that the result of this procedure is
    'SELECT SYSDATE FROM DUAL'
    How and what do I must do for this query execute like a normal query that is in apex?
    I expect your prompt reply.
    Thank you for your help.
    Best regards

    Erik,
    Try dropping this into a PL/SQL region
    DECLARE
      v_result VARCHAR2(500);
    BEGIN
      SELECT SYSDATE
        INTO v_result
        FROM DUAL;
      htp.prn(v_result);
    END;
    {code}
    use the htp.prn command to write html you want to display. In this case we are just writing the date to the screen.
    Good luck,
    Tyson                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • 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

  • While executing the Procedure Getting Error

    Hi I am New to ODI.
    I create one new Procedure just to delete the Target table.
    delete from <%=snpRef.getTable("L","T_CUSTOMER","D")%>. T_Customer is my target table.Technology:Oracle(Both Source and Target)
    I selected the correct Context ,Schema and Technology.
    While executing the procedure i am getting following error
    java.lang.Exception: Internal error: object ConnectConnection
    ColConnectId:null
    ColContextCode:DEV
    ColConName:null
    ColIndCommit:null
    ColIsolLevel:null
    ColLschemaName:null
    ColPlanComp:null
    ColTechIntName:null
    DefConnectId:null
    DefContextCode:DEV
    DefConName:null
    DefIndCommit:null
    DefIsolLevel:null
    DefLschemaName:FCS
    DefPlanComp:null
    DefTechIntName:ORACLE
    ExeChannel:J
    IndErr:1
    IndLogMethod:null
    IndLogNb:null
    LogLevDet:3
    Nno:1
    OrdTrt:0
    ScenTaskNo:1
    SessNo:61001
    TaskName1:Procedure
    TaskName2:Delete
    TaskName3:Delete
    TaskType:S
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execSrcOrders(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSqlS.treatTaskTrt(SnpSessTaskSqlS.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java)
         at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
         at com.sunopsis.dwg.cmd.DwgCommandSession.treatCommand(DwgCommandSession.java)
         at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
         at com.sunopsis.dwg.cmd.e.i(e.java)
         at com.sunopsis.dwg.cmd.g.y(g.java)
         at com.sunopsis.dwg.cmd.e.run(e.java)
         at java.lang.Thread.run(Unknown Source)
    Thanks in advance.

    i Used the below syntax and checked its working fine.
    delete from <%=snpRef.getObjectName("L","T_CUSTOMER","D")%>

  • How to retrieve the procedure value and pass the value to a form field

    How to retrieve the procedure value and pass the value to a form field?

    Set property for the field and the value is the actual procedure/function.
    Cheers

  • Workflow Questions - How to execute the steps in a workflow automatically?

    I am using MDM 5.5 SP6.
    My Question is how to execute the steps in the workflow automatically. That means NO user interaction.
    I have a simple workflow, Start- Process -- Syndicate -  Stop.
    When a new record added /updated/inserted this workflow will start automatically.  The workflow inbox, the workflow status is u2018Receivedu2019 Step is u2018Processu2019.  Now I have to right click on the record then u2018Next Stepu2019 then click on u2018Syndicateu2019 then workflow completes automatically.
    How to execute the Syndication step automatically?.  I donu2019t want to have any user interaction to syndicate these records.
    Is this possible?
    The reason for this is I want to do some field validation and based on the field validation some assignments then then I want  to syndicate these records without user interaction..

    Hi,
    If you want to do some validations and then based on result assignments on some of the fields before syndicating, then you have to use workflow. Only syndication server will not fulfill this requirement.
    you may try by making validation's automatic property as "Error". This way it will not allow to add any record not fulfilling validation. You can also try using calculated fields instead of assignment.
    I am not sure if you can make your workflow fully automatic, because atleast one process step is must for any workflow, and process step means user action.
    Regards,
    Shiv

  • How to execute the data in the form when the data is already avaliable

    Hi,
    I am working with forms 6i. I have a problem while executing the data in the form
    Actually, the data is already present in the form. But when i run the form, the data is not displayed.
    can anyone please help me how to execute the data. below is the code
    Set_Alert_Property(alert_id,ALERT_MESSAGE_TEXT,'Do you want to refresh new Data for that Year and Field ? (it will take a time).') ;
                   SET_ALERT_BUTTON_PROPERTY(alert_id, ALERT_BUTTON1, LABEL, 'Yes');
                   SET_ALERT_BUTTON_PROPERTY(alert_id, ALERT_BUTTON2, LABEL, 'No');
                   SET_ALERT_BUTTON_PROPERTY(alert_id, ALERT_BUTTON3, LABEL, 'Cancel');
                   button_number :=Show_Alert(alert_id) ;
                   synchronize;
                   if button_number != ALERT_BUTTON3 then
                        if button_number = ALERT_BUTTON1 then
                             :param.field := :control.f_cd;
                             :param.year := :control.year;
                             build_tables;
                             fields;
    -- areas(:param.field);
                             PUT_PARAM;
                             COMMIT_FORM;
                        go_block('wet_criterias');
                        end if;
                        if button_number = ALERT_BUTTON2 then
                             :exhibits.field_display := :control.f_name || ' - Exhibits';
                             go_block('RESERVOIR');
                             execute_query;
                        end if;
                   end if;
              end if;
    else
         message('Fields must be entered...');
    end if;
    else
    message('Fields must be entered...');
    end if;

    It's hard to know what logic you are trying to implement.
    However, by looking at your code, it seems that if the user select 'Yes' to the question "Do you want to refresh", nothing is done except the go_block('wet_criterias'). Should there be an 'Execute_Query' ?
    No idea...

Maybe you are looking for

  • How can I correct a "Run time error" on my mac mini?

    On one web site in my book marks I have suddenly got this message -"Runtime error" How can I fix it?

  • E71: Phone refuses to read memory card after conne...

    Hi, I'm having a peculiar problem. Every single time I connect my E71 to my laptop via cable and PC Suite, after a few moments the phone refuses to recognize the memory card. I cannot transfer data directly to the card. I have tried the PC Suite Mode

  • Check received from customer

    Dear experts, i want to enter check no. which i received from my customer is it possible this is manual check no e-banking. thanks guro

  • Find latest value based on defined date

    Hi all, In my below example, I want to find the latest symptom and name which has been added after 24-mar-2012 (not before that) .Not getting proper output with xx as (select 101 as ID, 'A01' as name, '03/24/2012' as create_date from dual union all s

  • ITunes crashes as soon as I plug in iPhone 3GS

    Recently my iPhone 3GS freezes iTunes 9.0.2 (25) every time. I tried every USB port and the same problem occurs. I can open iTunes without the iPhone connected but the minute I plug it in iTunes freezes and I have to force quit. I read Windows users