Getting Dump from a select query

Dear All,
Am selecting records from KEKO  and storing into  E1KEKO  internal table. But am getting dump error. I need to send those E1KEKO records as idoc. Kindly help me out how to fix this dump.
  SELECT * INTO CORRESPONDING FIELDS OF e1keko
    FROM keko
    WHERE keko~matnr = p_matnr
      AND keko~werks = p_werks
      AND keko~bwtar = 'Z06'
      AND keko~bwvar = 'Z06'.
    CLEAR t_idoc_data.
    t_idoc_data-segnam = c_segnam_e1keko.
    t_idoc_data-mandt = sy-mandt.
    t_idoc_data-sdata  = e1keko.
    APPEND t_idoc_data.
    CLEAR e1keph.
endselect
Thanks in advance.
Anandhan

Hi,
If i use the below select query in a test program,  that time also am getting the same dump.
DATA: e1keph TYPE e1keph,
      e1keko TYPE e1keko.
   SELECT * INTO CORRESPONDING FIELDS OF e1keko
    FROM keko
    WHERE keko~matnr = '000000000010801071'.
  endselect.
(code}
The dump showing the below message
  The reason for the exception is:
  In a SELECT access, the read file could not be placed in the target
  field provided.
  Either the conversion is not supported for the type of the target field
  the target field is too small to include the value, or the data does no
  have the format required for the target field.
Thanks in advance
Anandhan

Similar Messages

  • How do I get last 15 rows from a select query

    Hello,
    I am writing a query, and I need to filter the last 15 rows of from the select query.
    For example: Select id, name,join_date from emp order by join_date;
    So I need to get the last 15 rows from emp table so that we can who are the last 15 employees joined the organization. I want to show the result in ascending order, otherwise I would have taken first 15 rows with order by clause as descinding order.
    Thanks in advance,
    Param.

    SQL> select ename, join_date from test222
    2 where rownum < 6
    3 order by join_date
    4 /
    ENAME JOIN_DATE
    CNC5461177794 14-FEB-02
    OR91551178218 14-FEB-02
    TUB9894676495 14-FEB-02
    SG15431177117 14-FEB-02
    PIB9384674017 14-FEB-02
    SQL> SELECT * from
    2 (select ename, join_date from test222
    3 order by join_date desc)
    4 WHERE rownum < 6
    5 /
    ENAME JOIN_DATE
    II61111208401 19-MAR-02
    II61451208038 18-MAR-02
    PI20014184983 01-MAR-02
    BNF2221148037C 28-FEB-02
    UO78902581 18-FEB-02
    Can you see the problem now ?
    You can test this concept with your own table.
    have a good day,
    Sri

  • How can i update rows  in a table based on a match from a select query

    Hello
    How can i update rows in a table based on a match from a select query fron two other tables with a update using sqlplus ?
    Thanks Glenn
    table1
    attribute1 varchar2 (10)
    attribute2 varchar2 (10)
    processed varchar2 (10)
    table2
    attribute1 varchar2 (10)
    table3
    attribute2 varchar2 (10)
    An example:
    set table1.processed = "Y"
    where (table1.attribute1 = table2.attribute1)
    and (table1.attribute2 = table3.attribute2)

    Hi,
    Etbin wrote:
    Hi, Frank
    taking nulls into account, what if some attributes are null ;) then the query should look like
    NOT TESTED !
    update table1 t1
    set processed = 'Y'
    where exists(select null
    from table2
    where lnnvl(attribute1 != t1.attribute1)
    and exists(select null
    from table3
    where lnnvl(attribute2 != t1.attribute2)
    and processed != 'Y'Regards
    EtbinYes, you could do that. OP specifically requested something else:
    wgdoig wrote:
    set table1.processed = "Y"
    where (table1.attribute1 = table2.attribute1)
    and (table1.attribute2 = table3.attribute2)This WHERE clause won't be TRUE if any of the 4 attribute columns are NULL. It's debatable about what should be done when those columns are NULL.
    But there is no argument about what needs to be done when processed is NULL.
    OP didn't specifically say that the UPDATEshould or shouldn't be done on rows where processed was already 'Y'. You (quite rightly) introduced a condition that would prevent redo from being generated and triggers from firing unnecessarily; I'm just saying that we have to be careful that the same condition doesn't keep the row from being UPDATEd when it is necessary.

  • Dump in a Select query

    Hi All,
    I am getting a dump & the dump says " TIME LIMIT EXCEEDED". The code as  below:-
    LOOP AT it_gen1 INTO wa_gen1.
            SELECT  vbelv posnv
              FROM  vbfa
        INTO TABLE  li_vbfa
             WHERE  vbeln = wa_gen1-bil_number
               AND  posnn = wa_gen1-itm_number.
            DESCRIBE TABLE li_vbfa  LINES gv_count .
            READ TABLE  li_vbfa  INDEX gv_count  .
            IF sy-subrc =  0 .
              MOVE: li_vbfa-vbelv TO gv_vbelv1,
                    li_vbfa-posnv TO gv_posnv.
            ENDIF .
            CALL FUNCTION 'SD_DOCUMENT_PARTNER_READ'
              EXPORTING
                i_parvw   = 'ZS'
                i_posnr   = gv_posnv
                i_vbeln   = gv_vbelv1
              IMPORTING
                e_vbpa    = li_vbpa
                e_vbadr   = li_vbadr
              EXCEPTIONS
                not_found = 1
                OTHERS    = 2.
            IF sy-subrc <> 0.
              MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
            ENDIF.
            MOVE  li_vbpa-kunnr  TO  wa_gen2-kunnr .
            MOVE-CORRESPONDING wa_gen1 TO wa_gen2.
            APPEND  wa_gen2 TO it_gen2  .
          ENDLOOP.
    If I use Function Module   CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR' before ENDLOOP this will overcome the error says one of my friend.
    Is this a feasible solution for this error?
    Thanks in dvance....

    Hi All,
    Thanks for all your inputs. This issue is resolved now. I have used ranges in the select query & removed FOR ALL ENTRIES construct. The select query is working very fastly now with correct data.
    The code with the changes as below :-
            LOOP AT it_gen1 INTO wa_gen1.
              CLEAR r_bil_number.
              CLEAR r_itm_number.
              r_bil_number-option = 'EQ'.
              r_bil_number-sign = 'I'.
              r_bil_number-low = wa_gen1-bil_number.
              COLLECT r_bil_number.
              r_itm_number-option = 'EQ' .
              r_itm_number-sign = 'I'.
              r_itm_number-low = wa_gen1-itm_number.
              COLLECT r_itm_number.
            ENDLOOP.
            SELECT vbelv
                   posnv
                   vbeln
                   posnn
                   vbtyp_n
                   vbtyp_v                     
                   FROM vbfa
                   INTO TABLE li_vbfa
             WHERE vbeln IN r_bil_number
             AND posnn   IN r_itm_number
             AND vbtyp_n = c_m.
    Regards
    Abhii.

  • Dump for a select query

    Hi Gurus,
    I have a select query as follows:
        SELECT
                   vbap~vbeln
                   vbap~posnr
                   vbap~matnr
                   vbap~arktx
                   vbap~pstyv
                   vbap~abgru
                   vbap~prodh
                   vbap~netwr
                   vbap~werks
                   vbap~kwmeng
                   vbap~prctr
                   vbap~ps_psp_pnr
                               FROM vbap
                INTO TABLE i_item_vbap
                FOR ALL ENTRIES IN i_reg_vbak
                WHERE
                vbap~vbeln EQ i_reg_vbak-vbeln AND
                vbap~matnr IN s_matnr          AND
                vbap~werks IN s_werks          .
    However, when I execute the program, I get the dump saying as:
    I get this exception "DBIF_RSQL_INVALID_RSQL", assigned to CLASS  "CX_SY_OPEN_SQL_DB"
    Please help me in understanding this.
    Also, there are only 85 entries in i_reg_vbak, plus not many values are there for s_matnr and s_werks.
    I tried executing this query w/o for all entries, but still it gave a dump.
    Waiting for your reply, thanks!

    hello
    SELECT
    vbap~vbeln
    vbap~posnr
    vbap~matnr
    vbap~arktx
    vbap~pstyv
    vbap~abgru
    vbap~prodh
    vbap~netwr
    vbap~werks
    vbap~kwmeng
    vbap~prctr
    vbap~ps_psp_pnr
    from vbap into corresponding fields of table it_vbap.
    if u use any  fields of vbap on selection scrren then mention as
    eg: where vbeln in s_vbeln etc.
    with regards,
    sumanth reddy

  • Short Dump for Dynamic Select Query

    Hello all,
    I get a short dump for my dynamic select query at the end of the code. The error is "The types of operands "dbtab" and "itab" cannot be converted into one another."
    My code looks like below.
    FORM get_ccnum_2  USING    p_tabname TYPE dd03l-tabname.
    DATA: p_table(30)  TYPE c.
      FIELD-SYMBOLS:  <dyn_wa>,
                                   <t> TYPE table.
      DATA: it_fldcat    TYPE lvc_t_fcat.
      TYPE-POOLS : abap.
      DATA: it_details   TYPE abap_compdescr_tab,
            wa_details   TYPE abap_compdescr.
      DATA: ref_descr    TYPE REF TO cl_abap_structdescr.
      DATA: new_table    TYPE REF TO data,
            new_line     TYPE REF TO data,
            wa_it_fldcat TYPE lvc_s_fcat.
    p_table = p_tabname.
      ref_descr ?= cl_abap_typedescr=>describe_by_name( p_table ).
      it_details[] = ref_descr->components[].
      LOOP AT it_details INTO wa_details.
        CLEAR wa_it_fldcat.
        wa_it_fldcat-fieldname = wa_details-name .
        wa_it_fldcat-datatype  = wa_details-type_kind.
        wa_it_fldcat-intlen    = wa_details-length.
        wa_it_fldcat-decimals  = wa_details-decimals.
        APPEND wa_it_fldcat TO it_fldcat .
      ENDLOOP.
      CALL METHOD cl_alv_table_create=>create_dynamic_table
        EXPORTING
          it_fieldcatalog = it_fldcat
        IMPORTING
          ep_table        = new_table.
    ASSIGN new_table->* TO <t>.
    CREATE DATA new_line LIKE LINE OF <t>.
      ASSIGN new_line->* TO <dyn_wa>.
    wa_cond = 'CCNUM <> '' '' '.
    APPEND wa_cond TO tab_cond.
          SELECT * INTO TABLE <t>
                   FROM     (p_table)
                   WHERE    (tab_cond)
                   ORDER BY (tab_ord).
    ENDFORM.                    " GET_CCNUM_2

    Hi,
    I tried to execute the code using table BSEGC and it gave a short dump..
    the actual exception that shows in ST22 IS ..UNICODE_TYPES_NOT_CONVERTIBLE..
    I think there is something wrong in the internal table creation..
    Instead of using the method cl_alv_table_create=>create_dynamic_table to create the dynamic table I used the following and it worked..
    CREATE DATA new_table TYPE TABLE OF (p_table).
    * Comment begin  " Naren
    *  ref_descr ?= cl_abap_typedescr=>describe_by_name( p_table ).
    *  it_details[] = ref_descr->components[].
    *  LOOP AT it_details INTO wa_details.
    *    CLEAR wa_it_fldcat.
    *    wa_it_fldcat-fieldname = wa_details-name .
    *    wa_it_fldcat-datatype  = wa_details-type_kind.
    *    wa_it_fldcat-intlen    = wa_details-length.
    *    wa_it_fldcat-decimals  = wa_details-decimals.
    *    APPEND wa_it_fldcat TO it_fldcat .
    *  ENDLOOP.
    *  CALL METHOD cl_alv_table_create=>create_dynamic_table
    *    EXPORTING
    *      it_fieldcatalog = it_fldcat
    *    IMPORTING
    *      ep_table        = new_table.
    * Comment End.  " Naren
    CREATE DATA new_table TYPE TABLE OF (p_table).   " New code by naren
    Please Try this..
    Thanks
    Naren

  • Dump error in select query

    Hey Gurus,
    i am working on a requirement in which select query is fetching 8 fields from a ZTABLE.
    IF NOT IT_ZQAPP1[] IS INITIAL.
      SELECT AUFNR VORNR PROBNR PIPENO NVORNR SHIFT
      PSTAT PRODAT FROM ZQAPP INTO CORRESPONDING FIELDS OF TABLE IT_ZQAPP_B
      FOR ALL ENTRIES IN IT_ZQAPP1
      WHERE AUFNR = IT_ZQAPP1-AUFNR
      AND WERKS IN P_WERKS
      AND PRODAT LE P_PRODAT.
    it works fine for lesser data but throws a dump error TSV_TNEW_PAGE_ALLOC_FAILED for entries more than 70000,
    and my requirement is to fetch more than a lac record.
    Kindly Suggest the corrections.
    Thanks in Advance...

    Hi!
    This error occurs typically, when there is no more memory for your ABAP session. This means, you have to do one of the followings:
    - restrict your report for smaller intervals, like process only 1 month instead of 6 months together
    - rewrite your program, and eliminate/refresh/free the unneccesary internal tables, or columns from internal tables. You might even try to remove unneccesary lines from internal tables
    - use SELECT - ENDSELECT instead of SELECT ... INTO statement. This could slower your program, but you'll need less memory usage
    Check your memory usage always, with SM04 transaction (Goto - Memory menu).
    Regards
    Tamá

  • Getting Time-Out at Select Query

    Dear All,
    I am getting Time-Out at particular Select Query.
    This error i am getting since last 3 days, before it was working fine. And there is no any change made to program in last 3 days.
    select  a~qmnum
             matnr
             kunum
             iwerk
             spart
    into    corresponding fields of iviqmel
    from    ( qmih as a
               inner join qmel as b on b~qmnum = a~qmnum )
    for all entries in i_tab
    where qmart in ('FS', 'ZP')
           and iwerk   = i_tab-iwerk
           and matnr   = i_tab-matnr
           and kunum   = i_tab-kunum
           and spart   = i_tab-spart.
       append iviqmel.
    endselect.
    In Program table QMEL also using the proper Index.
    Can you please give me any suggestion that how to come out from this issue.
    Regards,
    Dharmesh

    Hi Rob,
    I run the SQL Trace also, Query is using correct Index.
    and I had also chenge the select query.
    if not i_tab[] is initial.
        select a~matnr a~kunum a~spart
               b~qmnum b~iwerk
               into corresponding fields of table iviqmel
               from qmel as a inner join
                    qmih as b
                    on a~qmnum = b~qmnum
               for all entries in i_tab
               where a~qmart in ('FS', 'ZP')
                 and a~matnr   = i_tab-matnr
                 and a~kunum   = i_tab-kunum
                 and a~spart   = i_tab-spart
                 and b~iwerk   = i_tab-iwerk.
    endif.
    even its geving time out error.
    Regards,
    Dharmesh

  • How to pull only column names from a SELECT query without running it

    How to pull only column names from a SELECT statement without executing it? It seems there is getMetaData() in Java to pull the column names while sql is being prepared and before it gets executed. I need to get the columns whether we run the sql or not.

    Maybe something like this is what you are looking for or at least will give you some ideas.
            public static DataSet MaterializeDataSet(string _connectionString, string _sqlSelect, bool _returnProviderSpecificTypes, bool _includeSchema, bool _fillTable)
                DataSet ds = null;
                using (OracleConnection _oraconn = new OracleConnection(_connectionString))
                    try
                        _oraconn.Open();
                        using (OracleCommand cmd = new OracleCommand(_sqlSelect, _oraconn))
                            cmd.CommandType = CommandType.Text;
                            using (OracleDataAdapter da = new OracleDataAdapter(cmd))
                                da.ReturnProviderSpecificTypes = _returnProviderSpecificTypes;
                                //da.MissingSchemaAction = MissingSchemaAction.AddWithKey;
                                if (_includeSchema == true)
                                    ds = new DataSet("SCHEMASUPPLIED");
                                    da.FillSchema(ds, SchemaType.Source);
                                    if (_fillTable == true)
                                        da.Fill(ds.Tables[0]);
                                else
                                    ds = new DataSet("SCHEMANOTSUPPLIED");
                                    if (_fillTable == true)
                                        da.Fill(ds);
                                ds.Tables[0].TableName = "Table";
                            }//using da
                        } //using cmd
                    catch (OracleException _oraEx)
                        throw (_oraEx); // Actually rethrow
                    catch (System.Exception _sysEx)
                        throw (_sysEx); // Actually rethrow
                    finally
                        if (_oraconn.State == ConnectionState.Broken || _oraconn.State == ConnectionState.Open)
                            _oraconn.Close();
                }//using oraconn
                if (ds != null)
                    if (ds.Tables != null && ds.Tables[0] != null)
                        return ds;
                    else
                        return null;
                else
                    return null;
            }r,
    dennis

  • How to build Hierarchy and get values from DAX Evaluation Query?

    i have create Calander Hierachy for Year,Quarter,Month... in this invisible tabuler model medata properties.
    any one give steps for create Hierachy and Get Data From DAX evaluation context ?.
    VenkadesanPerumal

    Venkadesan, is this still an issue?
    Thanks!
    Ed Price, Azure & Power BI Customer Program Manager (Blog,
    Small Basic,
    Wiki Ninjas,
    Wiki)
    Answer an interesting question?
    Create a wiki article about it!

  • Single Query for getting total no of records N getting records from a selected range

    Hi,
    Got the below query:
    SELECT a.*, rowid FROM (SELECT name, postcode FROM Tbl ORDER BY name asc)a WHERE ROWNUM <=30
    MINUS
    SELECT b.*, rowid FROM (SELECT name, postcode FROM Tbl ORDER BY name asc) b WHERE ROWNUM <= 10
    Though I got the results right, I also want to know the total no of records from "SELECT name, postcode FROM Tbl ORDER BY name asc". Does anyone knows how to do it in a single query?
    Thanks.

    hi Carol
    The following output may help you.
    SQL> l
    1 select * from emp where (rowid,0) in (select rowid,mod(rownum,10)-rownum from emp)
    2 minus
    3* select * from emp where (rowid,0) in (select rowid,mod(rownum,6)-rownum from emp)
    SQL> /
    EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
    7839 KING PRESIDENT 17-NOV-81 5000 10
    7844 TURNER SALESMAN 7698 08-SEP-81 1500 0 30
    7876 ADAMS CLERK 7788 12-JAN-83 1100 20
    7900 JAMES CLERK 7698 03-DEC-81 950 30
    The above query fetches the 6,7,8,9th records only.
    Well my suggestion would be not to use ROWNUM directly in where clause since it changes dynamically. it is not a fixed value. for example pls see the result.
    SQL> select rownum,empno,ename,sal,job from emp where sal > 3000;
    ROWNUM EMPNO ENAME SAL JOB
    1 7839 KING 5000 PRESIDENT
    SQL> select rownum,empno,ename,sal,job from emp where sal > 1000;
    ROWNUM EMPNO ENAME SAL JOB
    1 7566 JONES 2975 MANAGER
    2 7654 MARTIN 1250 SALESMAN
    3 7698 BLAKE 2850 MANAGER
    4 7782 CLARK 2450 MANAGER
    5 7788 SCOTT 3000 ANALYST
    6 7839 KING 5000 PRESIDENT
    7 7844 TURNER 1500 SALESMAN
    8 7876 ADAMS 1100 CLERK
    9 7902 FORD 3000 ANALYST
    10 7934 MILLER 1300 CLERK
    10 rows selected.
    SQL> select * from emp where rownum = 1;
    EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
    7566 JONES MANAGER 7839 02-APR-81 2975 20
    The record of employee KING is getting the rownum differently.
    My understanding (out of my little knowledge) is the rownum values are assigned to the records only after the records are read physically and after applying the conditions(without rownum). Then the row numbers (rownum) is assigned to the records. Hence the rownum is not constant to a record since it is a dynamic value.
    Well i would like to know the suggestions of the ORACLE EXPERTS here in the discussion forum.
    If my finding is correct then OK if not Pls excuse me and pls give the correct solution
    Regards
    Prakash Eranki
    [email protected]

  • Update of a table from a select query with aggregate functions.

    Hello All,
    I have problem here:
    I have 2 tables A(a1, a2, a3, a4, a4....... ) and B( a1, a2, b1, b2, b3). I need to calculate the avg(a4-a3), Max(a4-a3) and Min(a4-a3) and insert it into table B. If the foreign keys a1, a2 already exist in table B, I need to do an update of the computed values into column b1, b2 and b3 respectively, for a1, a2.
    Q1. Is it possible to do this with a single query ? I would prefer not to join A with B because the table A is very large. Also columns b1, b2 and b3 are non-nullable.
    Q2. Also if a4 and a3 are timestamps what is the best way to find the average? A difference of timestamps yields INTERVAL DAY TO SECOND over which the avg function doesn't seem to work. The averages, max and min in my case would be less than a day and hence all I need is to get the data in the hh:mm:ss format.
    As of now I'm using :
    TO_CHAR(TO_DATE(ABS(MOD(TRUNC(AVG(extract(hour FROM (last_modified_date - created_date))*3600 +
    extract( minute FROM (last_modified_date - created_date))*60 +
    extract( second FROM (last_modified_date - created_date)))
    ),86400)),'sssss'),'hh24":"mi":"ss') AS avg_time,
    But this is very long drawn. Something more compact and efficient would be nice.
    Thanks in advance for your inputs.
    Edited by: 847764 on Mar 27, 2011 5:35 PM

    847764 wrote:
    Hi,
    Thanks everyone for such fast replies. Malakshinov's example worked fine for me as far as updating the table goes. As for the timestamp computations, I'm posting additional info: Sorry, I don't understand.
    If Malakshinov's example worked for updating the table, but you still have problems, does that mean you have to do something else besides update the table? If so, what?
    Oracle version : Oracle Database 11g Enterprise Edition Release 11.2.0.1.0
    Here are the table details :
    DESC Table A
    Name Null Type
    ID               NOT NULL NUMBER
    A1               NOT NULL VARCHAR2(4)
    A2               NOT NULL VARCHAR2(40)
    A3               NOT NULL VARCHAR2(40)
    CREATED_DATE NOT NULL TIMESTAMP(6)
    LAST_MODIFIED_DATE TIMESTAMP(6) DESCribing the tables can help clarify some things, but it's no substitute for posting CREATE TABLE and INSERT statements. With only a description of the table, nobody can re-create the problem or test their ideas. Please post CREATE TABLE and INSERT statements for both tables as they exist before the MERGE. If table b doen't contain any rows before the MERGE, then just say so, but you still need to post a CREATE TABLE statement for both tables, and INSERT statements for table a.
    The objective is to compute the response times : avg (LAST_MODIFIED_DATE - CREATED_DATE), max (LAST_MODIFIED_DATE - CREATED_DATE) and min (LAST_MODIFIED_DATE - CREATED_DATE) grouped by A1 and A2 and store it in table B under AVG_T, MAX_T and MIN_T. Since AVG_T, MAX_T and MIN_T are only used for reporting purposes we have kept it as Varchar (though I think keeping it as timestamp would make more sense). I think a NUMBER would make more sense (the number of minutes, for example), or perhaps an INTERVAL DAY TO SECOND. If you stored a NUMBER, it would be easy to compute averages.
    In table B the times are stored in the format : hh:mm:ss. We don't need milliseconds precision. If you don;'t need milliseconds, then you should use DATE instead of TIMESTAMP. The functions for manipulating DATEs are much better.
    Hence I was calculating is as follows:
    -- Avg Time
    TO_CHAR(TO_DATE(ABS(MOD(TRUNC(AVG(extract(hour FROM (last_modified_date - created_date))*3600 +
    extract( minute FROM (last_modified_date - created_date))*60 +
    extract( second FROM (last_modified_date - created_date)))
    ),86400)),'sssss'),'hh24":"mi":"ss') AS avg_time,
    --Max Time
    extract (hour FROM MAX(last_modified_date - created_date))||':'||extract (minute FROM MAX(last_modified_date - created_date))||':'||TRUNC(extract (second FROM MAX(last_modified_date - created_date))) AS max_time,
    --Min Time
    extract (hour FROM MIN(last_modified_date - created_date))||':'||extract (minute FROM MIN(last_modified_date - created_date))||':'||TRUNC(extract (second FROM MIN(last_modified_date - created_date))) AS min_timeIs this something that has to be done before or after the MERGE?
    Post the complete statement.
    Is this part of a query? Where's the SELECT keyword?
    Is this part of a DML operation? Where's the INSERT, or UPDATE, or MERGE keyword?
    What are the exact results you want from this? Explain how you get those results.
    Is the code above getting the right results? Are you just asking if there's a better way to get the same results?
    You have to explain things very carefully. None of the people who want to help you are familiar with your application, or your needs.
    I just noticed that my reply is horribly formatted - apologies! I'm just getting the hang of it.Whenever you post formatted text (such as query results) on this site, type these 6 characters:
    \(small letters only, inside curly brackets) before and after each section of formatted text, to preserve spacing.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Get year from user selected month in field name

    Hi BExperts,
    I would your help about this problem on BI 7 :
    At the opening of the query, user selects a month (for example 03.2007).
    From this month, i have to indicate key figures on the selected month (03.2007) and key figures on the corresponding year (here 2007).
    I'm using a variable in order to get the selected month (0I_CMNTH).
    I don't know how to get the corresponding year (with a variable) ?
    For example : user selects "03.2007", in the query i would have :
    Period  Key figure
    03.2007     17
    2007           38
    Thanks for help.
    Points will be assigned.
    Cheers,
    Vince.

    Hello,
             I am not sure about the one you mentioned but this is another way which you can try by creating the customer exit variable V_YEAR under 0calyear characteristic and add the following code for gettting the previous year.
    data: year(4) type n,
             year1(4) type n.
    when 'V_YEAR '.
    if i_step = 2. "after the popup
    loop at i_t_var_range into loc_var_range
    where vnam = '0I_CMNTH'.
    year = loc_var_range-low (4).
    year1 = year - 1.
    clear l_s_range.
    l_s_range-low = year1.
    l_s_range-sign = 'I'.
    l_s_range-opt = 'EQ'.
    append l_s_range to e_t_range.
    exit.
    endloop.
    endif.

  • ORA-03113 when inserting a CLOB value casted as an XMLType from a SELECT query into a table

    I have a table that contains a CLOB column with pseudo-XML in it. I want to keep this data in an XMLType column so that I can leverage some of Oracle's built-in XML features to parse it more easily.
    The source table is defined as:
    CREATE TABLE "TSS_SRM_CBEBRE_LOGS_V"
    ( "INCIDENT_ID" NUMBER,
    "EVENT_TYPE" VARCHAR2(100 BYTE) NOT NULL ENABLE,
    "EVENT_KEY" VARCHAR2(100 BYTE),
    "CREATION_DATE" TIMESTAMP (6) NOT NULL ENABLE,
    "CREATED_BY" VARCHAR2(100 BYTE) NOT NULL ENABLE,
    "LOG_MSG" CLOB);
    The target (for testing this problem) table is defined as:
    CREATE TABLE "TESTME"
    ( "LOG_MSG" "XMLTYPE"
    My query is:
    insert /*+ APPEND */ into testme ("LOG_MSG")
    select XMLTYPE.createXML("LOG_MSG") as LOG_MSG from "TSS_SRM_CBEBRE_LOGS_V" b;
    In SQL*Developer, my error is: Error report:
    SQL Error: No more data to read from socket
    In SQL*PLUS and Toad, my error is:
    ORA-03113: end-of-file on communication channel
    Process ID: 13903
    Session ID: 414 Serial number: 32739

    By pseudo-XML, I mean that it doesn't have the xml root node. The content structure is similar to the following:
    <a attr1="1" attr2="2" />
    <b attr1="3" attr2="4" />
    <c attr1="5">
    <e attr1="6" attr2="7" />
    <e attr1="8" attr2="9" />
    <e attr1="10" attr2="11" />
    </c>
    <d attr1="12" />
    OK. Those are XML fragments then.
    I'm surprised you say the query alone works.
    We cannot build an XMLType instance using the default constructor or createXML() method when the content is composed of fragments.
    AFAIK the only option is to use XMLParse() with CONTENT option :
    SQL> select xmltype.createxml(LOG_MSG) from TSS_SRM_CBEBRE_LOGS_V;
    ERROR:
    ORA-31011: XML parsing failed
    ORA-19202: Error occurred in XML processing
    LPX-00245: extra data after end of document
    Error at line 2
    ORA-06512: at "SYS.XMLTYPE", line 5
    no rows selected
    SQL> select xmltype(LOG_MSG) from TSS_SRM_CBEBRE_LOGS_V;
    ERROR:
    ORA-31011: XML parsing failed
    ORA-19202: Error occurred in XML processing
    LPX-00245: extra data after end of document
    Error at line 2
    ORA-06512: at "SYS.XMLTYPE", line 272
    ORA-06512: at line 1
    no rows selected
    SQL> select xmlparse(content LOG_MSG) from TSS_SRM_CBEBRE_LOGS_V;
    XMLPARSE(CONTENTLOG_MSG)
    <a attr1="1" attr2="2" />
    <b attr1="3" attr2="4" />
    <c attr1="5">
    <e attr1="6" a
    Anyway, you'll eventually hit this :
    SQL> insert into testme (LOG_MSG)
      2  select XMLparse(content LOG_MSG)
      3  from TSS_SRM_CBEBRE_LOGS_V;
    insert into testme (LOG_MSG)
    ERROR at line 1:
    ORA-19010: Cannot insert XML fragments

  • Get radius from map selection event

    How can I get the radius and the UOM from a MapSelectionEvent?
    Thank you,
    Monica

    Hi,
    what is the usecase. Do you want to know if the users selected a column, or do you know the table cell the user clicked into ? Note that the selectionEvent does not pass the column information of the mouse focus. Also, which release of JDeveloper do you use?
    Frank

Maybe you are looking for

  • Zen Vision M or Zen V P

    I'm going to buy Creative mp3 player and i'm looking at these: Zen Vision M(30gb) or Zen V Plus(4gb). So I need advice which to buy. First I was thinking about Zen V Plus (4gb). I found that it cost 229$, but when I looked at Vision's price it was on

  • Error Message from SLD - "Selected client already has a business system..."

    I have successfully created and test a File to IDOC scenario from a File system to ERP ECC 6.0 (client 101, system name sapdbt02) Right now, I creating  another File to IDOC scenario for a different file system to the same ERP ECC 6.0 At the SLD, I w

  • ITunes 8 has deleted my library & playlists..............

    ......not only has iTunes 8 deleted my entire library and playlists, my iPhone has also died after upgrading to v2.1. Question now is: how do I get my iTunes library & playlists back? Any help would be much appreciated.

  • Date mask for Safari

    Has anyone found a mask for date formatting which works with Safari MAC? Nick

  • Help to write following SQL query?

    Hey, beginner hopes to get some help from pro's. Please write SQL query to select only green and yellow fruits that are in stock and output results sorted by fruit name in ascending order. Database name: warehouse Table name: Inventory id |   Fruit