Select statement error.

Hi all,
I have a select statement which will join 4 tables as shown below. Something is not working right in the select statement and caused the shortdump.
I really cannot figure out where is not right.
Please help.
TYPES:  
  BEGIN OF t_lips,
    matnr TYPE matnr,
    lfimg TYPE lfimg,
    meins TYPE meins,
    vbeln TYPE vbeln_vl,
    lfart TYPE lfart,
    vstel TYPE vstel,
    maktx TYPE maktx,
    werks TYPE werks_d,
    exnum TYPE exnum,
    posnr TYPE posnr_vl,
    uecha TYPE uecha,
    netwr TYPE netwr,
    waerk TYPE waerk,
    vgbel TYPE vgbel,
  END OF t_lips.
DATA: lt_lips      TYPE TABLE OF t_lips.
SELECT lips~matnr lfimg lips~vrkme lips~vbeln lfart
    vbap~vstel lips~arktx lips~werks exnum
    vbap~netwr vbap~waerk lips~vgbel
    lips~posnr lips~uecha
  INTO TABLE lt_lips
  FROM lips INNER JOIN vttp
    ON    vttp~vbeln = lips~vbeln
    INNER JOIN likp
    ON    lips~vbeln = likp~vbeln
    INNER JOIN VBAP
    ON lips~vgbel = vbap~vbeln
  WHERE vttp~tknum = ps_vttk-tknum
    AND   lfimg      <> 0.
Error analysis                                                                               
An exception occurred that is explained in detail below.                                     
    The exception, which is assigned to class 'CX_SY_OPEN_SQL_DB', was not caught                
     in                                                                               
procedure "GET_DATA" "(FORM)", nor was it propagated by a RAISING clause.                    
    Since the caller of the procedure could not have anticipated that the                        
    exception would occur, the current program is terminated.                                    
    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 not                     
    have the format required for the target field.                                               

Hi,
In the below code, where are you picking up value for LFIMG and LFART. Give the alias/table name for them also.
for ex. lips~lfimg....
SELECT lips~matnr lfimg lips~vrkme lips~vbeln lfart
    vbap~vstel lips~arktx lips~werks exnum
    vbap~netwr vbap~waerk lips~vgbel
    lips~posnr lips~uecha
  INTO TABLE lt_lips
  FROM lips INNER JOIN vttp
    ON    vttp~vbeln = lips~vbeln
    INNER JOIN likp
    ON    lips~vbeln = likp~vbeln
    INNER JOIN VBAP
    ON lips~vgbel = vbap~vbeln
  WHERE vttp~tknum = ps_vttk-tknum
    AND   lfimg       0.
Hope this is useful.
Also selection of records should be same as declared in table lt_lips otherwise use 'INTO CORRESPONDING TABLE LT_LIPS'
Regards,
Saba
Edited by: Saba Sayed on Oct 24, 2008 9:30 AM

Similar Messages

  • Global profile select statement error

    Hello,
    I try to set up profiles to personalize reports for users.
    When I use global profile with profile value of first kind  (on a profile value screen i choose "value", type, my formula "="my variable", and click add) and attatch it to the publication, it doesn't work properly. No matter what i use inside formula field, BO environment doesn't personalize report in accordance to it.
    I've noticed that there is something wrong with select statement created by BO. After sending a publication, report instance received by user has "description" field like "(and (equal null "my variable")). No matter what i put inside formula box in profile "equal null" statement is always added.
    When i use second type profile value (filter expression) everythig seems to be fine.
    Is this some kind of bug inside global profile mechanism
    I have BO XI R 3.1 without any fixpacks.
    Thanks in advance for any help
    best regards
    Wojtek

    Hi,
    In the Values option one can only use fixed values no formulas. Hence the formulas will not work.
    In my case the expression option does not work. Have you tried using a formual =CurrentUser in the expression field.

  • Script logic select statement error (*SELECT(%YEAR%,"[YEAR]","T_TIME","[ID]

    Hi
    i am trying to use the below statement . its giving error . pls have a look
    *SELECT(%YEAR%,"[YEAR]","T_TIME",u201D[ID]=%T_TIME_SET%u201D)
    *SELECT(%PYEAR%,"[YEAR]-1","T_TIME",u201D[ID]=%T_TIME_SET%u201D)
    *RUNALLOCATION
    *FACTOR=1
    *DIM T_MOVEMENTS WHAT = CB; WHERE=OB;
    *DIM T_TIME WHAT=MAR.%PYEAR%; WHERE=BAS(TOTAL.%YEAR%)
    *ENDALLOCATION
    *COMMIT
    The resule
    Validation status of executable file: Failed
    - Incorrect syntax near 'u201D'. in:select [YEAR] from mbrT_TIME where u201D[ID]=%T_TIME_SET%u201D
    Validation status of syntax: Failed
    - Invalid syntax found; see statements in red
    Bud if specify the year its running properly. pls  advice me whare i was wrong
    Thanks

    Hi Narsi,
    You can use the below instruction:
    *SELECT(%YEAR%,"[YEAR]","T_TIME",u201DID='%T_TIME_SET%'u201D)
    *SELECT(%PYEAR%,"[YEAR]-1","T_TIME",u201DID='%T_TIME_SET%'u201D)
    I have just added single quote before and after %T_TIME_SET% and %T_TIME_SET%
    Please try this!!
    Thanks,
    Rohit

  • Simple Select Statement Error

    Hello,
    I want to print user from my database, this is the code:
                          System.out.println("user:\n"); user = sc.next(); System.out.println("password:\n"); psw = sc.next();                                                     Statement s = conn.createStatement (); s.executeQuery("SELECT usr, pass FROM log WHERE usr=''"+user+" AND pass=''"+psw);                       ResultSet rs = s.getResultSet ();                       if (s.getMoreResults()){                           System.out.println("works");                       }                       else if (!s.getMoreResults()){                           System.out.println("doesn't");                           System.exit(1);                       }                         while (rs.next ())   {             String nameVal = rs.getString ("user");       String catVal = rs.getString ("pass");       System.out.println (                       "name = " + nameVal               + " pass = " + catVal);       ++count;   }
    the connection is established, but it doesn't print anything when I enter data in it [ admin "1234" which exists in the db ], any idea what could be wrong? I have to mentioned that I'm a little bit fresh in Java databases.

    hey I sorted out! = )
    ResultSet rs = s.getResultSet ();
       if (rs.next()) {
         do {
          String nameVal = rs.getString ("lnum");
           String catVal = rs.getString ("passwd");
           System.out.println (
                    "name = " + nameVal
                   + " password = " + catVal);
         //  System.out.println("Full access granted ");
    JOptionPane.showMessageDialog(frame,
        "Welcome in LYITstorage",
        "Welcome",
        JOptionPane.INFORMATION_MESSAGE);
    Desktop.getDesktop().browse(new java.net.URI("www.google.com"));
            } while (rs.next());
       else{
           JOptionPane.showMessageDialog(frame,
        "Username or password are incorrect\n " +
         "If You don't have an account please\n press the regestration link",
        "Regestration problem",
        JOptionPane.ERROR_MESSAGE);
      }= ), thanks for help right now, but its not a end of my problems = ). I wanted to use it with INSERT, but it doesn' work as good as I want, as a matter of fact it's not working at all :), this is the code, any help would be nice :).
    try
                          System.out.println("try");
                             Statement s = conn.createStatement ();
                             System.out.println("statement");
                             int count =0;
                             boolean temp;
                             String query =   "INSERT INTO log (passwd, name,surname,lnum) VALUES ('"+pa+"', '"+n+"', '"+sn+"','"+nu+"')" ;
                             System.out.println("test");
                          count=  s.executeUpdate(query);
                            System.out.println(query);
                           System.out.println(count);
                             ResultSet rs = s.getResultSet ();
                             if(rs.next()){
                                 JOptionPane.showMessageDialog(frame,
                                "Welcome ",
                                "Welcome",
                                 JOptionPane.INFORMATION_MESSAGE);
                            else   {
           JOptionPane.showMessageDialog(frame,
        "User already exists","error",
        JOptionPane.ERROR_MESSAGE);
       }

  • Urgent , abap select statement error ...

    Hi all ,
    here i attached my code , has anyone can tell me where is the error ???
    when i active this code , it showed :
    "comma without preceding colon(after select?)"
    thanks a lot !
    SELECT LIPSERDAT LIPSVBELN LIPSPOSNR LIPSVGPOS LIPS~LFIMG
    LIPSVRKME LIKPWADAT_IST LIKPKUNAG LIKPKUNNR LIKP~VBELN
    VBAPVBELN VBAPMATNR VBAPNETWR VBAPWAERK VBAPMWSBP VBAPNETPR
    VBAPPOSNR VBUPKOSTA VBUPWBSTA VBUPFKSTA VBUPPOSNR VBUPVBELN
    VBPAPARVW VBPAVBELN VBUKCMGST VBUKVBELN VBAKAUART VBAKVBELN
    INTO (
    WASTATUS-ERDAT , WASTATUS-VBELN , WASTATUS-POSNR ,
    WASTATUS-VGPOS , WASTATUS-LFIMG , WASTATUS-VRKME ,
    WASTATUS-WADAT_IST , WASTATUS-KUNAG ,WASTATUS-KUNNR ,
    WASTATUS-LIKPVBELN , WASTATUS-VBAPVBELN , WASTATUS-MATNR ,
    WASTATUS-NETWR , WASTATUS-WAERK , WASTATUS-MWSBP ,
    WASTATUS-NETPR , WASTATUS-POSNR , WASTATUS-KOSTA , WASTATUS-WBSTA ,
    WASTATUS-FKSTA , WASTATUS-VBUPPOSNR , WASTATUS-VBUPVBELN ,
    WASTATUS-PARVW , WASTATUS-VBPAVBELN , WASTATUS-CMGST ,
    WASTATUS-VBUKVBELN , WASTATUS-AUART , WASTATUS-VBAKVBELN )
        FROM ( LIPS inner join LIKP
               on  LIKPVBELN = LIPSVBELN
               inner join VBAP
               on  VBAPVBELN = LIPSVGBEL
               and VBAPPOSNR = LIPSVGPOS
               inner join VBUP
               on  VBUPPOSNR = LIPSPOSNR
               and VBUPVBELN = LIPSVBELN
               inner join VBPA
               on  VBPAVBELN = LIPSVBELN
               inner join VBUK
               on  VBUKVBELN = LIPSVBELN
               inner join VBAK
               on  VBAKVBELN = VBAPVBELN )
            WHERE
               LIPS~VBELN in P_SVBELN
               and LIPS~ERDAT in P_ERDAT
               and LIKP~KUNAG in P_KUNAG
               and LIKP~KUNNR in P_KUNNR
               and VBAP~VBELN in P_PVBELN
               and VBUP~KOSTA in P_KOSTA
               and VBUP~WBSTA in P_WBSTA
               and VBUP~FKSTA in P_FKSTA
               and VBPA~PARVW in P_PARVW
               and VBUK~CMGST in P_CMGST .

    sorry all ,
       i already removed the space on my code like that :
       but it still displayed the error .
    SELECT LIPS~ERDAT
    <b>*LIPSVBELN LIPSPOSNR LIPSVGPOS LIPSLFIMG
    *LIPSVRKME LIKPWADAT_IST LIKPKUNAG LIKPKUNNR LIKP~VBELN
    *VBAPVBELN VBAPMATNR VBAPNETWR VBAPWAERK VBAPMWSBP VBAPNETPR
    *VBAPPOSNR VBUPKOSTA VBUPWBSTA VBUPFKSTA VBUPPOSNR VBUPVBELN
    *VBPAPARVW VBPAVBELN VBUKCMGST VBUKVBELN VBAKAUART VBAKVBELN</b>    FROM ( LIPS inner join LIKP
               on  LIKPVBELN = LIPSVBELN
               inner join VBAP
               on  VBAPVBELN = LIPSVGBEL
               and VBAPPOSNR = LIPSVGPOS
               inner join VBUP
               on  VBUPPOSNR = LIPSPOSNR
               and VBUPVBELN = LIPSVBELN
               inner join VBPA
               on  VBPAVBELN = LIPSVBELN
               inner join VBUK
               on  VBUKVBELN = LIPSVBELN
               inner join VBAK
               on  VBAKVBELN = VBAPVBELN )
    INTO (WASTATUS-ERDAT)
    <b>*WASTATUS-VBELN, WASTATUS-POSNR, WASTATUS-VGPOS,WASTATUS-LFIMG)
    *WASTATUS-VRKME,
    *WASTATUS-WADAT_IST, WASTATUS-KUNAG,WASTATUS-KUNNR,
    *WASTATUS-LIKPVBELN, WASTATUS-VBAPVBELN, WASTATUS-MATNR,
    *WASTATUS-NETWR, WASTATUS-WAERK, WASTATUS-MWSBP,
    *WASTATUS-NETPR, WASTATUS-POSNR, WASTATUS-KOSTA, WASTATUS-WBSTA,
    *WASTATUS-FKSTA, WASTATUS-VBUPPOSNR, WASTATUS-VBUPVBELN,
    *WASTATUS-PARVW, WASTATUS-VBPAVBELN, WASTATUS-CMGST,
    *WASTATUS-VBUKVBELN, WASTATUS-AUART, WASTATUS-VBAKVBELN )</b>        WHERE
               LIPS~VBELN in P_SVBELN
               and LIPS~ERDAT in P_ERDAT
               and LIKP~KUNAG in P_KUNAG
               and LIKP~KUNNR in P_KUNNR
               and VBAP~VBELN in P_PVBELN
               and VBUP~KOSTA in P_KOSTA
               and VBUP~WBSTA in P_WBSTA
               and VBUP~FKSTA in P_FKSTA
               and VBPA~PARVW in P_PARVW
               and VBUK~CMGST in P_CMGST .

  • Urgent , abap select statement error VBPA ...

    hi gurus,
    please tell me what is the wrong in the following select statment:
    it returns 4 dispite that the data is there in the table VBPA
    like this :
    VBPA
    Cl.                          :     200
    Document                :    0010002449
    Item                         :
    Funct                      :    PE
    Pers.No.  :                    100820
    SELECT SINGLE
      pernr
    INTO  w_pernr
    FROM  vbpa
    WHERE VBELN   EQ '0010002449'
    and   kunnr   EQ 'PE'.

    hi
    good
    wrong one ->
    SELECT SINGLE
    pernr
    INTO w_pernr
    FROM vbpa
    WHERE VBELN EQ '0010002449'
    and kunnr EQ 'PE'.
    SELECT SINGLE
    pernr
    INTO w_pernr
    FROM vbpa
    WHERE VBELN EQ 0010002449
    and kunnr EQ PE.
    change like this and check the difference.
    thanks
    mrutyun^

  • Normal select statement error!??

    Hello All,
    I have a table with primary key (antrag_nr, beladeflag, stempel)
    Desc test88
    Name Null? Type
    ANTRAG_NR NOT NULL NUMBER
    A_PROZESS NUMBER
    STEMPEL NOT NULL DATE
    BELADEFLAG NOT NULL VARCHAR2(1)
    desc test99
    Name Null? Type
    ANTRAG_NR NOT NULL NUMBER
    A_PROZESS NUMBER
    STEMPEL NOT NULL DATE
    BELADEFLAG NOT NULL VARCHAR2(1)
    select * from test99;
    ANTRAG_NR A_PROZESS STEMPEL B
    1 3 04-JAN-05 m
    2 4 04-JAN-05 m
    1     4 05-JAN-05 m
    select * from test88;
    ANTRAG_NR A_PROZESS STEMPEL B
    1 1 01-JAN-05 m
    1 2 02-JAN-05 m
    1 2 03-JAN-05 m
    1 3 04-JAN-05 m
    2 1 01-JAN-05 m
    2 2 02-JAN-05 m
    2     3 04-JAN-05 m
    I am writing this query now and getting the below answer.
    select a.antrag_nr, a.a_prozess, a.stempel, a.beladeflag from test88 a, test99 b where a.antrag_nr = b.antrag_nr and a.a_prozess <> b.a_prozess and a.stempel = (select max(stempel) from test88);
    ANTRAG_NR A_PROZESS STEMPEL B
    2 3 04-JAN-05 m
    1     3 04-JAN-05 m
    according to my query I have ’a a.a_prozess <> b.a_prozess’ but why do I get 1 3 04-jan-05 m
    Please let me know where have I gone wrong!!
    RGds
    Karhtik krishna

    The way your initial query was designed, checks all a_prozess available for each antrag_nr. If I change your query around I can demonstrate.
    select  a.antrag_nr
    ,       b.a_prozess
    ,       a.stempel
    ,       a.beladeflag
    from    test88 a
    ,       test99 b
    where   a.antrag_nr = b.antrag_nr
    and     a.a_prozess <> b.a_prozess
    and     a.stempel = (   select max(stempel)
                            from test88
    ANTRAG_NR     A_PROZESS     STEMPEL          BELADEFLAG
    1          4          4-JAN-2005     m
    2          4          4-JAN-2005     m

  • Getting error while executing this select statement

    Hi All,
    I am new to this community.
    I am getting error whie compiling the below code. Its telling 'Text' is invalid identifier. Also i want to know how can we obtain 'parseable' version of the below query?
    my basic intention is to create a trigger header through a select statement and show it the complete text as a single column..
    select text from
    (select 'CREATE OR REPLACE TRIGGER '||SUBSTR(column_name,2,4)||'aud
    AFTER INSERT
    OR UPDATE
    OF '||column_name||',
    OR DELETE ON '||table_name||'
    FOR EACH ROW'
    FROM(SELECT lower(REPLACE(column_name,'O_','')) column_name , /*changing O to O_*/
    lower(replace(t.table_name,'_A_','_')) table_name,
    lower(t.table_name) table_name1,
    c.column_id
    FROM all_tab_columns c,
    (SELECT object_name table_name
    FROM all_objects
    WHERE object_name LIKE '%/_A/_%' ESCAPE '/') t
    WHERE c.table_name(+) = t.table_name
    AND SUBSTR(column_name(+),1,2) = 'O_'))

    thanks prathamesh. it solved the problem. i have one more question.
    as of now it creates single create trigger statement for each column on a table.
    example:
    CREATE OR REPLACE TRIGGER ust_aud
    AFTER INSERT
    OR UPDATE
    OF cust_id,
    OR DELETE ON characteristic_t
    FOR EACH ROW
    however, i want to create trigger for all columns in a single statement. can you please help me how to do it?
    basically want to 'CREATE TRIGGER' for all columns in a table. i am finding difficult how to change my query to suit this!!
    i am pasting my original query again for your reference. pls advise...
    example:
    CREATE OR REPLACE TRIGGER ust_aud
    AFTER INSERT
    OR UPDATE
    OF cust_id,
    fixed_item_val,
    copy_item_val,
    rgn_id,
    txn_id,
    OR DELETE ON characteristic_t
    FOR EACH ROW
    ORIGINAL QUERY
    select text from
    (select 'CREATE OR REPLACE TRIGGER '||SUBSTR(column_name,2,4)||'aud
    AFTER INSERT
    OR UPDATE
    OF '||column_name||',
    OR DELETE ON '||table_name||'
    FOR EACH ROW' text
    FROM(SELECT lower(REPLACE(column_name,'O_','')) column_name , /*changing O to O_*/
    lower(replace(t.table_name,'_A_','_')) table_name,
    lower(t.table_name) table_name1,
    c.column_id
    FROM all_tab_columns c,
    (SELECT object_name table_name
    FROM all_objects
    WHERE object_name LIKE '%/_A/_%' ESCAPE '/') t
    WHERE c.table_name(+) = t.table_name
    AND SUBSTR(column_name(+),1,2) = 'O_'))

  • Runtime error at select statement in RFC_READ TABLE FM

    Dear All,
       I have copied the standard FM RFC_READ_TABLE to incorporate the customer needs. Below is the select query which I have written in this FM.
    SELECT (po_search_text-column_text) INTO <wa> FROM ekko
          INNER JOIN ekpo ON ekko~ebeln = ekpo~ebeln
          INNER JOIN eket ON ekpo~ebeln = eket~ebeln AND ekpo~ebelp = eket~ebelp
          INNER JOIN lfa1 ON ekko~lifnr = lfa1~lifnr
          INNER JOIN lfm1 ON ekko~lifnr = lfm1~lifnr AND ekko~ekorg = lfm1~ekorg
          INNER JOIN lfb1 ON ekko~lifnr = lfb1~lifnr AND ekko~bukrs = lfb1~bukrs
          INNER JOIN t024 ON ekko~ekgrp = t024~ekgrp
          INNER JOIN zatscsng_status ON eket~ebeln = zatscsng_status~po_number
          AND   eket~ebelp = zatscsng_status~po_line
          AND   eket~etenr = zatscsng_status~po_sched_line
          INNER JOIN adrc ON zatscsng_status~delivery_addr = adrc~addrnumber
          WHERE (po_search_text-cond_text)
          ORDER BY (po_search_text-sort_text).
    Here, posearch_text-column_text_ will have the fields to be selected at runtime and posearch_text-cond_text_ is the where condition. It is running fine in this case.
    But when I try to select Item Category ( EKPO-PSTYP), if data is present for this category, it is returning the values but if data is not there for the particular item category in the where clause, it is giving a RUNTIME ERROR at the select statement.
    Here is the ERROR ANALYSIS:
    An exception occurred that is explained in detail below.
    The exception, which is assigned to class 'CX_SY_DYNAMIC_OSQL_SEMANTICS', was
      not caught in
    procedure "ZATSCSNG_RFC_READ_TABLE" "(FUNCTION)", nor was it propagated by a
      RAISING clause.
    Since the caller of the procedure could not have anticipated that the
    exception would occur, the current program is terminated.
    The reason for the exception is:
    The current ABAP program has tried to execute an Open SQL statement
    which contains a WHERE, ON or HAVING condition with a dynamic part.
    The part of the WHERE, ON or HAVING condition specified at runtime in
    a field or an internal table, contains the invalid value "<L_LINE>-PSTYP".
    Edited by: Rob Burbank on Mar 17, 2010 5:09 PM

    Now that's what I call a join statement...
    You probably have a bug in how you build po_search_text-cond_text, the content must be a syntactically correct where clause. It seems that in your example there is just "<L_LINE>-PSTYP" without a condition, so try omitting it altogether.
    Debug the content of po_search_text-cond_text before it hits the select statement.
    Thomas

  • Error in select statement in CMOD

    Hi Friends
    I am enhancing a data source with some fields and in the CMOD i am writing the code.
    My delcaration is as follows
    begin of  ty_dfkkzp,
                    SELW2       type  dfkkzp-SELW2,
                    BLART       type  dfkkzp-BLART ,
                    BUDAT       type  dfkkzp-BUDAT ,
                    BLDAT       type  dfkkzp-BLDAT ,
                    TBETR       type  dfkkzp-TBETR  ,
                    ZZRECEIPT   type  dfkkzp-ZZRECEIPT ,
                    ZZPAYCAT  type  dfkkzp-ZZPAYCAT ,
                    ZZPAYSRC  type  dfkkzp-ZZPAYSRC ,
                    ZZPAYTYPE   type  dfkkzp-ZZPAYTYPE ,
                    ZZTENDER  type  dfkkzp-ZZTENDER ,
                end of  ty_dfkkzp.
    Following is my SELECT statement.
    select
            SELW2
            BLART
            BUDAT
            BLDAT
            TBETR
            ZZRECEIPT
            ZZPAYCAT
            ZZPAYSRC
            ZZPAYTYPE
            ZZTENDER
            into corresponding fields of table lt_dfkkzp
            from dfkkzp
            for all entries in it_data
           where SELW2 = it_data-VTREF.
    I am getting an error in the where clause. This is becuase VTERF ( Contract) is of type CHAR and length 20, where as SELW2 is of type CHAR but Length 35. I know the length and type should be the same. But this table DFKKZP strangely has SELW2(Contract) has length 35.
    Can someone please suggest me how to handle this inorder for me to get this correct?.
    Thanks in adv.
    Regards
    BN

    Hi,
    try this and let me know if it works.
    Declare another internal table and work area like it_data1 type it_data as shown below.
    Begin of it_data1_wa,
    ......... type........,
    ......... type .......,
    SELW2 type dfkkzp-SELW2,
    end if it_data_wa1.
    data: it_data1 like standard table of it_data_wa.
    data: it_data_wa type it_data
    include all the fields inside the table.
    loop at it_data into it_data_wa.
    move corresponding lt_data_wa to it_data1_wa.
    it_data1_wa-SELW2 = it_data_wa-VTREF.
    append it_data1_wa to it_data1.
    end loop.
    now write the same select statement for all entries in it_data1 instead of it_data.
    Regards,
    Anusha

  • Dynamic SELECT statement causing CX_SY_DYNAMIC_OSQL_SEMANTICS error.

    Hello Gurus,
    We have a dynamic SELECT statement in our BW Update Rules where the the Selection Fields are populated at run-time and so are the look-up target and also the WHERE clause. The code basically looks like below:
              SELECT (lt_select_flds)
                FROM (lf_tab_name)
                INTO CORRESPONDING FIELDS OF TABLE <lt_data_tab>
                FOR ALL ENTRIES IN <lt_source_data>
                WHERE (lf_where).
    In this instance, we are selecting 5 fields from Customer Master Data and the WHERE condition for this instance of the run is as below:
    WHERE: DIVISION = <lt_source_data>-DIVISION AND DISTR_CHAN = <lt_source_data>-DISTR_CHAN AND SALESORG = <lt_source_data>-SALESORG AND CUST_SALES = <lt_source_data>-SOLD_TO AND OBJVERS = 'A'
    This code was working fine till yesterday when we encountered serious performance problems and the Basis team had to do some changes at the DB level [Oracle]. Ever since, when we execute our data load, we get the CX_SY_DYNAMIC_OSQL_SEMANTICS.
    Is setting changes at the Oracle level cause issues with how the data is being read at the DB. If yes, can you suggest what can we do to this code to get is working correctly [in case Basis can't revert back their changes]?
    Would appreciate any help we can get here.

    You don't understand - this error comes up when we run specific BEx queries.  It was working yesterday, but today it is not.  Our support package did not change from yesterday.  We did not apply any OSSnotes.
    We are however doing pre-prepare on our Prod system.
    The temporary table is used to store SIDs for use in the join.  the table exists in the dictionary, but not at an Oracle level.

  • Urgent, SELECT statement results in error

    hi all, this is very urgent, could you guys have a look at my SELECT statement?
      SELECT vk~kunnr         "customer no
              vk~vbeln         "sales order no
              vk~audat         "date
              vk~vbtyp         "SD DOCUMENT CATEGORY
              vk~knumv         "lwk
              vp~kwmeng        "qty
              vp~matnr         "material no
              vp~posnr         "LINE ITEM
              vd~bstkd         "PURCHASE ORDER NO
    *          kv~kwert         "lwk
              FROM  vbak AS vk
              INNER JOIN vbap AS vp
              ON vk~vbeln = vp~vbeln
              INNER JOIN vbkd AS vd
              ON vk~vbeln = vd~vbeln
    *          INNER JOIN konv AS kv
    *          ON kv~knumv = vk~knumv
              INTO CORRESPONDING FIELDS OF TABLE it_so
              WHERE vk~vkorg IN s_vkorg
              AND vk~audat IN s_date
              AND vk~kunnr IN s_kunnr
              AND vp~matnr IN s_matnr
              AND vd~bstkd IN s_bstkd
              AND vk~vbeln IN s_vbeln
    *          AND kv~kschl = 'ZP00'
              AND vk~vbtyp = 'C'.
    The commented lines are the new additions that i want to add to the SELECT statement. But when i un-comment them, i get an error while activating my program. Error is as follows:
    For pooled tables, cluster tables, and project views, JOIN is not allowed: "KONV".
    Is there a way i can go around it?

    Hi,
    look at this SAP note : 550043
    Symptom
    KEPM: dump 'MESSAGE_TYPE_X' during automatic planning method execution.
    Other terms
    KEPM MESSAGE_TYPE_X transform characteristic value
    Reason and Prerequisites
    This note is related only to cases, if dump 'MESSAGE_TYPE_X' is raising
    during execution of planning method, for which is possible to define
    transformation of characteristics values i.e. Copy, Forecast, Top-Down
    distribution, Ratios and Customer Enhancement.
    Dump is raising in case, if there was defined transformation of char.
    values in parameter set definition for some characteristic. Later on,
    this characteristic was removed from planning level definition but
    characteristic wasn't removed from relevant customizing of transform
    characteristic values before.
    Solution
    Please apply attached program correction.
    Regards,
    GSR.

  • Error by using database procedure in select statement

    hi ,
    I have built a database procedure having one parameter with in out varchar type. that return value with some addition.
    i am using it with some column in select statement only for display purpuses but i am facing error by doing that in select statement. that procedure is working well with bind variable but not with select statement.
    plz help me how i can use a procedure in select statement. or can i do it or not.

    plz help me how i can use a procedure in select statement. or can i do it or not.A workaround could be to create a wrapper function for your procedure. One that only passes the input parameters and returns the output parameter.
    The simply call this function in your select which internally calls the procedure.

  • Getting error after putting variable in select statement

    Hi All,
    Kindly help me with Pl/sql code
    here i'm trying to put variable in select statement ....
    I successfully put the Yr and Mnth ..but getting error for loop variable "i"
    Here i'm getting error that too because of " i" only-->TRIM(UPPER(TO_CHAR(TO_DATE(i||'-'||Mnth||'-'||Yr,'dd-Mon-YYYY'),'DAY')))
    Please find the full code below.
    Declare
    Yr number not null:=2010;
    Mnth varchar2(20) not null:='Jun';
    v_val number:=0;
    begin
    for i in 1..2 loop
    case i
    SELECT count(*) into v_val
    FROM DUAL
    WHERE TRIM(UPPER(TO_CHAR(TO_DATE(i||'-'||Mnth||'-'||Yr,'dd-Mon-YYYY'),'DAY')))
    in (UPPER('Monday'),UPPER('Tuesday'),UPPER('WEDNESDAY'),UPPER('THURSDAY'),UPPER('friday'))
    end case;
    end loop;
    end;

    Declare
      Yr number not null:=2010;
      Mnth varchar2(20) not null:='Jun';
      v_val number:=0;
    begin
      for i in 1..2 loop
      SELECT count(*) into v_val
      FROM DUAL
      WHERE TRIM(UPPER(TO_CHAR(TO_DATE(i||'-'||Mnth||'-'||Yr,'dd-Mon-YYYY'),'DAY')))
      in (UPPER('Monday'),UPPER('Tuesday'),UPPER('WEDNESDAY'),UPPER('THURSDAY'),UPPER('friday'));
    end loop;
    end;

  • Sql Error in Select statement when doing subquery

    Hi,
    I am trying to see what the error is in the subquery part of the select statement.
    Subquery should be fetching the safety_stock_quantity based on the MAX(effectivity_date).
    Any suggestions?
    SELECT kbn.last_update_date,itm.segment1,itm.description,kbn.kanban_card_number,kbn.kanban_size,
                   (SELECT msc.safety_stock_quantity
    FROM mtl_safety_stocks msc
    WHERE msc.effectivity_date = (select MAX(msc2.effectivity_date)
                   from mtl_safety_stocks msc2
                                            where msc2.inventory_item_id = itm.inventory_item_id
                                                 and msc2.organization_id = itm.organization_id)
                   AND msc.inventory_item_id = itm.inventory_item_id
         AND msc.organization_id = itm.organization_id                                        
    FROM mtl_system_items_b itm
    ,mtl_onhand_quantities_detail moqd
              ,mtl_safety_stocks msc
              ,mtl_kanban_card_activity kbn
    WHERE itm.inventory_item_id = kbn.inventory_item_id
    AND itm.organization_id = kbn.organization_id
    AND itm.inventory_item_id = moqd.inventory_item_id
    AND itm.organization_id = moqd.organization_id
    AND moqd.subinventory_code = kbn.source_subinventory
         AND kbn.card_status = 1
         AND kbn.supply_status = 5
         AND msc.inventory_item_id = itm.inventory_item_id
         AND msc.organization_id = itm.organization_id     
    GROUP BY
    kbn.last_update_date,itm.segment1,itm.description,kbn.kanban_card_number,kbn.kanban_size;
    Thanks
    Pravn

    Hi, Pravn,
    Remember the ABC's of GROUP BY:
    When you use a GROUP BY clause and/or an aggregate fucntion, then every item in the SELECT clause must be:
    (A) an <b>A</b>ggregate function,
    (B) one of the "group <b>B</b>y" expressions,
    (C) a <b>C</b>onstant, or
    (D) something that <b>D</b>epends entirely on the above. (For example, if you "GROUP BY TRUNC(dt)", you can "SELECT TO_CHAR (TRUNC(dt), 'Mon-DD')").
    There's a GROUP BY clause in your main query, so every item in the main SELECT clause must be one of the above. The last item, the unnamed scalar sub-query, is none of the above.
    How can you fix this problem? That depends on your data, the results you want, and perhaps on your Oracle version. If you'd like help, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) from all tables involved. Also post the results you want from that data, and an explanation of how you get those results from that data, with specific examples.
    Always say which version of Oracle you're using.
    You may have noticed that this site normally doesn't display multiple spaces in a row.
    Whenever you post formatted text (including, but limited to, actual code) on this site, type these 6 characters:
    \(small letters only, inside curly brackets) before and after each section of formatted text, to preserve spacing.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Maybe you are looking for

  • X79-gd45 (8d) - Windows 7 Pro x64 installation questions

    Hi, I have a MSI X79-GD45(8D) board with i7-3930k processor that I am trying to install Win 7 x64 Pro on.  I have a Sandisk Xtreme 240 SSD that I will be using as a system disk and 2X WD 1TB Black SATA 6GB/s (faex) drives that I will be using in a RA

  • Build 141 overwrites own custom window presets!

    Hello folks, in this release i have recognize the following bug or bad change! Szenario: You create your own Window workaround while save it within a windowpreset. ( I use 3 Monitors, one for preview, one for timeline and one projectwindow ) So on so

  • Header image not appearing

    My jpg header image (RGB) only appears in the web form. I double-checked the color profile. Why is this happening? It's only 250kb file size. I tried putting it inside the header area, and I also tried deleting the header and placing the image below.

  • Temperemental New Tracks on iTunes

    Hi I have a problem with iTunes where any track I import after a certain date (which I think must have been near when I last updated to iTunes 7.5), will only stay in my library for a few times (i.e after 2/3 times of closing and opening iTunes). And

  • Buying Apple TV - Model: MC572C/A Black

    how  much storage dose if come with can fins info on Hd size