VB code for executing pl/sql procedure, and displaying TABLE OUT parameter

Does anybody have any sample VB code (using OO4O) for executing a PL/SQL stored procedure, and then displaying (in Excel preferably) the following OUT parameters from the procedure:
(1) variable(s) of TYPE PL/SQL RECORD
(2) variable of TYPE PL/SQL TABLE defined as TABLE%ROWTYPE
(3) n variables of TYPE PL/SQL TABLE'S defined as table.column%TYPE;
Thanks.

Here is what we use to bring in arrays of data from plsql. Here will be some sample vba code and plsql.
What the plsql need to run in an array of input dates and an array of ids to lookup for the dates (also needs the number of values in the arrray.
vba code...
Sub Bull()
Dim oDoc As Object
Dim oTable As Object
Dim oCell As Object
Dim ArrCtr As Integer
Dim iCount As Integer 'Counter
Dim DataDynaset As Object 'Dynaset for retrieved values
Dim DischDataDynaset As Object 'Dynaset for retrieved values
Dim TWDataDynaset As Object 'Dynaset for retrieved values
Dim PDDataDynaset As Object 'Dynaset for previous day retrieved values
Dim MSTssCodes As Variant ' TS Codes Array
Dim NumRows As Integer 'Number of rows in the table
Dim NumColumns As Integer 'Number of columns in the table
Dim NumArrayVals As Integer 'Number of array values (actual number - 1)
OraLogin
NumRows = 83
NumColumns = 11
'One less than number because we start at 0
'NumArrayVals = 5
NumArrayVals = 117
ReDim DateArr(NumArrayVals)
MSTssCodes = Array(3398, 3406, 3391, 3385, 3413, 3378, _
2254, 2254, 2254, _
3398, 3406, 3391, 3385, 3413, _
3460, 3455, 3450, 3447, 3505, 3444, 2254, 2254, _
4974, 2803, 4735, 4719, 2837)
****** NOW THIS WILL GET READY TO SEND TO PLSQLGetData MSTssCodes, DateArr, DataDynaset, NumArrayVals + 1
.... more suff in the sub
Sub GetData(Tssids, DateArray, TmpDataDynaset, NumRetVals)
'Retrieves data from the Oracle database
Dim I As Integer 'Counter
Dim TssidDynaset As Object 'Temporary array for Tssids
Dim DateDynaset As Object 'Temporary array for dates
OraDatabase.Parameters.addTable "TSCODES", 1, 68, NumRetVals, 0
OraDatabase.Parameters("TSCODES").ServerType = ORATYPE_UINT
OraDatabase.Parameters.addTable "DATES", 1, 12, NumRetVals, 0
OraDatabase.Parameters("DATES").ServerType = ORATYPE_DATE
OraDatabase.Parameters.addTable "VALS", 3, 2, NumRetVals, 0
OraDatabase.Parameters("VALS").ServerType = ORATYPE_NUMBER
OraDatabase.Parameters.Add "NUM_VALS", NumRetVals, 3
OraDatabase.Parameters("NUM_VALS").ServerType = ORATYPE_NUMBER
OraDatabase.Parameters.Add "ERR_NUM", 0, 2
OraDatabase.Parameters("ERR_NUM").ServerType = ORATYPE_NUMBER
Set TssidDynaset = OraDatabase.Parameters("TSCODES")
Set DateDynaset = OraDatabase.Parameters("DATES")
'Fill the arrays
For I = 0 To NumRetVals - 1
TssidDynaset.Put_Value Tssids(I), I
DateDynaset.Put_Value DateArray(I), I
Next I
OraDatabase.DbExecuteSQL ("Begin DBCALLS.SELECT_VALUES (:TSCODES, :DATES, :VALS, :NUM_VALS, :ERR_NUM); End;")
If OraDatabase.LastServerErr <> 0 Or OraDatabase.LastServerErrText <> "" Then
MsgBox "Error Getting Data"
End If
Set TmpDataDynaset = OraDatabase.Parameters("VALS")
'MsgBox (OraDatabase.Parameters("NUM_VALS") & " " & OraDatabase.Parameters("ERR_NUM"))
OraDatabase.Parameters.Remove "TSCODES"
OraDatabase.Parameters.Remove "DATES"
OraDatabase.Parameters.Remove "VALS"
OraDatabase.Parameters.Remove "NUM_VALS"
OraDatabase.Parameters.Remove "ERR_NUM"
End Sub
Now here is the plsql called from the DBCALL package......
--Select time series values for give ts_codes.
PROCEDURE select_values (
ts_codes IN IntArrayTyp,
dates IN DateArrayTyp,
vals IN OUT NumArrayTypIB,
--quality   IN  OUT RawArrayTyp,
num_vals IN INTEGER,
err_num OUT INTEGER) IS
BEGIN
--initialize variables
err_num := 0;
FOR i IN 1..num_vals LOOP
BEGIN
SELECT value INTO vals(i)
FROM table_name
WHERE ts_code = ts_codes(i)
AND date_time = dates(i);
EXCEPTION
WHEN OTHERS THEN
--dbms_output.put_line (ts_codes(i) || ' ' || SQLCODE);
vals(i) := -1.0;
err_num := SQLCODE;
END;
END LOOP;
EXCEPTION
WHEN OTHERS THEN
--dbms_output.put_line (tssid || ' ' || SQLCODE);
err_num := SQLCODE;
END select_values;

Similar Messages

  • Pl/sql procedure in package with out parameter

    Hi all,
    my need is to run procedure in package and return 0 or 1 as out parameter depending on data selection.
    How do I return value?
    My first guess is to use raise_application_error, but maybe some other decision can be found here.
    Looking forward to see your reply.
    Thanks ahead.

    Hi,
    marco wrote:
    Hi all,
    my need is to run procedure in package and return 0 or 1 as out parameter depending on data selection.
    How do I return value? Assign the desired value to the OUT parameter.
    My first guess is to use raise_application_error, but maybe some other decision can be found here. You can do it in an EXCEPTION handler, if that makes sense.
    Here's an example:
    CREATE OR REPLACE PROCEDURE     dept_comm
    (     in_deptno     IN     scott.emp.deptno%TYPE     -- Department of interest
    ,     out_comm     OUT     scott.emp.comm%TYPE     -- Total comm in that department
    ,     out_flag     OUT     NUMBER               -- 0 means there were no rows in table, 1 means there were
    AS
    BEGIN
         SELECT     SUM (comm),     COUNT (*)
         INTO     out_comm,     out_flag     -- See note (1) below
         FROM     scott.emp
         WHERE     deptno     = in_deptno;
         IF  out_flag  > 0     -- 0 and 1 are the only possible values for out_flag
         THEN
             out_flag := 1;               -- See note (2) below
         END IF;
    END     dept_comm;
    /This shows out_flag getting set 2 different ways:
    (1) in a SELECT ... INTO statement
    (2) in a normal assignment statement
    Any other way that you can use to assign a value to out_flag (such as passing it as an OUT argument to another procedure) would work as well.
    Edited by: Frank Kulash on Jan 31, 2012 1:27 PM

  • Populating vo from pl/sql procedure and display on the scren in edit mode.

    I want to show data in the page through dynamic vo.For that we have created a vo .inside the VOImpl file I have over write the executeQuery() and inside this method set all the values of the corresponding attributes.but when I run the page no data is comming in the page.Can any body help me to solve the problem.

    Please post your question on the JDeveloper forum since this is not related to JHeadstart.
    I also recommend you use the ADF BC Tester on your app module to test your VO, that is easier than generating a web page to test it.
    Steven Davelaar,
    JHeadstart Team.

  • How to execute a SQL procedure in UNIX

    How to execute a SQL procedure in UNIX

    Check this out..
    -Sri
    << a.sql >>
    create or replace procedure junk(nout out varchar2) is
            x varchar2(20);
    begin
            select 'Sam' into x
            from dual;
            nout := x;
    end;
    << Shell script >>
    sqlplus -s / << DOC
    scott/tiger
    variable x varchar2(20);
    set autoprint on
    @a.sql
    begin
    junk(:x);
    end;
    exit
    DOC
    << Execution of Shell SCript >>
    # sh b.sh
    Procedure created.
    PL/SQL procedure successfully completed.
    X
    Sam

  • TTClasses interface for PL/SQL procedure and fetching its results

    Hi experts,
    I am using TimesTen Release 11.2.1.3.0;
    I created a simple PL/SQL procedure as follows in timesten-
    Command> create or replace procedure employee(eno in emp.empno%type) is
    > e_name emp.ename%type;
    > begin
    > select ename into e_name from emp where emp.empno = eno;
    > dbms_output.put_line(e_name);
    > end;
    > /
    And then I call it through TTClasses as
    TTCmd cmd, compilecmd;
    compilecmd.Prepare(conn,"alter procedure employee compile;",status);
    cmd.Prepare(conn,"begin employee(1020); end;",status);
    cmd.Execute(..);
    cmd.FetchNext(..);
    Here fetchNext is returning an error -
    [TimesTen][TimesTen 11.2.1.3.0 ODBC Driver]Invalid cursor state
    *** ODBC Error/Warning = 24000, TimesTen Error/Warning = 0
    *** Unable to fetch row for statement: <begin employee(1020); end;>.terminate called after throwing an instance of 'TTError'
    Aborted
    How can I run PL/SQL procedures/functions on TimesTen through TTClasses interface?
    Any help or input would be of great value.
    Thanks

    The issue here is nothing to do with TTClasses. Your PL/SQL procedure executes a SELECT statement (that returns just one row) using an implicit cursor within the PL/SQL procedure and retrieves the value of the ename column into the PL/SQL variable. However it does not them do anything with that value such as pass it back to the caller...
    Similarly, the TTClasses code executes a statement that it is expecting to create an ODBC level cursor 9which thsi PL/SQL invocation will not of course) and it is then trying to fetch from a cursor that does not exist.
    I would recommend that you take a look at the TimesTen PL/SQL documentation (Oracle® TimesTen In-Memory Database PL/SQL Developer's Guide Release 11.2.1) and refer to the section on IN, OUT and IN/OUT parameters. This will show you how you can use OUT parameters to return values to the caller. This technique works fine for ODBC, JDBC and OCi programs but does not sadly currently work with TTClasses. TTClasses has not yet been enhanced to support OUT and INOUT parameters. Of course as you have the source code for TTClasses you could make the necessary modifications yourself.
    I will open a bug requesting that TTClasses support OUT and INOUT parameters but in the meantime if you need this kind of capability you will need to either modify TTClasses yourself or switch to using a different API.
    Chris

  • Error-code OWS-00037 with doc/lit WS for a pl/sql procedure in 10.1.3.1

    Hi.
    I'm having a problem when I generate a doc/lit webservice for a pl/sql procedure that returns a collection type containing complex types. During the generation of the service JDeveloper returns with a stack trace in which it complains about zero or more soap headers and it shows fault-code: OWS-00037.
    For clarity, I did not specify any soap headers in the wizard and also did not a add any type mappings.
    I will add the complete stack-trace later to this thread..
    Hope you can help me..
    -Tom

    Hi,
    Glad that somebody else too got this problem. Well, as I had mentioned in my previous posting too, I think there are some procedures in the package, dbms_lob, like the writeappend, createtemporary etc.. which is not found in my dbms_lob.sql file, I am using 8.0.5, but I found these procedures in the 8i, I think it is becos of that.
    By the way if anybody got this solution and got any workaround, please help me too.
    I am still waiting for the solution to that.
    Shanthi

  • Are the Pl/sql procedure and function atomic by themself

    i want to ask a question does oracle pl/sql procedure and function support Atomicity for the database by themself , or they became atomic incase we call them using begin -- end;

    You appear to be discussing transaction scope which is completely independent of PL/SQL blocks like procedures or how you call procedures. It's all in where commits (or rollbacks) are issued.
    If you have a procedure like this
    CREATE PROCEDURE p1
    AS
    BEGIN
      INSERT INTO some_table( key, value ) VALUES( 1, 'Foo' );
      INSERT INTO some_table( key, value ) VALUES( 1, 'Bar' );
    END;where the first statement succeeds and the second statement fails as a result of a duplicate key, there will still be a Foo row in the table but the procedure will have thrown an exception. The caller of the procedure may choose to commit or rollback the change-- that will determine whether the first statement's results are made permanent. If you have a procedure like this,
    CREATE PROCEDURE p1
    AS
    BEGIN
      INSERT INTO some_table( key, value ) VALUES( 1, 'Foo' );
      commit;
      INSERT INTO some_table( key, value ) VALUES( 1, 'Bar' );
    END;the commit will make the first insert permanent regardless of whether the second statement fails no matter what the calling code does (that's one reason that putting commits in stored procedures is generally a bad idea-- the caller is in a much better position to know what other uncommitted work has been done and whether it is safe to commit.
    Justin

  • How to insert BLOB datatype image using PL/SQL Procedure and SQL Loader

    Hi,
    How to insert an image into database using PL/SQL Procedure and also how to insert using SQL Loader. Please help by giving sample code and process description.
    Thanks,
    Vijay V

    http://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:232814159006

  • Function code for execute button

    Hi,
    I have a requirement like this...
    there is a program for selective deletion from a data target by a transaction called delete_facts.
    this generates a program for selective deletion. when i run this report there comes one screen asks for selections fields and then again excute it then deletion will happen.
    But this program i need to modify for certain default values so as to avoid entering of the values in the selection screen.
    i will use default value this will solve my 1st purpose but since this program has to be scheduled from process chain, the 2nd execute funtionality( once the values appear in the screen) shud be automated.
    can anybody tell me how to do this that is after program runs values will be passed to selection screen and selection screen shud not be shown and execute shud happen automatically.
    this is the code generated by transaction delete_facts:
    *& Report  ZTEST_DELETE1
    REPORT  ZTEST_DELETE1.
    generated Header from i_sel_repid
    generated REPORT (RSDRD)
    (should be deleted after use)
    Generated by..: SALAGUN
    Date/Time.....: 20070322 / 051426
    *REPORT GP457FUV92GJS4663HYHXLYC9Q7 .
    generated Tables from i_t_tables
                     and  i_datatarget
    TABLES:
    SSCRFIELDS,
    /BIC/SZTESTBC
    ,/BI0/SCHNGID
    ,/BI0/SRECORDTP
    ,/BI0/SREQUID
    ,/BI0/SDATE
    ,/BI0/SUNIT
    generated DATA/TYPES
    TYPE-POOLS: RSDRD, RSDQ.
    DATA:
      L_INTERACTIVE      TYPE RS_BOOL,
      L_ANSWER(1)        TYPE C,
      L_TYPE(1)          TYPE C,
      L_PARALLEL         TYPE I,
      L_NO_OF_ROWS       TYPE I,
      L_NO_OF_ROWS_C(10) TYPE C,
      L_TITEL            TYPE RS_CHAR72,
      L_TEXT1            TYPE RS_CHAR72,
      L_TEXT2            TYPE RS_CHAR72,
      L_S_RANGE          TYPE RSDRD_S_RANGE,
      L_S_SELTXT         TYPE RSDQ_S_SELTEXT,
      L_SX_SEL           TYPE RSDRD_SX_SEL,
      L_T_MSG            TYPE RS_T_MSG,
      L_THX_SEL          TYPE RSDRD_THX_SEL,
      L_T_SELTXTS        TYPE RSDQ_T_SELTEXT
                              WITH HEADER LINE.
    generated SELECTION-SCREEN from i_t_selscr
    SELECTION-SCREEN BEGIN OF BLOCK B001 WITH FRAME TITLE T001 .
    SELECT-OPTIONS C001 FOR /BIC/SZTESTBC-/BIC/ZTESTBC
    default 'D' TO  'C'.
    SELECTION-SCREEN   END OF BLOCK B001 .
    SELECTION-SCREEN BEGIN OF BLOCK B002 WITH FRAME TITLE T002 .
    SELECT-OPTIONS C002 FOR /BI0/SCHNGID-SID .
    SELECT-OPTIONS C003 FOR /BI0/SRECORDTP-SID .
    SELECT-OPTIONS C004 FOR /BI0/SREQUID-SID .
    SELECTION-SCREEN   END OF BLOCK B002 .
    SELECTION-SCREEN BEGIN OF BLOCK B003 WITH FRAME TITLE T003 .
    SELECT-OPTIONS C005 FOR /BI0/SDATE-DATE0 .
    SELECTION-SCREEN   END OF BLOCK B003 .
    SELECTION-SCREEN BEGIN OF BLOCK B004 WITH FRAME TITLE T004 .
    SELECT-OPTIONS C006 FOR /BI0/SUNIT-UNIT .
    SELECTION-SCREEN   END OF BLOCK B004 .
    SELECTION-SCREEN BEGIN OF BLOCK B005 WITH FRAME TITLE T005 .
    PARAMETERS L_PA TYPE DBMAN_PARALLEL_DEGREE DEFAULT '01'.
    DATA L_P1(1) TYPE C.
    PARAMETERS L_NL TYPE DBMAN_NO_LOGGING AS CHECKBOX DEFAULT ' '.
    PARAMETERS L_SR TYPE DBMAN_SHOW_REPORT AS CHECKBOX DEFAULT ' '.
    SELECTION-SCREEN   END OF BLOCK B005 .
    generated body from i_t_body
    generated INITIALIZATION from i_t_init
                             and  i_t_seltexts
                             and  i_batch_allowed
                             and  i_datatarget
    INITIALIZATION.
    T001 = 'product'.
    T002 = 'Data Package'.
    T003 = 'Time'.
    T004 = 'Unit'.
    T005 = 'Options'.
    SELECTION-SCREEN FUNCTION KEY 1.
    MOVE 'Execute in Bckgrnd' TO SSCRFIELDS-FUNCTXT_01.
    PERFORM RESTRICT_SEL_OPTIONS(SAPLRSDRD).
    SET TITLEBAR 'SELECTION' OF PROGRAM 'SAPLRSDRD' WITH
    ' Delete selected entries from the data target DELETE '.
    L_S_SELTXT-NAME = 'C001'.
    L_S_SELTXT-KIND = 'S'.
    L_S_SELTXT-TEXT = 'Base Code'.
    APPEND L_S_SELTXT TO L_T_SELTXTS.
    L_S_SELTXT-NAME = 'C002'.
    L_S_SELTXT-KIND = 'S'.
    L_S_SELTXT-TEXT = 'Change Run ID (SID)'.
    APPEND L_S_SELTXT TO L_T_SELTXTS.
    L_S_SELTXT-NAME = 'C003'.
    L_S_SELTXT-KIND = 'S'.
    L_S_SELTXT-TEXT = 'Record type (SID)'.
    APPEND L_S_SELTXT TO L_T_SELTXTS.
    L_S_SELTXT-NAME = 'C004'.
    L_S_SELTXT-KIND = 'S'.
    L_S_SELTXT-TEXT = 'Request ID (SID)'.
    APPEND L_S_SELTXT TO L_T_SELTXTS.
    L_S_SELTXT-NAME = 'C005'.
    L_S_SELTXT-KIND = 'S'.
    L_S_SELTXT-TEXT = 'Calendar Day'.
    APPEND L_S_SELTXT TO L_T_SELTXTS.
    L_S_SELTXT-NAME = 'C006'.
    L_S_SELTXT-KIND = 'S'.
    L_S_SELTXT-TEXT = 'Unit of measure'.
    APPEND L_S_SELTXT TO L_T_SELTXTS.
    L_S_SELTXT-NAME = 'L_PA'.
    L_S_SELTXT-KIND = 'P'.
    L_S_SELTXT-TEXT = 'Parall. deg. during reconstruc'.
    APPEND L_S_SELTXT TO L_T_SELTXTS.
    L_S_SELTXT-NAME = 'L_NL'.
    L_S_SELTXT-KIND = 'P'.
    L_S_SELTXT-TEXT = 'Switch off logging drng recons'.
    APPEND L_S_SELTXT TO L_T_SELTXTS.
    L_S_SELTXT-NAME = 'L_SR'.
    L_S_SELTXT-KIND = 'P'.
    L_S_SELTXT-TEXT = 'Display generated report'.
    APPEND L_S_SELTXT TO L_T_SELTXTS.
    generated AT SELECTION-SCREEN OUTPUT from i_sel_repid
    AT SELECTION-SCREEN OUTPUT.
    CALL FUNCTION 'SELECTION_TEXTS_MODIFY'
         EXPORTING
              PROGRAM                     =  'GP457FUV92GJS4663HYHXLYC9Q7'
         TABLES
              SELTEXTS                    =  L_T_SELTXTS
         EXCEPTIONS
              PROGRAM_NOT_FOUND           = 1
              PROGRAM_CANNOT_BE_GENERATED = 2
              OTHERS                      = 3.
    generated AT SELECTION-SCREEN
    AT SELECTION-SCREEN.
    CASE SSCRFIELDS-UCOMM.
      WHEN 'ONLI'.
        L_INTERACTIVE = RS_C_TRUE.
      WHEN 'OPTI'.
      WHEN 'DELS'.
      WHEN 'FC01'.
        L_INTERACTIVE = RS_C_FALSE.
        SSCRFIELDS-UCOMM = 'ONLI'.
      WHEN 'OTHERS'.
    ENDCASE.
    generated END-OF-SELECTION from i_t_selopt
                               and  i_del_repid
                               and  i_datatarget
                               and  i_gen_mode
    END-OF-SELECTION.
    IF NOT C001[] IS INITIAL.
      CLEAR L_SX_SEL.
      L_SX_SEL-IOBJNM = 'ZTESTBC'.
      LOOP AT C001 .
        CLEAR L_S_RANGE.
        MOVE C001-SIGN TO L_S_RANGE-SIGN.
        MOVE C001-OPTION TO L_S_RANGE-OPTION.
        MOVE C001-LOW TO L_S_RANGE-LOW.
        MOVE C001-HIGH TO L_S_RANGE-HIGH.
        MOVE RS_C_TRUE TO L_S_RANGE-KEYFL.
        APPEND L_S_RANGE TO L_SX_SEL-T_RANGE.
      ENDLOOP.
      INSERT L_SX_SEL INTO TABLE L_THX_SEL.
    ENDIF.
    IF NOT C002[] IS INITIAL.
      CLEAR L_SX_SEL.
      L_SX_SEL-IOBJNM = '0CHNGID'.
      LOOP AT C002 .
        CLEAR L_S_RANGE.
        MOVE C002-SIGN TO L_S_RANGE-SIGN.
        MOVE C002-OPTION TO L_S_RANGE-OPTION.
        MOVE C002-LOW TO L_S_RANGE-SIDLOW.
        MOVE C002-HIGH TO L_S_RANGE-SIDHIGH.
        MOVE RS_C_FALSE TO L_S_RANGE-KEYFL.
    start change
        DESCRIBE FIELD C002-LOW TYPE l_type.
        IF l_type = 'I'.
          CONDENSE L_S_RANGE-LOW.
          CONDENSE L_S_RANGE-HIGH.
        ENDIF.
    stop change
        APPEND L_S_RANGE TO L_SX_SEL-T_RANGE.
      ENDLOOP.
      INSERT L_SX_SEL INTO TABLE L_THX_SEL.
    ENDIF.
    IF NOT C003[] IS INITIAL.
      CLEAR L_SX_SEL.
      L_SX_SEL-IOBJNM = '0RECORDTP'.
      LOOP AT C003 .
        CLEAR L_S_RANGE.
        MOVE C003-SIGN TO L_S_RANGE-SIGN.
        MOVE C003-OPTION TO L_S_RANGE-OPTION.
        MOVE C003-LOW TO L_S_RANGE-SIDLOW.
        MOVE C003-HIGH TO L_S_RANGE-SIDHIGH.
        MOVE RS_C_FALSE TO L_S_RANGE-KEYFL.
    start change
        DESCRIBE FIELD C003-LOW TYPE l_type.
        IF l_type = 'I'.
          CONDENSE L_S_RANGE-LOW.
          CONDENSE L_S_RANGE-HIGH.
        ENDIF.
    stop change
        APPEND L_S_RANGE TO L_SX_SEL-T_RANGE.
      ENDLOOP.
      INSERT L_SX_SEL INTO TABLE L_THX_SEL.
    ENDIF.
    IF NOT C004[] IS INITIAL.
      CLEAR L_SX_SEL.
      L_SX_SEL-IOBJNM = '0REQUID'.
      LOOP AT C004 .
        CLEAR L_S_RANGE.
        MOVE C004-SIGN TO L_S_RANGE-SIGN.
        MOVE C004-OPTION TO L_S_RANGE-OPTION.
        MOVE C004-LOW TO L_S_RANGE-SIDLOW.
        MOVE C004-HIGH TO L_S_RANGE-SIDHIGH.
        MOVE RS_C_FALSE TO L_S_RANGE-KEYFL.
    start change
        DESCRIBE FIELD C004-LOW TYPE l_type.
        IF l_type = 'I'.
          CONDENSE L_S_RANGE-LOW.
          CONDENSE L_S_RANGE-HIGH.
        ENDIF.
    stop change
        APPEND L_S_RANGE TO L_SX_SEL-T_RANGE.
      ENDLOOP.
      INSERT L_SX_SEL INTO TABLE L_THX_SEL.
    ENDIF.
    IF NOT C005[] IS INITIAL.
      CLEAR L_SX_SEL.
      L_SX_SEL-IOBJNM = '0CALDAY'.
      LOOP AT C005 .
        CLEAR L_S_RANGE.
        MOVE C005-SIGN TO L_S_RANGE-SIGN.
        MOVE C005-OPTION TO L_S_RANGE-OPTION.
        MOVE C005-LOW TO L_S_RANGE-LOW.
        MOVE C005-HIGH TO L_S_RANGE-HIGH.
        MOVE RS_C_TRUE TO L_S_RANGE-KEYFL.
        APPEND L_S_RANGE TO L_SX_SEL-T_RANGE.
      ENDLOOP.
      INSERT L_SX_SEL INTO TABLE L_THX_SEL.
    ENDIF.
    IF NOT C006[] IS INITIAL.
      CLEAR L_SX_SEL.
      L_SX_SEL-IOBJNM = '0UNIT'.
      LOOP AT C006 .
        CLEAR L_S_RANGE.
        MOVE C006-SIGN TO L_S_RANGE-SIGN.
        MOVE C006-OPTION TO L_S_RANGE-OPTION.
        MOVE C006-LOW TO L_S_RANGE-LOW.
        MOVE C006-HIGH TO L_S_RANGE-HIGH.
        MOVE RS_C_TRUE TO L_S_RANGE-KEYFL.
        APPEND L_S_RANGE TO L_SX_SEL-T_RANGE.
      ENDLOOP.
      INSERT L_SX_SEL INTO TABLE L_THX_SEL.
    ENDIF.
      L_PARALLEL = L_PA.
      IF L_INTERACTIVE EQ RS_C_TRUE.
      CALL FUNCTION 'RSDRD_SEL_DELETION'
           EXPORTING
                I_DATATARGET   = 'DELETE'
                I_THX_SEL           = L_THX_SEL
                I_AUTHORITY_CHECK   = RS_C_TRUE
                I_NO_LOGGING        = L_NL
                I_PARALLEL_DEGREE   = L_PARALLEL
                I_SHOW_REPORT       = L_SR
           CHANGING
                C_T_MSG             = L_T_MSG.
      ELSE.
        CALL FUNCTION 'RSDRD_BUILD_REPORT_FOR_BATCH'
             EXPORTING
              I_REPID        = 'GP457FWJUK1J1F3ZIZZOEH9U533'
              I_DATATARGET   = 'DELETE'
              I_GEN_ONLY          = RS_C_FALSE
              I_THX_SEL           = L_THX_SEL
              I_AUTHORITY_CHECK   = RS_C_TRUE
              I_NO_LOGGING        = L_NL
              I_PARALLEL_DEGREE   = L_PARALLEL
              I_SHOW_REPORT       = L_SR
         CHANGING
              C_T_MSG             = L_T_MSG.
      ENDIF.
    Thanks in advance,
    Vijaya

    hi!
    Function code for execute button is 'ONLI'.
    try ur code using it!!
    Reward points if it helps.
    Regards,
    Neha Bansal.
    Message was edited by:
            Neha Bansal

  • What is the function code for execute

    Hi,
    What is the function code for execute.
    I am using set pf-status under initialization.
    Thanks.
    Sai.

    Hi,
    If your adding a execute in pf-status then we can give the function code for execute as 'EXEC' - F8.
    Nyways it automatically comes no need to explicitly add in pf-status. The standard function code is 'ONLI'
    just we need to check the sy-ucomm value and perform what you want.
    i.e if sy-ucomm = 'EXEC'.
    endif.
    hope this help you.
    plz reward if useful.
    thanks,
    dhanashri.
    Edited by: Dhanashri Pawar on Jun 26, 2008 11:43 AM

  • Recursive Java programming method for executing recursive SQL queries

    Anybody has a Java/JDBC example method to execute recursive SQL queries and print results? The method has to work for any number of queries and levels and the first query passes the parameter to the second query.
    Edited by: user4316962 on Jun 12, 2011 1:59 PM

    user4316962 wrote:
    Guys, the problem what I am trying to solve is much more complex and I don’t think SQL level recursion is enough. I am looking for Java solution with SQL queries in it to make it more flexible and DB independent.
    If you want to do recursion in SQL then it has nothing to do with Java.
    And if you want to do recursion in Java then the idiom itself has nothing to do with SQL.
    Other than that you have provided enough detail for anyone to even guess at what you are asking.
    As a start I am not even sure that you understand what recursion is nor how JDBC works. (But it could be that you are using the terms to mean something else.)
    And looking at your original post it could be nothing more than that you are looking for a design pattern - perhaps the interpreter.

  • How can we write the code for opening the command prompt and closing the

    how can we write the code in java for opening the command prompt and closing the cmd prompt from eclipse (cmd prompt should close when click on the turminate button in eclipse)

    rakeshsikha wrote:
    how can we write the code for opening the command prompt and closing theBy typing in Eclipse (which you seemingly have)?

  • I create an id. on review option when i enter visa card and security code, it always gives an error msg "Invalid Secruity code". but i use this code for money withdraw from ATM and for shopping also. plz tell the solution ????

    i create an id. on review option when i enter visa card and security code, it always gives an error msg "Invalid Secruity code". but i use this code for money withdraw from ATM and for shopping also. plz tell the solution ????

    The code they are asking for is the last three digits of the number on the back of the card (you don't use this when using an ATM or presenting the card in shops).

  • What r the trns code for maintenance view, help view and projection view

    hi all
    what r the transaction code for maintenance view, help view and projection view
    can anyone tell me how to create maitenance, help and projection view.
    with an example
    regs
    hari

    <b>What is the Different Types and Usage of Views
    The followings are different types of views:</b>
    - <b>Database View   (SE11)</b>
    Database views are implement an inner join, that is, only records of the primary table (selected via the join operation) for which the corresponding records of the secondary tables also exist are fetched. Inconsistencies between primary and secondary table could, therefore, lead to a reduced selection set. 
    In database views, the join conditions can be formulated using equality relationships between any base fields. In the other types of view, they must be taken from existing foreign keys. That is, tables can only be collected in a maintenance or help view if they are linked to one another via foreign keys.
    - <b>Help View    ( SE54)</b>
    Help views are used to output additional information when the online help system is called. 
    When the F4 button is pressed for a screen field, a check is first made on whether a matchcode is defined for this field. If this is not the case, the help view is displayed in which the check table of the field is the primary table. Thus, for each table no more than one help view can be created, that is, a table can only be primary table in at most one help view. 
    -<b> Projection View  (SE11)</b>
    Projection views are used to suppress or mask certain fields in a table (projection), thus minimizing the number of interfaces. This means that only the data that is actually required is exchanged when the database is accessed.
    A projection view can draw upon only one table. Selection conditions cannot be specified for projection views.
    <b>- Maintenance View   ( SE54 )</b>
    Maintenance views enable a business-oriented approach to looking at data, while at the same time, making it possible to maintain the data involved. Data from several tables can be summarized in a maintenance view and maintained collectively via this view. That is, the data is entered via the view and then distributed to the underlying tables by the system.
    reward   points if it is usefull...
    Girish

  • How to test PL/SQL procedures and functions?

    What are the proven ways to test pl/sql procedures and functions? Specifically, procedures and functions that take cursor variables as IN OUT parameter, OR procedure and functions that takes an array as IN parameter?
    Thx.

    HI,
    One way could by using PL/SQL Develper tool, see Tools/Test Manager...
    Also there are others tools, see [Cleaning Up PL/SQL Practices|http://www.oracle.com/technology/oramag/oracle/04-mar/o24tech_plsql.html] and specifically oUnit
    Regards,
    PS: Your question is very general, could you provide an specific example you are trying?
    Edited by: Walter Fernández on Nov 11, 2008 4:04 PM - Adding PS

Maybe you are looking for

  • Pricing procedure not to bill customer but revenue recognition

    I'm looking for guidance on how to setup a pricing procedure conditions.   First let me explain the situation.  What happens is the customer buys say 2000 software licenses on a sales order. The customer is billed and the customer account is debited

  • Uninstall Quicktime Pro 7

    Forgive me if this has been answered before, but I've been searching the forums and can't find an answer to my problem. I accidentally deleted files from my main Library > Quicktime folder. I thought I was trashing components installed by a third par

  • ORA-02050: 에러가 가끔가다가 발생하는데

    alert.log 의 에러 내용은 이렇습니다. ~~~~~ Tue Jan 2 08:57:41 2007 Error 2068 trapped in 2PC on transaction 20.4.4845. Cleaning up. Error stack returned to user: ORA-02050: 트랜잭션 20.4.4845가 롤백되고, 다른 원격 DB는 불명료한 상태입니다 ORA-02068: TO_DB_2ND로 부터의 다음의 치명적인 오류가 있습니다 O

  • Use of around a type

    I am not familiar with the following convention, specifically the use of the < >. private ArrayList<ActionListener> actionListenerList;1) Looking for the meaning of the usage of < >. TIA

  • Lost ical data when upgraded to maverick

    I've upgraded from Snow Leopard to Mavericks and now find I have none of my icalendar data.   Can anybody help?  I do have the Time Machine Backup but don't know how to retrieve ical data from it. Thanks for any help!