Urgent--error in populating data in segments of Idoc-DELVRY03

Hi experts,
I am populating data in segments of DELVRY03 where I am using process code DELV with Message Type SHPORD.
For this I am using EXIT_SAPLV56K_002.
As I have to populate many segments I am giving case statement. But IDOC_DATA-SEGNAM is empty.
Please help me with this issue as I am running out of time.
Waiting for replies.
Thanks

Hi,
Loop at IDOC_DATA.
thanks

Similar Messages

  • Error while populating data

    hi,
    Here i am giving the DDLs and Inserts of Database .i am getting error while fetching data into outlist.
    and the error is err_msg = ORA-00932: inconsistent datatypes: expected - got -
    I also posted the same one in my previous post but i did not got any satisfactory answer .Please help me out .It's urgent ..
    CREATE TABLE ip_lov_hdr
    (table_id VARCHAR2(50) NOT NULL,
    table_name VARCHAR2(30) NOT NULL,
    col_name VARCHAR2(30) NOT NULL,
    codetype VARCHAR2(2))
    PCTFREE 10
    INITRANS 1
    MAXTRANS 255
    ALTER TABLE ip_lov_hdr
    ADD CONSTRAINT pk_lov_hdr PRIMARY KEY (table_id)
    USING INDEX
    PCTFREE 10
    INITRANS 2
    MAXTRANS 255
    CREATE TABLE ip_lov_dtl
    (table_id VARCHAR2(50) NOT NULL,
    col_name VARCHAR2(30) NOT NULL)
    PCTFREE 10
    INITRANS 1
    MAXTRANS 255
    ALTER TABLE ip_lov_dtl
    ADD CONSTRAINT pk_lov_dtl PRIMARY KEY (table_id, col_name)
    USING INDEX
    PCTFREE 10
    INITRANS 2
    MAXTRANS 255
    ALTER TABLE ip_lov_dtl
    ADD CONSTRAINT fk_lov_hdr FOREIGN KEY (table_id)
    REFERENCES ip_lov_hdr (table_id) ON DELETE SET NULL
    CREATE TABLE emp
    (ename VARCHAR2(50),
    empno VARCHAR2(9),
    dept VARCHAR2(4))
    PCTFREE 10
    INITRANS 1
    MAXTRANS 255
    CREATE OR REPLACE
    TYPE out_rec_lov AS OBJECT(ename VARCHAR2(50),empno VARCHAR2(9))
    INSERT INTO emp
    (ENAME,EMPNO,DEPT)
    VALUES
    ('titu','111','10')
    INSERT INTO emp
    (ENAME,EMPNO,DEPT)
    VALUES
    ('naria','222',NULL)
    INSERT INTO emp
    (ENAME,EMPNO,DEPT)
    VALUES
    ('tiks','123','55')
    INSERT INTO emp
    (ENAME,EMPNO,DEPT)
    VALUES
    ('tiki','221',NULL)
    INSERT INTO emp
    (ENAME,EMPNO,DEPT)
    VALUES
    ('narayan',NULL,NULL)
    INSERT INTO ip_lov_hdr
    (TABLE_ID,TABLE_NAME,COL_NAME,CODETYPE)
    VALUES
    ('emp_id','emp','ename',NULL)
    INSERT INTO ip_lov_dtl
    (TABLE_ID,COL_NAME)
    VALUES
    ('emp_id','empno')
    create or replace PACKAGE PKG_LOV_1
    AS
    TYPE listtable IS TABLE OF out_rec_lov INDEX BY BINARY_INTEGER;
    PROCEDURE p_getlov (
    tab_id IN VARCHAR2,
    col_value IN VARCHAR2,
    OUTLIST OUT LISTTABLE,
    err_msg OUT VARCHAR2);
    END;
    create or replace PACKAGE BODY PKG_LOV_1 AS
    PROCEDURE p_getlov( tab_id IN VARCHAR2,
    col_value IN VARCHAR2,
    outlist OUT listtable,
    err_msg OUT VARCHAR2)
    IS
    query_str VARCHAR2(2000);
    col_str VARCHAR2(2000);
    type cur_typ IS ref CURSOR;
    c cur_typ;
    i NUMBER := 0;
    l_table_name ip_lov_hdr.TABLE_NAME %TYPE;
    l_col_name ip_lov_hdr.col_name%TYPE;
    l_codetype ip_lov_hdr.codetype%TYPE;
    BEGIN
    BEGIN
    SELECT TABLE_NAME,
    codetype,
    col_name
    INTO l_table_name,
    l_codetype,
    l_col_name
    FROM ip_lov_hdr
    WHERE UPPER(table_id) = UPPER(tab_id);
    EXCEPTION
    WHEN no_data_found THEN
    NULL;
    END;
    col_str := l_col_name;
    FOR rec IN
    (SELECT col_name
    FROM ip_lov_dtl
    WHERE table_id = tab_id)
    LOOP
    col_str := col_str || ',' || rec.col_name;
    END LOOP;
    DBMS_OUTPUT.PUT_LINE (col_str);
    IF l_codetype IS NULL THEN
    query_str := 'SELECT ' || col_str || ' FROM ' || l_table_name || ' WHERE ' || l_col_name || ' like :col_value';
    ELSE
    query_str := 'SELECT ' || col_str || ' FROM ' || l_table_name || ' WHERE Codetype =' || l_codetype || ' And ' || l_col_name || ' like :col_value';
    END IF;
    DBMS_OUTPUT.PUT_LINE(QUERY_STR);
    BEGIN
    OPEN c FOR query_str USING col_value;
    LOOP
    FETCH c INTO outlist(i);
    i := i + 1;
    EXIT WHEN c % NOTFOUND;
    END LOOP;
    CLOSE c;
    EXCEPTION
    WHEN others THEN
    err_msg := SUBSTR(sqlerrm, 1, 500);
    END;
    EXCEPTION
    WHEN others THEN
    err_msg := SUBSTR(sqlerrm, 1, 500);
    END p_getlov;
    END PKG_LOV_1;
    Regards,
    Dhabas
    Edited by: Dhabas on Dec 29, 2008 12:58 PM
    Edited by: Dhabas on Dec 29, 2008 2:43 PM
    Edited by: Dhabas on Dec 29, 2008 2:54 PM

    I made one more small change. This code
    15             i number := 0;I modified as
    15             i number := 1;And It works fine for me
    SQL> create table ip_lov_hdr
      2  (
      3     table_id varchar2(50) not null,
      4     table_name varchar2(30) not null,
      5     col_name varchar2(30) not null,
      6     codetype varchar2(2)
      7  )
      8  /
    Table created.
    SQL> alter table ip_lov_hdr add constraint pk_lov_hdr primary key (table_id) using index
      2  /
    Table altered.
    SQL> create table ip_lov_dtl
      2  (
      3     table_id varchar2(50) not null,
      4     col_name varchar2(30) not null
      5  )
      6  /
    Table created.
    SQL> alter table ip_lov_dtl add constraint pk_lov_dtl primary key (table_id, col_name) using index
      2  /
    Table altered.
    SQL> alter table ip_lov_dtl add constraint fk_lov_hdr foreign key (table_id) references ip_lov_hdr (table_id) on delete set null
      2  /
    Table altered.
    SQL> create table emp1
      2  (
      3     ename varchar2(50),
      4     emp1no varchar2(9),
      5     dept varchar2(4)
      6  )
      7  /
    Table created.
    SQL> create or replace type out_rec_lov as object(ename varchar2(50),emp1no varchar2(9))
      2  /
    Type created.
    SQL> insert into emp1
      2     (ename,emp1no,dept)
      3  values
      4     ('titu','111','10')
      5  /
    1 row created.
    SQL> insert into emp1
      2     (ename,emp1no,dept)
      3  values
      4     ('naria','222',null)
      5  /
    1 row created.
    SQL> insert into emp1
      2     (ename,emp1no,dept)
      3  values
      4     ('tiks','123','55')
      5  /
    1 row created.
    SQL> insert into emp1
      2     (ename,emp1no,dept)
      3  values
      4     ('tiki','221',null)
      5  /
    1 row created.
    SQL> insert into emp1
      2     (ename,emp1no,dept)
      3  values
      4     ('narayan',null,null)
      5  /
    1 row created.
    SQL> insert into ip_lov_hdr
      2     (table_id,table_name,col_name,codetype)
      3  values
      4     ('emp1_id','emp1','ename',null)
      5  /
    1 row created.
    SQL> insert into ip_lov_dtl
      2     (table_id,col_name)
      3  values
      4     ('emp1_id','emp1no')
      5  /
    1 row created.
    SQL> commit
      2  /
    Commit complete.
    SQL> create or replace package pkg_lov_1
      2  as
      3     type listtable is table of out_rec_lov index by binary_integer;
      4
      5     procedure p_getlov
      6                     (
      7                             tab_id in varchar2,
      8                             col_value in varchar2,
      9                             outlist out listtable,
    10                             err_msg out varchar2
    11                     );
    12  end;
    13  /
    Package created.
    SQL> create or replace package body pkg_lov_1
      2  as
      3     procedure p_getlov
      4                     (
      5                             tab_id in varchar2,
      6                             col_value in varchar2,
      7                             outlist out listtable,
      8                             err_msg out varchar2
      9                     )
    10     is
    11             query_str varchar2(2000);
    12             col_str varchar2(2000);
    13             type cur_typ is ref cursor;
    14             c cur_typ;
    15             i number := 1;
    16             l_table_name ip_lov_hdr.table_name %type;
    17             l_col_name ip_lov_hdr.col_name%type;
    18             l_codetype ip_lov_hdr.codetype%type;
    19     begin
    20             begin
    21                      select table_name,
    22                             codetype,
    23                             col_name
    24                        into l_table_name,
    25                             l_codetype,
    26                             l_col_name
    27                        from ip_lov_hdr
    28                       where upper(table_id) = upper(tab_id);
    29
    30             exception
    31                     when no_data_found then
    32                             null;
    33             end;
    34
    35             col_str := l_col_name;
    36
    37             for rec in (select col_name
    38                           from ip_lov_dtl
    39                          where table_id = tab_id)
    40             loop
    41                     col_str := col_str || ',' || rec.col_name;
    42             end loop;
    43
    44             dbms_output.put_line (col_str);
    45
    46             if l_codetype is null
    47             then
    48                     query_str := 'select out_rec_lov(' || col_str || ') from ' || l_table_name || ' where ' || l_col_name || ' like :col_value';
    49             else
    50                     query_str := 'select out_rec_lov(' || col_str || ') from ' || l_table_name || ' where codetype =' || l_codetype || ' and ' || l_col_name || ' like :col_value';
    51             end if;
    52
    53             dbms_output.put_line(query_str);
    54
    55             begin
    56                     open c for query_str using col_value;
    57
    58                     loop
    59                             fetch c into outlist(i);
    60                             i := i + 1;
    61                             exit when c % notfound;
    62                     end loop;
    63
    64                     close c;
    65             exception
    66                     when others then
    67                             err_msg := substr(sqlerrm, 1, 500);
    68             end;
    69
    70     exception
    71             when others then
    72                     err_msg := substr(sqlerrm, 1, 500);
    73
    74     end p_getlov;
    75  end pkg_lov_1;
    76  /
    Package body created.
    SQL> declare
      2     outlist pkg_lov_1.listtable;
      3     err_msg varchar2(1000);
      4  begin
      5     pkg_lov_1.p_getlov('emp1_id', 'titu', outlist, err_msg);
      6     for i in 1..outlist.count
      7     loop
      8             dbms_output.put_line(outlist(i).ename ||','||outlist(i).emp1no);
      9     end loop;
    10
    11     dbms_output.put_line(err_msg);
    12  end;
    13  /
    ename,emp1no
    select out_rec_lov(ename,emp1no) from emp1 where ename like :col_value
    titu,111
    PL/SQL procedure successfully completed.
    SQL>

  • URGENT : Error: Please create data processing function module

    Hi
    I am getting the folloiwng error
    "Please create data processing function module" in table maintainence.
    It is working fine in dev environment but not in QA and production.
    Pleae help.
    Regards
    Kalpesh

    Hi Kalpesh,
       I see it is something to do with the naming convention used in the quality and production system. These must have been setup differently compared to ur development system. So check with different naming conventions.
    Reward points if helpful.
    Cheers
    Shafiq

  • Urgent: Error while displaying data in OBIEE answers

    Hi,
    I'm facing an issue in OBIEE answers when trying to display values from my fact table. It is displaying something like invalid column identifier in oci call stmt execute...
    I have three dimensions and that particular column is in three dimensional tables and i changed the names and placed in fact table.
    when i'm trying to view data in physical layer it is displaying data.
    why i'm facing this error.. How can I resolve this??
    Its very urgent requirement and any help will be appreciable..
    Regards,
    Sindhu

    Hi,
    I changed the column names in BMM only. Not in physical layer. In physical layer i'm able to view data.
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 17001] Oracle Error code: 904, message: ORA-00904: "T95877"."OBSERVATION_DATETIME": invalid identifier at OCI call OCIStmtExecute. [nQSError: 17010] SQL statement preparation failed. (HY000)
    SQL Issued: SELECT "FACT - RISK SLOT Overtime"."In Gas Price Value ID" saw_0 FROM "AO Risk" ORDER BY saw_0
    I'm getting this error...
    Regards,
    Sindhu

  • Urgent: Error in uploading data in cube after adding new Key figure

    Hi Guys,
    I have added 1 key figure (DEC) to my existing cube. and proceeded as below:
    1. Deleted all data from cube
    2. activated the cube
    3. set Constant 1 for this key figure
    4. activated the transformation
    5. reated a new DTP
    But when i execute it, it gives me error. in updating to infocube ZSDBILL:
    Error while updating to target  ZSDBILL
    Process Terminated.
    all other steps in DTP are succesful like: extraction, error handling and transformation.
    There is no details in long text of these errors.
    Can anyone suggest whats the error stands for or what i am missing.

    Once logout and login back then again activate cube,transformation and run the DTP.
    Hope it helps you

  • Urgent : Error while loading data from PSA to DSO

    Hi,
    I am working on 7.0.
    When i look for data into PSA then i have 1 date field which is containing data in proper date format. This date field is mapped with 0CALMONTH & 0CALYEAR for which i have written routine and directly assigned to 0DOC_DATE .
    I have written a start routine to do some modifications in SOURCE_PACKAGE.
    But When i am loading data from PSA to DSO its giving below error:
    " Exception wrong_date ; see long text RSTRAN 303
    Diagnosis
    An exception wrong_date was raised while executing function module
    RST_TOBJ_TO_DERIVED_TOBJ .
    System Response
    Processing the corresponding record has been terminated.
    Procedure
    To analyze the cause, set a break point in the program of the
    transformation at the call point of function module
    RST_TOBJ_TO_DERIVED_TOBJ . Simulate the data transfer process to
    investigate the cause. "
    I am not getting why this error is coming up
    pls guide me !!

    you can map the code to DOC_DATE .
    The code is used to read from any date and convert that into Fiscal year/period.
    Try this code.
    data: l_fiscyear type t009b-bdatj.
    call function 'FISCPER_FROM_CALMONTH_CALC'
    exporting
    id_date = COMM_STRUCTURE-doc_date
    iv_periv = 'V9'
    importing
    ev_fiscyear = l_fiscyear.
    result value of the routine
    RESULT = l_fiscyear.

  • Error in populating data

    Hi,
    I am taking the data from a file which is available on application server. During reading of file I am storing the data into an internal table. But the problem is,  System is taking the data with '#' while passing the data to internal table. Means it is not treating # as a next column. For example if the table line's (file) contains "3#78#N456#78945#" data system is passing it to internal table in the following format (itab-field1 = '3', itab-field2 = '#78' itab-fld3 = '#N456' and so on..
    Pls suggest me how to handle it. I am using the following code for updating the table.
    data : begin of t_itab occurs 0,
           fld1(1),
           fld2(3),
           fld3(4),
           fld4(5),
           fld50(5),
           end of t_itab.
    OPEN DATASET V_FILE IN TEXT MODE encoding DEFAULT .
      IF SY-SUBRC = 0.
        DO.
          READ DATASET V_FILE INTO t_itab.
          IF SY-SUBRC <> 0.
            EXIT.
          ENDIF.
          APPEND T_ITAB.
          CLEAR  T_ITAB.
        ENDDO.
      ELSE.
        WRITE: / 'Error in open file'.
      ENDIF.
      CLOSE DATASET v_file.
    Note : We do't know how many fields are available in the txt file on application server.. so we are assuming that file can contains upto 50 fields that's why I have declared 50 fields in internal table.
    pls suggest something.
    Thanks,

    I believe that the # is the tab in your file.  You will need to split the line at the tab by using the cl_abap_char_utilities=>horizontal_tab.
    data: str type string.
    READ DATASET V_FILE INTO str.
    split str at l_abap_char_utilities=>horizontal_tab into t_tab-fld1
    t_tab-fld2
    t_tab-fld3
    t_tab-fld4
    t_tab-fld5
    t_tab-fld6
    t_tab-fld7
    t_tab-fld8
    You can also use the <b>SPLIT into table itab</b>And fill in the fields using some creative programming.
    Regards,
    Rich Heilman

  • Error during populating data in combobox

    Hi,
    I am getting the ArrayCollection through RemoteObject call
    and I am trying to populate that into the combobox. But I am
    getting the following error popping up in the browser.
    Error: Unknown Property: '-1'.
    at mx.collections::ListCollectionView/
    http://www.adobe.com/2006/actionscript/flash/proxy::getProperty()
    at SearchReports/getReportCodeAndNameData()
    at SearchReports/populateDocumentList()
    at SearchReports/__ReportsDelegate5_result()
    at
    flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at mx.rpc::AbstractService/dispatchEvent()
    at mx.rpc.remoting.mxml::RemoteObject/dispatchEvent()
    at mx.rpc::AbstractOperation/
    http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent()
    at mx.rpc::AbstractInvoker/
    http://www.adobe.com/2006/flex/mx/internal::resultHandler()
    at mx.rpc::Responder/result()
    at mx.rpc::AsyncRequest/acknowledge()
    at
    ::NetConnectionMessageResponder/NetConnectionChannel.as$37:NetConnectionMessageResponder: :resultHandler()
    at mx.messaging::MessageResponder/result()
    Can anybody let me know what could be the reason?
    Regards,
    -Sameer

    Fixed the problem. Please ignore.
    -Sameer
    quote:
    Originally posted by:
    sam_the_best
    Hi,
    I am getting the ArrayCollection through RemoteObject call
    and I am trying to populate that into the combobox. But I am
    getting the following error popping up in the browser.
    Error: Unknown Property: '-1'.
    at mx.collections::ListCollectionView/
    http://www.adobe.com/2006/actionscript/flash/proxy::getProperty()
    at SearchReports/getReportCodeAndNameData()
    at SearchReports/populateDocumentList()
    at SearchReports/__ReportsDelegate5_result()
    at
    flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at mx.rpc::AbstractService/dispatchEvent()
    at mx.rpc.remoting.mxml::RemoteObject/dispatchEvent()
    at mx.rpc::AbstractOperation/
    http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent()
    at mx.rpc::AbstractInvoker/
    http://www.adobe.com/2006/flex/mx/internal::resultHandler()
    at mx.rpc::Responder/result()
    at mx.rpc::AsyncRequest/acknowledge()
    at
    ::NetConnectionMessageResponder/NetConnectionChannel.as$37:NetConnectionMessageResponder: :resultHandler()
    at mx.messaging::MessageResponder/result()
    Can anybody let me know what could be the reason?
    Regards,
    -Sameer

  • How to isolate error with a record/segment in IDOC with multiple records

    I have an IDOC with multiple records/segments (typically 1000 records/segments). Sometime XI can not process the IDOC because of some control characters in data.
    1. How can I pre-processed the IDOC to remove those control characters?
    Can I use XPATH expression/Java class to do it? How can I configure the XPATH expression/Java class in XI to pre-process the file?
    2. Until I have answer to 1st question. I would like to find out the error is exactly for which record? What configuration can I do in XI to isolate the error is with which record/segment in IDOC?
    Thanks in advance.

    Split the IDoc.
    with in the UDF, after the validations if every thing fine, pass as successful records to success_MT and pass it to target system using Branching in BPM.
    if errors found in the record, then store the error records in Hash table with in UDF, get the IDoc number, frame as a string and raise alert.
    U have to do this in the context of IDoc.
    If U wanna get the IDoc Number, Segment Name and field name for every failure, U can pass the expected error field name as constant to UDF, frame the sentence in the UDF like -> <b>IDoc 1234321 segment – SEG001 – field – FLD03 has a special character ‘*’</b>.
    If U wanna pass this string to source/target, U can do in error messages branch in BPM.
    U must use BPM for splitting the IDoc, since it is multi-mapping.
    reg.,
    Yallabandi.

  • Error while loading data from PSA to Infoobject through DTP(URGENT)

    Hi-
    I am running into an issue while loading the data from PSA to Infoobject.
    It says
    Data Package 1 : error during processing.
    Updating Attributes for Infoobject
    Error in substep
    Process Terminated
    Please let me know ur solution as this is very urgent....

    Data Package 1 : error during processing.
    This is the error when your flat file is opened at the time of scheduling. Pls close your flat file, will upload correctly.
    Let me know if you have any further query.

  • Missing data: Profitability segment no. in Sale order creation

    Hi Gurus,
    while creating a Sales order, I am getting the Below Error;
    "Error while the Operating Concern being determined"
    Massage no: KE/AD817
    Error: Missing data: Profitability segment no.
    Its Urgent..
    Can anybody suggest....
    Thanks
    BKT

    Hi Bani,
    Please check if note 380102 helps in this case. From the long text of the error message you can find out which charachteristic is responsible for the error message.
    Regards,
    Abhisek

  • 'Error while signing data-Private key or certificate of signer not availabl

    Hello All,
    In my message mapping I need to call a web service to which I need to send a field value consist of SIGNED DATA.
    I am using SAP SSF API to read the certificate stored in NWA and Signing the Data as explained in
    http://help.sap.com/saphelp_nw04/helpdata/en/a4/d0201854fb6a4cb9545892b49d4851/frameset.htm,
    when I have tested using Test tab of message mapping  it is working fine and I am able to access the certificate Keystore of NWA(we have created a keystore view and keystore entry to store the certificate) and generate the signed data ,but when I test end to end scenario from ECC system,it is getting failed in mapping with the error
    ' Error while signing data - Private key or certificate of signer not availableu2019.
    Appreciate your expert help to resolve this issue urgently please.
    Regards,
    Shivkumar

    Hi Shivkuar,
    Could you please let me know how you were trying to achieve the XML signature.
    We have a requirement where we have to sign the XML document and need to generate the target document as following structure.
    <Signature>
         <SignedInfo>
             <CanonicalizationMethod />
             <SignatureMethod />
             <Reference>
                     <Transforms>
                     <DigestMethod>
                     <DigestValue>
             </Reference>
        <Reference /> etc.
      </SignedInfo>
      <SignatureValue />
      <KeyInfo />
      <Object>ACTUAL PAYLOAD</Object>
    </Signature>
    I am analyzing the possibility of using the approach that is given in the help sap link that you have posted above. Any inputs will be apprecited.
    Thanks and Regards,
    Sami.

  • Error while creating the rollback segment (Oracle 8i & OS Win NT)

    hi
    I am using Oracle 8i and when i am creating the new rollback segment for my database i have got following error message
    ORA-01593 Rollback segment optimal size (30 blks) is smaller than the computed initial size (2560 blks)
    CREATE ROLLBACK SEGMENT "RBS11" TABLESPACE "RBS1"
    STORAGE ( INITIAL 120K NEXT
    120K OPTIMAL
    240K MINEXTENTS 2
    MAXEXTENTS 100)
    Note:- db_block size is 8k
    Tablespace RBS1 is the Locally managed Tablespace having datafile of 50m and uniform size of 10m
    But Given statement processed while i am using Tablespace RBS (winch is data dictionary managed)
    Plz, suggest me to cause of that error and solution

    You said 120K optimal and initial is 120K with minextents of 2. The optimal size then will be smaller than the initial allocation for the rbs.
    ORA-01593: rollback segment optimal size (string blks) is smaller than the computed initial size (string blks)
    Cause: Specified OPTIMAL size is smaller than the cumulative size of the initial extents during create rollback segment.
    Action: Specify a larger OPTIMAL size.

  • Error while retrieving data from an ARRAY resultset

    We hava an Oracle stroed procedure which has a table type as its OUT parameter and where the data is being entered into. This data requries to be returned to the Java client through a JDBC connection. We have used the OracleTypes' ARRAY object for this. We are facing errors when retieving data from the ARRAY resultset
    The Oracle Package
    ----I created a table type called "PlSqlTable":
    CREATE OR REPLACE TYPE PlSqlTable IS TABLE OF VARCHAR2(20);
    ----I defined this as the out parameter for my procedure :
    PROCEDURE testSQL
    arrayOutID OUT PlSqlTable
    Then populated the object :
    arrayOutID := PlSqlTable();
    arrayOutID.extend(4);
    arrayOutID(1):= 'Hello';
    arrayOutID(2) := 'Test';
    arrayOutID(3) := 'Ora';
    ----The procedure executes fine - all debug statements are printed ----right till the end of execution.
    The Java class
    ----Here is how I have defined the parameters :
    OracleCallableStatement stmnt = (OracleCallableStatement)connection.prepareCall("begin testSQL(?);end;");
    stmnt.registerOutParameter(2,OracleTypes.ARRAY,"PLSQLTABLE");
    System.out.println("Executing..");
    stmnt.execute();
    System.out.println("Executed..");
    ARRAY outArray = stmnt.getARRAY(1);
    System.out.println("Got array");
    ResultSet rset = outArray.getResultSet();
    System.out.println("Got Resultset..");
    int i = 1;
    while(rset.next()){
    System.out.println("VALUE : " + rset.getString(i));
    i = i+1;
    ----On execution, the debug messages display :
    Executing..
    Executed..
    Got array
    Got Resultset..
    VALUE : 1
    VALUE : Test
    ERROR : java.sql.SQLException: Invalid column index
    ----But I have populated upto 3 values in th e procedure. Then why this error ?
    PLLLEEEASE help me out on this.
    Thanks, Sathya

    haven't worked with db arrays but I think your problem is here:int i = 1;
    while(rset.next()){
         System.out.println("VALUE : " + rset.getString(i));
         i = i+1;
    }In the first loop you are retrieving the value from column 1(rs.getString(1)), which is OK, but in the second loop, you are trying to retrieve a value from the second column(rs.getString(2)) which doesn't exist. Try this code which only reads from column1:
    while(rset.next()){
         System.out.println("VALUE : " + rset.getString(1));
    }Jamie

  • Error while populating Xref table

    Hi all,
    I have created a project where i will extract job_id from source instance(which i am getting from AIAServiceConfigProperties.xml file) and populate it in the xref table.
    Now i have imported 3 knowledge modules for this project:-
    1. KM_LKM SQL to SQL (Mediator XREF)
    2. KM_IKM SQL Control Append (Mediator XREF)
    have not imported CKM as it cant handle LONG datatypes.
    I have kept xref_table in the target datastore and the the job table in the source datastore panel. i have created a variable which extracts the sourceID from the AIAConfig file. But when it comes to the step of populating data into the xref table this error crops up:-
    com.sunopsis.sql.SnpsMissingParametersException: Missing parameter
         at com.sunopsis.sql.SnpsQuery.completeHostVariable(SnpsQuery.java)
         at com.sunopsis.sql.SnpsQuery.updateExecStatement(SnpsQuery.java)
         at com.sunopsis.sql.SnpsQuery.executeUpdate(SnpsQuery.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execStdOrders(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSqlI.treatTaskTrt(SnpSessTaskSqlI.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)
    Am i missing something here?
    Regards,
    Sourav

    Hi SH,
    I have created a variable GetSourceColumnName and in the xref table i have mapped #GetSourceColumnName against XREF_COLUMN_NAME in the xref table. When i am executing the package it is showing the required value but it is showing error in loading data into this xref table.
    (in my AIAServiceConfig file my systemID is EBIZ_01 so when i am clicking on the variable after execution i can see this system ID)

Maybe you are looking for