Pass a Collection of multi-column records from JAVA to Plsql

Hi,
I need to pass a Collection of multi-column records(say Employee Id, Employee Name and Employee Address) from a JAVA application to an Oracle package/stored procedure
for data processing and updates.
I initially thought of using a pl/sql table as an input parameter, but then I came to know that a pl/sql table can have ONLY one column and an index (can be a String in
the case of an Associative Array). Please let me know if my understanding is wrong here.
I then thought of using a PL/SQL table with a RECORD type as an element. But, I came across a documentation that says that, Oracle JDBC does not support RAW, DATE, and PL/SQL RECORD as element types.
Could you please let me know how I can pass multi-column records from JAVA to an Oracle Stored procedure as an input parameter? Millions of rows would be sent by the JAVA program to the Oracle Stored procedure.
Any help will be highly appreciated.
Regards,
Sunil.

There are several examples in the " Working with Oracle Collections" from the "JDBC Developer's Guide and Reference". You can either use a Map to create Java objects that are created with the Oracle objects data or the generic oracle.sql.STRUCT interface.
http://download-west.oracle.com/docs/cd/B10501_01/java.920/a96654/oraarr.htm#1047581
http://download-west.oracle.com/docs/cd/B10501_01/java.920/a96654/oraoot.htm#1039477

Similar Messages

  • How Can I get multi column values from dynamic search help?

    Hi Gurus;
    I'm using dynamic search help in my program.
    I want to get multi column values from search help. But I dont know solution for this issue.
    I'm using F4IF_INT_TABLE_VALUE_REQUEST FM.
    How Can I get multi column values from dynamic search help?
    Thanks.

    Believe it or not, the same FM worked for me in a dynpro. I will try to explain here how it works in custom screen and then you can do your work for other screens or program types. I am not going to write my actual work but will explain in general.
    I have 4 fields (FLD1, FLD2, FLD3, FLD4) and i made the search based on FLD2 and when user click on a line (could be any field), then this would bring the line on to the screens.
    There are like 3 steps.
    You have your value_tab for my fields FLD1, FLD2, FLD3 and FLD4. This is just the data that we pass into the FM. (data: IT_VALTAB type table of ZVAL_TABLE)
    Next map the screen fields into an internal table (data: It_dynpfld type table of dselc ). I also have other internal tables defined  (just to keep it straight, i will be putting here) data:  It_return type standard table of ddshretval.
    Next step is to call the function module. Make sure you have values in IT_VALTAB.
    call function 'F4IF_INT_TABLE_VALUE_REQUEST'
    exporting
            retfield        = 'FLD2'
            value_org       = 'S'
          tables
            value_tab       = It_VALTAB
            return_tab      = It_return
            dynpfld_mapping = It_dynpfld
          exceptions
            parameter_error = 1
            no_values_found = 2
            others          = 3.
        if sy-subrc <> 0.
          message id sy-msgid type sy-msgty number sy-msgno
          with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        else.
          perform get_selected_fields tables It_return.
        endif.
    The code within the perform GET_SELECTED_FIELDS  - We need to map the result fields after user selects it. The code goes like this. This is step is to update the dynpro fields.
    I need a internal table as well as a work area here. like,
    data: lt_fields type table of dynpread,
            la_fields type dynpread.
      field-symbols: <fs_return> type ddshretval.
    so fill out LT_FIELDS from the IT_RETURN table
    loop at lt_return assigning <fs_return>.
        la_fields-fieldname = <fs_return>-retfield.
        la_fields-fieldvalue = <fs_return>-fieldval.
        append la_fields to lt_fields.
        clear: la_fields.
      endloop.
    Call the FM to update the dynpro
    call function 'DYNP_VALUES_UPDATE'
        exporting
          dyname               = sy-repid
          dynumb               = '1002' "This is my screen number. You could use 1000 for selection screen (hope so)
        tables
          dynpfields           = lt_fields
        exceptions
          invalid_abapworkarea = 1
          invalid_dynprofield  = 2
          invalid_dynproname   = 3
          invalid_dynpronummer = 4
          invalid_request      = 5
          no_fielddescription  = 6
          undefind_error       = 7
          others               = 8.
      if sy-subrc <> 0.
        message id sy-msgid type sy-msgty number sy-msgno
                with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      endif.
    good luck

  • Passing pl/sql variable to oracle procedure from java

    Dear
    Sir/madam
    From java its easy to call procedure or function to get pl/sql variables like cursor type or varray type and cast back to that equi type thro' oracle extn package.Is there any way it could be done vice versa.Can i pass Oarcles Pl/SQL datatype like collection Of type Varray/Custom Object or Cursor,Array type to a procedure or function from java program.Is it possible to pass like that.If so could you kindly give a samll eaxample or URL where same type of example could be found
    regards
    kingshuk

    Dear
    Sir/madam
    From java its easy to call procedure or function to get pl/sql variables like cursor type or varray type and cast back to that equi type thro' oracle extn package.Is there any way it could be done vice versa.Can i pass Oarcles Pl/SQL datatype like collection Of type Varray/Custom Object or Cursor,Array type to a procedure or function from java program.Is it possible to pass like that.If so could you kindly give a samll eaxample or URL where same type of example could be found
    regards
    kingshu i suggest to read JPublisher doc - it help support or convert PL/SQL types in Java
    http://otn.oracle.com/docs/products/oracle9i/doc_library/release2/java.920/a96658.pdf
    Kuassi

  • How to view record from java source table

    hi,
    i had created a table as
    CREATE JAVA SOURCE NAMED "Hello" AS
    public class Hello {
    public static String hello() {
    return "Hello World"; } };
    also it compiled but i dont've idea to view the record from it
    can u help me

    Please check the following script --
    create or replace and resolve java source named "Hello"
    as
    import java.io.*;
    import java.sql.*;
    import java.math.*;
    import oracle.sql.*;
    import oracle.jdbc.driver.*;
    public class Hello extends Object
        public static String Display()
        throws IOException
            return "Hello World";
    create or replace procedure Hello(v_str  out varchar2)
    is
       language java
       name 'Hello.Display(java.lang.String) return String';
    create or replace procedure HDisplay
    is
    x  varchar2(400);
    begin
      Hello(x);
      dbms_output.put_line('String is: '||x);
    end;And, from sql prompt --
    exec HDisplay;N.B.: Not Tested...
    Regards.
    Satyaki De.
    Message was edited by:
    Satyaki_De

  • How to Concatenate Multiple Column Records from multiple tables

    my question is
    there are three tables like A,B,C
    i want the data from these tables with the help of relation
    select a.simno,b.item_code,c.desc
    from A a,B b,C c
    WHERE a.ms=b.ms and
    b.item_code=c.item_code
    and a.ms=c.ms
    the output for this query which i am getting is
    simno item_code desc
    1 i1 abc
    1 i2 def
    1 i3 xyz
    2 i4 gtr
    2 i5 poi
    but i want the output in this
    simno details
    1 abc#def#xyz
    2 gtr#poi
    and so on
    if it dispayes the output inthis manner i can save as ".csv" file

    Hi,
    There are different Solutions you can achieve
    Refer to Asktom : http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:2196162600402
    SQL> create table test(simno number, itemcode varchar2(5), desc1 char(5))
    Table created.
    SQL> insert into test(simno,itemcode,desc1) values (1 ,'i1' ,'abc');
    1 row created.
    SQL> insert into test(simno,itemcode,desc1) values (1 ,'i2' ,'def') ;
    1 row created.
    SQL> insert into test(simno,itemcode,desc1) values (1 ,'i3' ,'xyz') ;
    1 row created.
    SQL> insert into test(simno,itemcode,desc1) values (2 ,'i4' ,'gtr');
    1 row created.
    SQL> insert into test(simno,itemcode,desc1) values (2 ,'i5' ,'poi');
    1 row created.
    SQL> select simno,wmsys.wm_concat(desc1) CONCAT
      2  from test
      3  group by simno;
         SIMNO
    CONCAT
             1
    abc  ,def  ,xyz
             2
    gtr  ,poi- Pavan Kumar N

  • Pass 2D array from java to PLSQL

    HI,
    My requirement is that I have to pass dynamic parameters to be stored in a table. The table I have is
    CODE || TAG_LABEL         || TAG_COLMN_NAME
    023 || Registration            || CHAR_TAG1
    023 || Agreement Number || NUM_TAG1
    023 || Agency                  || NUM_TAG2
    023 || Start Date              || DATE_TAG1
    this table A. gives me the list of all possible parametes
    CODE || CHAR_TAG1 || CHAR_TAG2 || NUM_TAG1 || NUM_TAG2 .. ..
    023 || 420/09 || -- || 100023 || 1002
    021 || -- || 400030 || -- || --
    023 || 450/10 || -- || 100025 || --
    this table B gives the place where the values for this parameter has to be stored.So for code 023 if I have parameters say Registration='240/10' and start_date = '10/02/2010' then, how do I pass these dynamic paramters to the plsql and from there how do i handle storing this in my final Table B.
    I searched the net for Dynamic sql and I am very basic in PLSQLs. Can anyone please help or atleast if there is a documentation that does exactly this, it would be very helpful.
    Thanks
    Rache

    From the pl/sql side you need to create your object types
    create or replace type sample_array_obj
    as object( firstitem     varchar2(20 char),
                   seconditem varchar2(10 char)
    create or replace
    type sample_array_type  is table of sample_array_objand then you need to grant execute access on both the object and type
    grant execute on sample_array_obj to public;
    grant execute on sample_array_type to public;you have to declare these to java then. (I'm not a java programmer, but the java then has to get its collection type from the database)

  • How to pass username/password to BPEL web service from java proxy?

    Hi all,
    Environment : SOA Suite 11g
    I am using basic http authentication in my SOA services using "oracle/wss_http_token_client_policy" policy. Now i need to invoke these SOA web services from a java proxy.
    Please let me know how this can be done.
    Thanks in advance

    Have you tried the below posts ?
    BPEL to invoke Webservice secured with HTTP Basic authentication
    Invoke a BPEL process using HTTP Basic Authentication
    http://docs.oracle.com/cd/E21764_01/web.1111/e13713/owsm_appendix.htm#CHDBAHBI
    Thanks,
    Vijay

  • How to pass the parameter values to the stored procedure from java code?

    I have a stored procedure written in sqlplus as below:
    create procedure spInsertCategory (propertyid number, category varchar2, create_user varchar2, create_date date) AS BEGIN Insert into property (propertyid, category,create_user,create_date) values (propertyid , category, create_user, create_date); END spInsertCategory;
    I am trying to insert a new row into the database using the stored procedure.
    I have called the above procedure in my java code as below:
    CallableStatement sp = null;
    sp = conn.prepareCall("{call spInsertCategory(?, ?, ?, ?)}");
    How should I pass the values [propertyid, category, create_user, create_date) from java to the stored procedure?[i.e., parameters]
    Kindly guide me as I am new to java..

    Java-Queries wrote:
    I have a stored procedure written in sqlplus as below:FYI. sqlplus is a tool from Oracle that provides a user interface to the database. Although it has its own syntax what you posted is actually PL/SQL.

  • Converting from JAVA HASHMAP to PLSQL object or CLOB

    Hello All,
    My oracle version in 10.2.0.4 on a solaris V880 machine.
    Our Application Java SDK is 1.4.
    I am trying to pass in a series of XML (considerably huge for XML type column) from java application plsql which stores them into an oracle table with column as external BLOB. Since the contents are so heavy for each objects , using XMLTYPE column is not feasible.
    The xml files comes as either java hash_map or string which i have to pass as parameter to an Oracle stored procedure which stores as external BLOB in OS through a table.
    My first doubt is this the correct approach.
    My second doubt here is how to interpret java hash_map object within PLSQL when it is passed to it.
    Apologies if the question is silly since i am a new comer to java.
    Thanks in advance ,
    Vijay G

    vijay S P G wrote:
    If i have plsql collection with a varchar2 and a blob as record type then can i directly pass the java hash map to the procedure having parameter datatype as the above said record type ?Of course not. Obviously the first reason for that is because the "blob" needs to be a file path and not a blob.
    Second reason is no databases that I know of take a hash data type. Some take arrays. But I doubt that is worth the trouble.
    You have a collection of name value (path) pairs. Iterate over the collection and for each name do an insert of the name and path.

  • VARRAY colletion type retirval from java , Wrong data ???? retrieved.

    Hi all,
    I am trying to retirve VARRAY collection type created in oracle from Java. It gives the wrong results as below:
    ********Fetch Starts....********
    ********Row 1 :
    Array is of type MY_UID.STRING_VARRAY
    Array is of length 2
    index 0 = ???
    index 1 = ???
    ********Fetch Ends....********
    Note: I nls_charcterset12.jar, classes12.jar are included in project class path.
    After breaking my head for two decided to request for help from big brains out there.
    For understanding, the code is attached and any help would be appriciated on this regard.
    Advance Thanks,
    Venkat
    The Code:
    import java.sql.*;
    import oracle.sql.*;
    import oracle.jdbc.oracore.Util;
    import oracle.jdbc.*;
    public class VArrayManipulation
    public static void main (String args[])
    throws Exception
    // DriverManager.registerDriver(new oracle.jdbc.OracleDriver());
    // The sample retrieves an varray of type "STRING_VARRAY",
    // materializes the object as an object of type ARRAY.
    // A new ARRAY is then inserted into the database.
    // String url = "<connection url>";
    // Connect to the database
    Connection conn =null;
    // DriverManager.getConnection (url, "<user>" , "<password>");
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    conn = DriverManager.getConnection(
    "jdbc:oracle:thin:@localhost:1521:system", "my_uid","my_password");
    conn.setAutoCommit (false);
    // Create a Statement
    Statement stmt = conn.createStatement ();
    try
    stmt.execute ("DROP TABLE sample_varray_table");
    stmt.execute ("DROP TYPE string_varray");
    catch (SQLException e)
    //Exceptions will be thrown if Table and types doesnt exist . Ignore this
    stmt.execute ("CREATE TYPE string_varray AS VARRAY(10) OF VARCHAR2(100)");
    stmt.execute ("CREATE TABLE sample_varray_table (acol string_varray)");
    //Insert using SQL
    stmt.execute ("INSERT INTO sample_varray_table VALUES (string_varray('Test1', 'Test2'))");
    ResultSet rs = stmt.executeQuery("SELECT acol FROM sample_varray_table");
    printResultSet (rs);
    //Insert using ArrayDescriptor
    // create a new ARRAY object
    String arrayElements[] = { "Test3", "Test4" };
    ArrayDescriptor desc = ArrayDescriptor.createDescriptor
    ("STRING_VARRAY", conn);
    ARRAY newArray = new ARRAY(desc, conn, arrayElements);
    PreparedStatement ps =
    conn.prepareStatement ("insert into sample_varray_table values (?)");
    ((OraclePreparedStatement)ps).setARRAY (1, newArray);
    ps.execute ();
    rs = stmt.executeQuery("SELECT acol FROM sample_varray_table");
    printResultSet (rs);
    // Close all the resources
    rs.close();
    ps.close();
    stmt.close();
    conn.close();
    public static void printResultSet (ResultSet rs)
    throws SQLException
    System.out.println("********Fetch Starts....********");
    int line = 0;
    while (rs.next())
    line++;
    System.out.println("********Row "+line+" : ");
    ARRAY array = ((OracleResultSet)rs).getARRAY (1);
    System.out.println ("Array is of type "+array.getSQLTypeName());
    System.out.println ("Array is of length "+array.length());
    // get Array elements
    String[] values = (String[]) array.getArray();
    for (int i=0; i<values.length; i++)
    System.out.println("index "+i+" = "+values[i] );
    System.out.println("********Fetch Ends....********");
    }

    import java.sql.Array;
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.PreparedStatement;
    import java.sql.ResultSet;
    import java.sql.Statement;
    import oracle.sql.ARRAY;
    import oracle.sql.ArrayDescriptor;
    public class test
        public static void main (String args[]) throws Exception
            DriverManager.registerDriver(new oracle.jdbc.OracleDriver());
            Connection conn = DriverManager.getConnection
                ("jdbc:oracle:thin:@sta00077.us.oracle.com:1521:xe", "scott","tiger");
            Statement stmt = conn.createStatement ();
            try {
                stmt.execute("DROP TABLE varray_table");
                stmt.execute("DROP TYPE string_varray");
            } catch (Exception e) { }
            stmt.execute("CREATE TYPE string_varray AS VARRAY(10) OF VARCHAR2(10)");
            stmt.execute("CREATE TABLE varray_table (sv string_varray)");
            stmt.execute("INSERT INTO varray_table VALUES (string_varray('Test1', 'Test2'))");
            ResultSet rs = stmt.executeQuery("SELECT sv FROM varray_table");
            printResultSet(rs);
            String arrayElements[] = { "Test3", "Test4", "Test5" };
            ArrayDescriptor desc = ArrayDescriptor.createDescriptor("STRING_VARRAY", conn);
            ARRAY newArray = new ARRAY(desc, conn, arrayElements);
            PreparedStatement ps = conn.prepareStatement("INSERT INTO varray_table VALUES (?)");
            ps.setArray(1, (Array)newArray);
            ps.execute();
            rs = stmt.executeQuery("SELECT sv FROM varray_table");
            printResultSet(rs);
            rs.close();
            ps.close();
            stmt.close();
            conn.close();
        public static void printResultSet (ResultSet rs) throws Exception
            System.out.println("******** Fetch Starts ********");
            int line = 0;
            while (rs.next()) {
                line++;
                System.out.println("*** Row " + line + " ***");
                Array array = rs.getArray(1);
                String[] values = (String[])array.getArray();
                System.out.println ("Array is of type " + array.getBaseTypeName());
                System.out.println ("Array is of length " + values.length);
                for (int i = 0; i < values.length; i++)
                    System.out.println("Index " + i + " = " + values);
    System.out.println("******** Fetch Ends ********");

  • Append Data from Java Web Dynpro to an Internal Table in ECC

    Hi,
    Currently I am using AdaptiveRFCModels to creating/updating records from Java Web Dynbpro to FM in R/3. Users can add few records before they save the changes. The current design is Java Web Dynpro call RFC FM when user add/edit one record. The record will store in an global internal table in the Function Group. For example, I have added 3 records before I save the changes. It means that global internal table should have 3 records that I added before I save it. But in fact, the global internal table only store one record while I adding the third record. The global internal table not able to keep the previous records. The code below is how I code to execute the FM from Java Webdynpro. Is the code can work as I expected? Anything missing in the codes? Please advice. Thanks.
    wdContext.nodeZhr_abc_Input().bind((Zhr_abc_Input) model.createModelObject(Zhr_abc_Input.class));
    Zhr_abc_Input objReq = new Zhr_abc_Input();
    Zhr_Pad31 insUpdVer = new Zhr_Pad31();
    insUpdVer.setQ_Id(wdContext.currentContextElement().getQ_Id());
    insUpdVer.setZ_ce(wdContext.currentZhr_Detail_OutputElement().getZ_ce());
    objReq.addLt_Pad88(insUpdVer);
    wdContext.nodeZhr_abc_Input().bind(objReq);
    wdContext.currentZhr_abc_InputElement().modelObject().execute();

    According to your code you are setting only one record.
    You have to create 3 elements for each record and add all the three to the nodeZhr_abc_Input node.
    If I understand correctly, node currentZhr_Detail_Output is the one which is containing all the three records. Loop through this node, pick each record and set to the input node.
    wdContext.nodeZhr_abc_Input().bind((Zhr_abc_Input) model.createModelObject(Zhr_abc_Input.class));
    for(int i=0;i<wdContext.nodeZhr_Detail_Output().size();i++)
    Zhr_abc_Input objReq = new Zhr_abc_Input();
    Zhr_Pad31 insUpdVer = new Zhr_Pad31();
    insUpdVer.setQ_Id(wdContext.currentContextElement().getQ_Id());
    insUpdVer.setZ_ce(wdContext.nodeZhr_Detail_Output().getElementAt(i).getZ_ce());
    objReq.addLt_Pad88(insUpdVer);
    wdContext.nodeZhr_abc_Input().addElement(objReq); // Changed from bind to addElement
    }//for end
    wdContext.currentZhr_abc_InputElement().modelObject().execute();
    Note: I just typed the code. Syntax might be wrong here and there. Please correct it while coding.
    Regards,
    Jaya.

  • Command line args from java to C++

    Hi
    I want to pass command line arguemnts argc and argv from java to C++. I have browsed the net and most of them suggested that I declare the jni statement with jObjectarray.
    I saw an example at http://www.csc.calpoly.edu/~fouzi/crossroads/Arguments.c
    It said
    #include "/home/java/linux/jdk118/include/jni.h"
    #include "Arguments.h"
    #include <stdio.h>
    JNIEXPORT void JNICALL
    Java_Arguments_setArgs (JNIEnv *jenv, jobject job, jobjectArray oarr)
    /* obtain the size the the array with a call to the JNI function
    GetArrayLength()                              */
    jsize argc = (*jenv)->GetArrayLength(jenv, oarr);
    /* Declare a char array for argv */
    char const* argv[128];
    int i;
    for (i = 1; i < argc + 1; i++) {
    /* obtain the current object from the object array */
    jobject myObject = (*jenv)->GetObjectArrayElement(jenv, oarr, i-1);
    /* Convert the object just obtained into a String */
    const char str = (jenv)->GetStringUTFChars(jenv,myObject,0);
    /* Build the argv array */
    argv[i] = str;
    /* print the argv array to the screen */
    printf ("argv[%i] = %s\n",i,argv);
    /* Free up memory to prevent memory leaks */
    (*jenv)->ReleaseStringUTFChars(jenv, myObject, str);
    // Increment argc to ajust the difference between Java and C arguments
    argc++;
    // Call a pipeline simulator function which uses command line arguments
    start(argc,argv);
    return;
    That is what I have where the start method is declared like this:
    void start(int argc, /* Argument count */ char argv[] / Argument strings */) {
    But I get a warning when I build the C routine. The warning arises when I am calling the start method.
    The warning says:
    f:\jni\dsaccess.c(711) : warning C4090: 'function' : different 'const' qualifiers
    f:\jni\dsaccess.c(711) : warning C4024: 'start' : different types for formal and actual parameter 2
    Can you help?
    Thanks
    Lakshmi

    1. Your array building looks bogus: Are you missing an index?
    2. You claim to be calling a "method". Are you? Or is it a subroutine?

  • How to create a one-column collection from another multi-column collection?

    Hi,
    I am describing a SQL statement to get it's column list:DECLARE
      cur     NUMBER;
      col_cnt INTEGER;
      rec_tab DBMS_SQL.DESC_TAB;
      type my_colls_t  is table of varchar2(30);
      my_colls    my_colls_t;
    BEGIN
      cur := DBMS_SQL.OPEN_CURSOR;
      DBMS_SQL.PARSE(cur, 'SELECT * FROM my_view' , DBMS_SQL.NATIVE);
      DBMS_SQL.DESCRIBE_COLUMNS(cur, col_cnt, rec_tab);
    END;Now I need to get out the columns list from rec_tab.col_name and put it to my_colls collection. Have Oracle any build-in to do that? If not, what is the best way to do this?
    Thanks in advance,
    JackK

    JackK wrote:
    Hi,
    I am describing a SQL statement to get it's column list:DECLARE
    cur     NUMBER;
    col_cnt INTEGER;
    rec_tab DBMS_SQL.DESC_TAB;
    type my_colls_t  is table of varchar2(30);
    my_colls    my_colls_t;
    BEGIN
    cur := DBMS_SQL.OPEN_CURSOR;
    DBMS_SQL.PARSE(cur, 'SELECT * FROM my_view' , DBMS_SQL.NATIVE);
    DBMS_SQL.DESCRIBE_COLUMNS(cur, col_cnt, rec_tab);
    END;Now I need to get out the columns list from rec_tab.col_name and put it to my_colls collection. Have Oracle any build-in to do that? If not, what is the best way to do this?
    Thanks in advance,
    JackKYou can't do something like
    my_cols := rec_tab.column_name;You need to loop throught the collection and assign each element. Like this.
    for i in 1.. rec_tbl.count
    loop
      my_cols(i) := rec_tbl(i).column_name;
    end loop;

  • [Forum FAQ] How to configure a Data Driven Subscription which get multi-value parameters from one column of a database table?

    Introduction
    In SQL Server Reporting Services, we can define a mapping between the fields that are returned in the query to specific delivery options and to report parameters in a data-driven subscription.
    For a report with a parameter (such as YEAR) that allow multiple values, when creating a data-driven subscription, how can we pass a record like below to show correct data (data for year 2012, 2013 and 2014).
    EmailAddress                             Parameter                      
    Comment
    [email protected]              2012,2013,2014               NULL
    In this article, I will demonstrate how to configure a Data Driven Subscription which get multi-value parameters from one column of a database table
    Workaround
    Generally, if we pass the “Parameter” column to report directly in the step 5 when creating data-driven subscription.
    The value “2012,2013,2014” will be regarded as a single value, Reporting Services will use “2012,2013,2014” to filter data. However, there are no any records that YEAR filed equal to “2012,2013,2014”, and we will get an error when the subscription executed
    on the log. (C:\Program Files\Microsoft SQL Server\MSRS10_50.MSSQLSERVER\Reporting Services\LogFiles)
    Microsoft.ReportingServices.Diagnostics.Utilities.InvalidReportParameterException: Default value or value provided for the report parameter 'Name' is not a valid value.
    This means that there is no such a value on parameter’s available value list, this is an invalid parameter value. If we change the parameter records like below.
    EmailAddress                        Parameter             Comment
    [email protected]         2012                     NULL
    [email protected]         2013                     NULL
    [email protected]         2014                     NULL
    In this case, Reporting Services will generate 3 reports for one data-driven subscription. Each report for only one year which cannot fit the requirement obviously.
    Currently, there is no a solution to solve this issue. The workaround for it is that create two report, one is used for view report for end users, another one is used for create data-driven subscription.
    On the report that used create data-driven subscription, uncheck “Allow multiple values” option for the parameter, do not specify and available values and default values for this parameter. Then change the Filter
    From
    Expression:[ParameterName]
    Operator   :In
    Value         :[@ParameterName]
    To
    Expression:[ParameterName]
    Operator   :In
    Value         :Split(Parameters!ParameterName.Value,",")
    In this case, we can specify a value like "2012,2013,2014" from database to the data-driven subscription.
    Applies to
    Microsoft SQL Server 2005
    Microsoft SQL Server 2008
    Microsoft SQL Server 2008 R2
    Microsoft SQL Server 2012
    Please click to vote if the post helps you. This can be beneficial to other community members reading the thread.

    For every Auftrag, there are multiple Position entries.
    Rest of the blocks don't seems to have any relation.
    So you can check this code to see how internal table lt_str is built whose first 3 fields have data contained in Auftrag, and next 3 fields have Position data. The structure is flat, assuming that every Position record is related to preceding Auftrag.
    Try out this snippet.
    DATA lt_data TYPE TABLE OF string.
    DATA lv_data TYPE string.
    CALL METHOD cl_gui_frontend_services=>gui_upload
      EXPORTING
        filename = 'C:\temp\test.txt'
      CHANGING
        data_tab = lt_data
      EXCEPTIONS
        OTHERS   = 19.
    CHECK sy-subrc EQ 0.
    TYPES:
    BEGIN OF ty_str,
      a1 TYPE string,
      a2 TYPE string,
      a3 TYPE string,
      p1 TYPE string,
      p2 TYPE string,
      p3 TYPE string,
    END OF ty_str.
    DATA: lt_str TYPE TABLE OF ty_str,
          ls_str TYPE ty_str,
          lv_block TYPE string,
          lv_flag TYPE boolean.
    LOOP AT lt_data INTO lv_data.
      CASE lv_data.
        WHEN '[Version]' OR '[StdSatz]' OR '[Arbeitstag]' OR '[Pecunia]'
             OR '[Mita]' OR '[Kunde]' OR '[Auftrag]' OR '[Position]'.
          lv_block = lv_data.
          lv_flag = abap_false.
        WHEN OTHERS.
          lv_flag = abap_true.
      ENDCASE.
      CHECK lv_flag EQ abap_true.
      CASE lv_block.
        WHEN '[Auftrag]'.
          SPLIT lv_data AT ';' INTO ls_str-a1 ls_str-a2 ls_str-a3.
        WHEN '[Position]'.
          SPLIT lv_data AT ';' INTO ls_str-p1 ls_str-p2 ls_str-p3.
          APPEND ls_str TO lt_str.
      ENDCASE.
    ENDLOOP.

  • How to move multi select rows(records)from one datagrid to another datagrid completelly in flex4

    hi friends,
    I  am doing mxml flex 4 wep application i am using 2 forms, each form i am using datagrid,i am struck in this place,
    my proplem is, in first form i am having a grid with 10rows and columns,i am having 10 records and one move button. Next form also having a datagrid,
    need:
    IF i am doing multi select(2records) from the first datagrid and click move button means that records will show in the second datagrid and will also delete
    from the first data grid again it wont show the records in same datagrid.
    how to do this?
    any useful suggession or snippet code.
    thanks in advance,
    Cheers,
    B.venkatesan.

    One solution could be:
    Source to data grid is an Array collection
    1.> In first data grid extraxct the rows using, grid.selecteditem
    2.>Add it to the arraycollection attached to next grid, use arraycollection addItemat api if rows needed to ve added at particular index
    3.>Use removeitemat api to remove the items from arraycollection attached to first datagrid
    4.>call invalidate on bothe of the datagrids

Maybe you are looking for

  • Date&Time takes a long time to load

    Hi I'm getting really frustrated, becasue everytime I want to look at the calander in the date and time utility, I try and open it and it takes AGES to open. Please help, what can I do to fix this???

  • Lightroom 5.2 problem

    in the left panel of lightroom, the catalog section has dissapeared how can I get it back and not lose any photos?

  • How to display " %some string% " in JSP

    In the following code the value of Parameter "greeting" is "<%some string%>" How do I escape it so that I can print it as it is. out.println("Greeting: " + request.getParameter("greeting")); thanks in advance. -a.

  • Why does it say when i try to buy a app it says wrong payment method

    why does it say when i try to buy a app it says wrong payment method

  • How to Get Notified When Someone Replies - Video

    You may not be able to visit the Forum every day, to check if your post has been answered or not. There are two ways to follow conversations in the community. a. The first way is to while posting on the forum: While you are making a post, there is a