A way to bind PLSQL indexed tables to ResultSets???

Hello All,
I got a stored procedure that returns several PLSQL indexed tables. Instead of handling them as separate arrays, I'd like to combine all of them as one resultset. Is that possible? Here is a sample code of what I'm trying to do:
// Parameters 5 and 6 return PLSQL indexed tables of varchar
OracleCallableStatement cmd = (OracleCallableStatement )cn.prepareCall(" begin PKG_MY_TEST.MY_TEST(?,?,?,?,?,?); end;");
cmd.registerOutParameter(1, Types.NUMERIC, 8);
cmd.registerOutParameter(2, Types.VARCHAR, 500);
cmd.registerOutParameter(3, Types.VARCHAR, 30);
cmd.registerOutParameter(4, Types.VARCHAR, 32);
cmd.registerIndexTableOutParameter(5, 100, Types.VARCHAR, 32);
cmd.registerIndexTableOutParameter(6, 100, Types.VARCHAR, 32);
cmd.execute();
String[] arr1 = (String[]) cmd.getPlsqlIndexTable(5);
String[] arr2 = (String[]) cmd.getPlsqlIndexTable(6);
// I have two string arrays. Can I make one resultset out of them?
Thanks in advance!
null

Hello All,
I got a stored procedure that returns several PLSQL indexed tables. Instead of handling them as separate arrays, I'd like to combine all of them as one resultset. Is that possible? Here is a sample code of what I'm trying to do:
// Parameters 5 and 6 return PLSQL indexed tables of varchar
OracleCallableStatement cmd = (OracleCallableStatement )cn.prepareCall(" begin PKG_MY_TEST.MY_TEST(?,?,?,?,?,?); end;");
cmd.registerOutParameter(1, Types.NUMERIC, 8);
cmd.registerOutParameter(2, Types.VARCHAR, 500);
cmd.registerOutParameter(3, Types.VARCHAR, 30);
cmd.registerOutParameter(4, Types.VARCHAR, 32);
cmd.registerIndexTableOutParameter(5, 100, Types.VARCHAR, 32);
cmd.registerIndexTableOutParameter(6, 100, Types.VARCHAR, 32);
cmd.execute();
String[] arr1 = (String[]) cmd.getPlsqlIndexTable(5);
String[] arr2 = (String[]) cmd.getPlsqlIndexTable(6);
// I have two string arrays. Can I make one resultset out of them?
Thanks in advance!
null

Similar Messages

  • BPL Sales orders: Updating index tables

    Hello forum,
    After using BPL to copy sales orders, index tables are not updated. Examples of these tables are VAKPA (sales index by partner function), VAPMA (sales index by material), VLPMA (deliveries by material) or VRPMA (billing documents by material).
    To correct this what we do is run program RVV05IVB (Reorganization of SD Document Indices) but this report is very time consuming. (it is not that easy to know the documents numbers for all sales / deliveries / billing docs that were copied so we have to run the report for all documents; even if we knew the document numbers, though, the report is very slow because these tables do not have an index by document).
    Is this the way to do it, or are other people working differently?
    Or should these tables be included in the context?
    Thanks in advance,
    Rui Dantas

    >
    Nico Gaertner wrote:
    > Alternatively you can also create this index on the receiver side and connect these tables with the Table VBUK in the BPL datamodel.
    > Nico
    In this case you mean sender system, right?
    The access won't be that bad if you choose the right table to link: VBAP-MATNR for VAPMA, or VBPA-KUNNR + VBPA-PARVW for VAKPA. I'll try in our system.
    It would be even better, of course, if we could link from more than one table (e.g. VBAK + VBAP to VAPMA). This is not possible, right?

  • Can we put INDEXES on Views if not Is there any way to make it Index bas

    Hi
    I am running a query in which there are several views involved in the join condition Can we put INDEXES on Views in ORACLE 9i if not Is there any way to make it Index based views beacuse the result that i am getting is very slow and is eating like 10gb of the temp tablespace.
    Thanks

    No, you cannot put indexes on a view. Think about what a view is, a stored sql statement. Oracle has no way of knowing what rows are in a view until it actually runs the view. So, even if you could, Oracle would need to run the view to get the rows, build the index, then run your query a second time using the index. Seems counter productive to me. A view can use indexes on the underlying tables if appropriate.
    Generally speaking, I would say that a query that makes use of multiple views is probably really inefficient. Often, you are only looking for one or two columns from a view which may require joining several tables whose columns are of no use in the main query. I would start by re-writing the query using the base tables, and only using those tables that are actually required to answer the question.
    TTFN
    John

  • Error: ORA-06502: PL/SQL: numeric or value error:NULL index table key value

    Hi,
    I am trying toceate an interface which collects data from database make some transformation and populated seeded tables in the same database.
    My Approach is :
    a) Create a record type variable ( concists of multiple segments)
    b) Create a pl/sql table type of the records type in a)
    c) Created a cursor of same structure as pl/sql table type ( collects data)
    d) BULK CoLLECT data from cursor into pl/sql table
    e) Print the data
    But during Bulk Collect i get the below error :
    Unexpected error in xxc_hr2hr_populate_elements.main at FLOW TRACE-1.120. Error: ORA-06502: PL/SQL: numeric or value error: NULL index table key value
    ORA-20003: Unexpected error in xxc_hr2hr_populate_elements.get_data at FLOW TRACE-1.1.100. Error: ORA-06502: PL/SQL: numeric or value error: Bulk Bind: Truncated Bind

    Ashish_Apps wrote:
    Hi,
    I am trying toceate an interface which collects data from database make some transformation and populated seeded tables in the same database.
    My Approach is :
    a) Create a record type variable ( concists of multiple segments)
    b) Create a pl/sql table type of the records type in a)
    c) Created a cursor of same structure as pl/sql table type ( collects data)
    d) BULK CoLLECT data from cursor into pl/sql table
    e) Print the data
    But during Bulk Collect i get the below error :
    Unexpected error in xxc_hr2hr_populate_elements.main at FLOW TRACE-1.120. Error: ORA-06502: PL/SQL: numeric or value error: NULL index table key value
    ORA-20003: Unexpected error in xxc_hr2hr_populate_elements.get_data at FLOW TRACE-1.1.100. Error: ORA-06502: PL/SQL: numeric or value error: Bulk Bind: Truncated BindVerify the rows you are fetching are having the same data types as your Record like Dates should go to date , decimal should not be fetched in type defined as number etc.

  • Best way to deal with Mutating table exception with Row Level Triggers

    Hello,
    It seems to be that the best way to deal with Mutating Table exception(s) is to have to put all the trigger code in a package & use it in conjunction with a Statement level trigger .
    This sounds quite cumbersome to me . I wonder is there any alternative to dealing with Mutating table exceptions ?
    With Regards

    AskTom has a good article about this,
    http://asktom.oracle.com/tkyte/Mutate/index.html

  • How to register PL/SQL index table parameter in OracleCallableStatement ?

    Hello ,
    I am using Oracle release 8.1.6.0.0 . I need to call a PL/SQL procedure through JDBC, which specifies an INDEX TABLE OUT parameter(e.g. TYPE type_name IS TABLE OF VARCHAR2(10) INDEX BY BINARY_INTEGER) .
    I found that with Oracle8i release 8.1.7, the Oracle JDBC OCI driver supports PL/SQL index-by tables using the registerIndexTableOutParameter method . But I have Oracle 8.1.6 and our client has 8.1.2!
    Is there any way that I can read INDEX TABLE PARAMETER from PL/SQL procedure with Oracle release 8.1.2 and 8.1.6?
    Another question is - Is it possible to do this with Oracle thin driver also ?
    Regards,
    Mukul

    i got the same problem? did you find the way to do it yet?
    thks a lot
    regards.

  • Performance issue during SharePoint list data bind to html table using Ajax call(Rest API)

    Hello,
    I am having multiple lists in my SharePoint Site. I am using SharePoint REST APIs to get data from these lists and bind a HTML Table. Suppose, I have 5 lists with 1000 records each, I am looping 5000 times to bind each row(record) to this html table. This
    is causing performance issue which is taking a very long time to bind. 
    Is there any way So that I can reduce this looping OR is there any better approach to improve the performance. Please kindly Suggest.  Thank you for your help :)
    Warm Regards,
    Ratan Kumar Racha

    Hi Racha,
    For handling large data binding in a page,
    AngularJS would be a great option if you might would worry about the performance.
    You can get more information about using AngularJS from the two links below:
    https://www.airpair.com/angularjs/posts/angularjs-performance-large-applications
    http://www.sitepoint.com/10-reasons-use-angularjs/
    Best regards
    Patrick Liang
    TechNet Community Support

  • Binding Structure/Internal Table to Workflow from Webdynpro

    Hi Gurus,
    I have to trigger workflow from WEBDYNPRO application. For now I have two ways they are:
    1. Triggering WFLow using SAP_WAPI_START_WORKFLOW (Successfull):
    How could I bind Structure/Internal Table (DDIC referred structure) to workflow directly. Presently I am mapping indvidual fields which makes my code complex using FM SAP_WAPI_START_WORKFLOW.
    2. Triggering WFLow using SAP_WAPI_CREATE_EVENT (Bindind issues):
    Also When I try to submit using BOR event with SAP_WAPI_CREATE_EVENT workflow triggers successfully But I cannot able to bind the values. So are there any specific configuration need to be made.( like making task as General while triggering workflow using SAP_WAPI_START_WORKFLOW).
    <<text removed>>
    Edited by: Matt on Aug 5, 2011 7:49 PM

    Hi
    Please make use of the below code
    INCLUDE cntn01_swc.
    DATA lt_kna1    TYPE TABLE OF kna1.
    DATA lt_cont    TYPE TABLE OF swcont.
    DATA lv_wiid    TYPE          sww_wiid.
    swc0_create_container  lt_cont.
    SELECT * FROM kna1 INTO TABLE  lt_kna1 UP TO 10 ROWS.
    swc0_set_table lt_cont 'CUST' lt_kna1.
    CALL FUNCTION 'SWW_WI_START'
      EXPORTING
        creator                      = sy-uname
        task                         = 'WSXXXXXXXX'
        do_commit                    = 'X'
      IMPORTING
        wi_id                        = lv_wiid
      TABLES
        wi_container                 = lt_cont
      EXCEPTIONS
        id_not_created               = 1
        read_failed                  = 2
        immediate_start_not_possible = 3
        execution_failed             = 4
        invalid_status               = 5
        OTHERS                       = 6.
    IF sy-subrc <> 0.
      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
              WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    The other way to do is you  can also make use of OO ABAP classes to trigger the workflow. If you want to create a rfc function module then create a wrapper function module .
    SAP_WAPI_START_WORKFLOW cannot transfer structures or tables which are more thatn 255 characters. So the work around is  either make use of  OO  container or SWCONT container.
    The above code snippet should be included in the assistance class of the webdynpro application and you need to include the define the include cntn01_swc in the class local types  under macros.
    and then you create a method ....... and include the above code in that method.   excluding the include statement.
    Regards
    Pavan

  • Delete operation on indexed table taking lot of time

    We are working on 10g R2. We have a script for archiving a table which upon copying into table (say Y a non indexed table); the pre-decided records from a table (say X indexed table).
    After inserting the records into Y the records are deleted from X. There are close to 50 million records to be archived this way.
    While testing the script in development instance for a million records, we find that on avoiding the delete operation the time taken for the script to execute is ~ 45 minutes which otherwise (including the delete operation) takes 2 hours.
    How can we reduce this overhead time.
    Dropping the index and recreating them is not an option!

    My method is logical if you are planing to migrate at least 90% of all data from X to Y. If so
    For the new X table you only need at most 10% of the size of the current X table ( At my previous post by saying "the same as" i did not mean data, i mean only DDL except storage). Moreover, after renaming X to X_ and copying "data not to be copied to Y" from X_ to X, you may drop unnecessary indexes from X_ to free up some space.

  • Transparent, hashed, indexed tables

    what r transparent, hashed, indexed tables

    hi
    good
    Standard Internal Tables
    Standard tables have a linear index. You can access them using either the index or the key. If you use the key, the response time is in linear relationship to the number of table entries. The key of a standard table is always non-unique, and you may not include any specification for the uniqueness in the table definition.
    This table type is particularly appropriate if you want to address individual table entries using the index. This is the quickest way to access table entries. To fill a standard table, append lines using the (APPEND) statement. You should read, modify and delete lines by referring to the index (INDEX option with the relevant ABAP command).  The response time for accessing a standard table is in linear relation to the number of table entries. If you need to use key access, standard tables are appropriate if you can fill and process the table in separate steps. For example, you can fill a standard table by appending records and then sort it. If you then use key access with the binary search option (BINARY), the response time is in logarithmic relation to
    the number of table entries.
    Sorted Internal Tables
    Sorted tables are always saved correctly sorted by key. They also have a linear key, and, like standard tables, you can access them using either the table index or the key. When you use the key, the response time is in logarithmic relationship to the number of table entries, since the system uses a binary search. The key of a sorted table can be either unique, or non-unique, and you must specify either UNIQUE or NON-UNIQUE in the table definition.  Standard tables and sorted tables both belong to the generic group index tables.
    This table type is particularly suitable if you want the table to be sorted while you are still adding entries to it. You fill the table using the (INSERT) statement, according to the sort sequence defined in the table key. Table entries that do not fit are recognised before they are inserted. The response time for access using the key is in logarithmic relation to the number of
    table entries, since the system automatically uses a binary search. Sorted tables are appropriate for partially sequential processing in a LOOP, as long as the WHERE condition contains the beginning of the table key.
    Hashed Internal Tables
    Hashes tables have no internal linear index. You can only access hashed tables by specifying the key. The response time is constant, regardless of the number of table entries, since the search uses a hash algorithm. The key of a hashed table must be unique, and you must specify UNIQUE in the table definition.
    This table type is particularly suitable if you want mainly to use key access for table entries. You cannot access hashed tables using the index. When you use key access, the response time remains constant, regardless of the number of table entries. As with database tables, the key of a hashed table is always unique. Hashed tables are therefore a useful way of constructing and
    using internal tables that are similar to database tables.
    Index Tables
    Index table is only used to specify the type of generic parameters in a FORM or FUNCTION. That means that you can't create a table of type INDEX.
    Internal tables are not DB tables. Standard and Sorted tables in combined are basically called as Index tables and there nothing else. Here is the hierarchy
                                     ANY TABLE
                                                |
                         |                                                    |
                 Index Tables                                    Hashed Table
                         |          
        |                                                     |
    Standard Table                      Sorted Table
    thanks
    mrutyun^

  • Report error: ORA-06502: PL/SQL: numeric or value error: NULL index table k

    Hi everybody,
    I have two Distinct Databases on two distinct servers. (Oracle Ent. Release 10.2.0.3.0 on AIX 5.3). After I install the latest patch last week, One of the APEX installation has some problems on Home>Application Builder Page. The error message is very random and
    report error:
    ORA-06502: PL/SQL: numeric or value error: NULL index table key value.
    When i change the view (details to icons), everything goes to normal. This error message is reflected some of the pages (report region) of some of my applications randomly. When it appears in a report region, i deselect the order method of the region, the result is normal.
    But the other APEX application on the other instance has no problem. It is a bug? or Should i re-install the APEX instance?
    Thank you for your interest?
    Gökhan ÇATALKAYA

    No, but we have a reproducible test case now so we're working on it. See ORA-06502: PL/SQL: numeric or value error: NULL index table key value
    Scott

  • Is there a way to view all the table names in a certain schema?

    Is there a way to view all the table names in a certain schema?

    SELECT table_name FROM user_tablesThat won't do much good given this piece of information:
    i am trying to finish a lab for school but i don't know what tables are in my
    professor's schema. The appropriate solution is
    SELECT table_name
    FROM all_tables
    WHERE owner = 'PROFESSOR_YAFFLE'
    /This will show the names of the tables which Prof. Yaffle has granted to us.
    Cheers, APC

  • Any way to know the source table of a Form at  runtime

    Hi,
    Is there any way to know the source table/view.. of a form at run time.
    Thanks in advance

    Hi,
    But Get_Block_Property( ..., DML_DATA_TARGET_NAME)
    should be coded, I mean any way to know at the
    runtime, as like we get the Error from the
    Help->Display Errors.If you are asking if there is a way to get this information from the default menu, then the answer is no. However, you can create your own custom menu, or a button in your form that displays that information using the Get_Block_Property when you click on your menu item or button.

  • The best way to keep an Index.pdx updated

    Hello,
    I am creating some index's for my go-workers on a server for searching.
    The problem is, these are large amounts of PDF files and we keep adding to the folders daily. Is there an easy way to keep the index updated without having to keep rebuilding it?
    thanks!
    barbara

    Try scheduling index updates:
    http://kb.adobe.com/selfservice/viewContent.do?externalId=328763&sliceId=2

  • Confused by the removal of aggregate/index tables in HANA

    Hiya,
    I've heard that HANA removes the need for aggregate and index tables like BSIS, BSAS, VRPMA etc.
    Is HANA smart enough to do this? Or does Simple finance (sFIN) do this?
    I mean if we were to replace our Oracle DB with HANA would the index tables no longer exist?
    Or would we then need to implement simple finance to then remove the need for index tables?
    Thanks in advance!

    "HANA is just the DB."
    I wouldn't say it's "just" a DB, but for the point we're making here you can say that SAP HANA is mainly used as a DBMS and not as a application platform.
    "To remove index tables, aggregate tables etc you can activate business functions through SFW5 to improve specific lines of business."
    That's not generally true. Some enhancements (like the VBOX removal) are delivered via enhancement packages. These change the software, but typically don't make a new product out of your system.
    "Installation of sFIN, or S/4HANA contain more deeper changes to both the tables and ABAP code - that improve speed and efficiency."
    Nope, these are actual new implementations. These are new programs that do similar things as the former NetWeaver programs. But they are newly written code.
    This allows for much more radical redesign of functionality leading (hopefully) to even more improvements.
    Coming back to your first sentence: the more radical the software changes the more tightly integrated the solution will be with SAP HANA. More and more function will actually run "in" SAP HANA, making it more than just the DB.
    Ok, I hope this didn't increase the confusion again.
    Cheers,
    Lars

Maybe you are looking for

  • Is there arrays or FOR loops in ABAP?

    Hi everyone! Is there an array and FOR loops in ABAP similar to the C Language? If there is, please give example. _ Thanks a lot!

  • Changing "From" address in Mail

    I have a college email address that I get to keep and have been using that as my default. It is linked to a Gmail account, though, as the college does not provide a server for you after you graduate. You only get to keep the address. On gmail.com, it

  • Help!! ipod itunes disc wont download on my windows vista laptop!!

    I just got a new laptop and it has windows vista with a 64 bit operation and when i try to download the disc to the laptop its give me an error message that says it cannot download onto a 64 bit operation. WHAT DO I DO?? It worked fine on my older wi

  • Oracle Fusion 11g Vs Oracle Fusion 10g

    Hi, What are the major changes and how complex or simple they made it in Fusion 11g over Fusion 10g? Please share this knowledge. Thanks.

  • ALTER TRIGGER DISABLE

    Dear all, I have a trigger on a table in schemaA.I have grant all on table to schemaB. If I login with schemaB, I was not able to disable the trigger of schemaA. It gave the error, ORA-04080: trigger 'blah_blah' does not existPlease help me out. I wi