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.

Similar Messages

  • 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

  • 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

  • Performance Tuning 'Runtime Error' on Select statement

    Hi Experts,
    Good Day!
    I would like to ask some help regarding a custom program that will encounter 'Runtime Error' on the below codes on how to perform performance tunning especially number 1.
    1.
    SELECT A~VBELN A~ERDAT A~AUART A~VKORG A~VTWEG A~SPART A~VDATU
             A~KUNNR B~POSNR B~MATNR B~ARKTX B~ABGRU B~KWMENG B~VRKME
             B~WERKS B~VSTEL B~ROUTE
          FROM VBAK AS A INNER JOIN VBAP AS B ON A~VBELN EQ B~VBELN
                         INNER JOIN VBEP AS C ON A~VBELN EQ C~VBELN
                           AND B~POSNR EQ C~POSNR
            INTO CORRESPONDING FIELDS OF TABLE I_DATA_TAB
              WHERE A~VBELN  IN S_VBELN
                AND A~VKORG  IN S_VKORG
                AND A~AUART  IN S_AUART
                AND A~VTWEG  IN S_VTWEG
                AND A~SPART  IN S_SPART
                AND A~VDATU  IN S_VDATU
                AND A~KUNNR  IN S_KUNNRD
                AND B~MATNR  IN S_MATNR
                AND B~KWMENG IN S_KWMENG
                AND B~VRKME  IN S_VRKME
                AND B~WERKS  IN S_WERKS
                AND C~EDATU  IN S_VDATU.
    2.
    SELECT VBELN FROM LIKP INTO LIKP-VBELN
                  WHERE LFDAT IN S_VDATU
                    AND VKORG IN S_VKORG
                    AND LFART EQ 'YSTD'
                    AND KUNNR IN S_KUNNRP
                    AND KUNAG IN S_KUNNRD
        SELECT VBELN POSNR LFIMG MATNR WERKS
           FROM LIPS INTO (LIPS-VBELN, LIPS-POSNR, DISPLAY_TAB-DEL_QTY,
                           LIPS-MATNR, LIPS-WERKS)
                 WHERE VBELN EQ LIKP-VBELN
                   AND MATNR IN S_MATNR
                   AND VTWEG IN S_VTWEG
                   AND SPART IN S_SPART
                   AND WERKS IN S_WERKS.   
         ENDSELECT.
      ENDSELECT.
    4.
    SELECT DELIVERY POSNR MATNR PODLFIMG FROM T9YPODI INTO
        (T9YPODI-DELIVERY, T9YPODI-POSNR, T9YPODI-MATNR, T9YPODI-PODLFIMG)
                           WHERE MATNR   IN S_MATNR
                             AND PODDATE IN S_VDATU.
    Answer's will be a great help.
    ~Thank You,
      Lourd
    Edited by: Lourd06 on Oct 23, 2009 10:32 AM
    Moderator message - Welcome to SCN.
    Moderator message - Please see Please Read before Posting in the Performance and Tuning Forum before posting. You're in the driver's seat here. It's up to you to do some analysis before expecting that people can halp you. - post locked
    And please use code tags.
    Edited by: Rob Burbank on Oct 23, 2009 9:13 AM

    Hi All,
    We've checked the transaction ST22 it is TIME OUT. I really need your help on this the program will dump in number 1 Select statement. Can you help me perform a performance tunning.
    In transaction ST22
    Runtime Errors         TIME_OUT
    Date and Time          21.10.2009 08:51:33
    Short text
         Time limit exceeded.
    What happened?
         The program "ZV0PSR10" has exceeded the maximum permitted runtime without
         interruption and has therefore been terminated.
    What can you do?
         Note down which actions and inputs caused the error.
         To process the problem further, contact you SAP system
         administrator.
         Using Transaction ST22 for ABAP Dump Analysis, you can look
         at and manage termination messages, and you can also
         keep them for a long time.
    Error analysis
         After a specific time, the program is terminated to make the work area
         available to other users who may be waiting.
         This is to prevent a work area being blocked unnecessarily long by, for
         example:
         - Endless loops (DO, WHILE, ...),
         - Database accesses with a large result set
         - Database accesses without a suitable index (full table scan)
         The maximum runtime of a program is limited by the system profile
         parameter "rdisp/max_wprun_time". The current setting is 1200 seconds. If this
          time limit is
         exceeded, the system attempts to cancel any running SQL statement or
         signals the ABAP processor to stop the running program. Then the system
         waits another 60 seconds maximum. If the program is then still active,
         the work process is restarted.
    ~Thank you
    Lourd
    Edited by: Lourd06 on Oct 23, 2009 11:22 AM
    Edited by: Lourd06 on Oct 23, 2009 11:33 AM

  • 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;

Maybe you are looking for

  • Scheduling InfoPackage fails to start extract in R/3

    Hi, We are extracting data from CO-PA using the delta infosource. We initialised the Delta successfully (without data transfer) and have now scheduled our infopackage to extract data from R/3. When we go to monitor, it tells us that the "Request is s

  • How to add -Select- as the first value in dropdownbox?

    Hi All, I am having a dropdownbox with the set of values. I need to add -SELECT- as the first and default value. Please do advise how to achieve this. Code and screenshot below. var oModel = new sap.ui.model.odata.ODataModel("../../services/admin/typ

  • Select in View doesn't works

    Somebody knows why a fine select in sqlplus doesn't work when i create view based in fine select ?... Thanks ...

  • Video streaming issue after Kitkat upgrade

    After updating all my media streaming (Hulu, Netflix, HBO Go, Xfinity, YouTube) in HD or higher quality is choppy/jittery either OTA or WiFi. If I change it to lower quality all video plays without issue. I've done a complete device reset three times

  • Error when trying to install oracle8.0.6 through network

    we made a copy of the oracle8 enterprise edition from CD-rom to our network drive. But an error appears when we try to install via this network copy,"Error opening ...\Oracle8.0.6\win32\odbc32\ODBCINST.CNT, ...\Oracle8.0.6\win32\odbc32\ODBCINST.CNT C