Problem with LIKE operator in select query

Hi,
I want to compare one field using LIKE operator. But i m not able to do that.
DATA: l_doctext type c value ''''.
CONCATENATE l_doctext s_lbktxt-low '%' l_doctext INTO s_lbktxt-low.
SELECT bukrs belnr gjahr blart bldat budat xblnr bktxt waers awtyp
            FROM bkpf INTO TABLE g_t_bkpf_labor
            FOR ALL ENTRIES IN g_t_bseg_unique
            WHERE bukrs = g_t_bseg_unique-bukrs
            AND belnr = g_t_bseg_unique-belnr
            AND gjahr = g_t_bseg_unique-gjahr
            AND blart = p_ldtype
            AND bktxt LIKE s_lbktxt-low.
plz help. Am i dng something wrong.
Value in s_lbktxt can be like 'TEA.....'

hi ,
check this program..
tables:mara.
data: begin of it_mara occurs 0,
      matnr like mara-matnr,
      meins like mara-meins ,
      mtart like mara-mtart,
      end of it_mara.
select-options: s_matnr for mara-matnr.
      select matnr
             meins
             mtart
             from mara
             into table it_mara
             where matnr like '%7'.
sort it_mara by matnr.
loop at it_mara.
write:/ it_mara-matnr,
it_mara-meins,
it_mara-mtart.
endloop.
regards,
venkat.

Similar Messages

  • Problem with date format in select query

    Hi
    I am caught by a stupid problem, please help me
    I am writing a queries
    SELECT * FROM VOUCHERS WHERE VDATE = '07-AUG-08'
    SELECT * FROM VOUCHERS WHERE VDATE = '07-AUG-2008'.
    both are working fine in SQL Developer but returning error when called from JDBC Driver.
    First query doesn't return any record while it is supposed to
    Second returns error: ORA-01858: a non-numeric character was found where a numeric was expected
    What i remember, at least second query was working previously but what happend, i dont know
    i didn't change Oracle default datetime format or any other defaults
    Message was edited by:
    W-S

    It is a common issue most people don't realize what Oracle does with a query like this. You're comparing strings to dates. Use TO_DATE to convert your string '07-AUG-08' to a date. If you don't, you tell Oracle to convert the string to a date by itself. It may work sometimes but like you've experienced, it is not a very robust or elegant approach.
    Try something like this:
    SELECT *
    FROM vouchers
    WHERE VDATE = TO_DATE('07-AUG-2008','DD-MON-YYYY').You can even provide a third parameter to TO_DATE, but it's less frequently used. I let you figure it out.
    And a tip: the "urgent" keyword might act against you.

  • A trouble with "LIKE" in a select statement

    Hi!
    I'm having trouble with "LIKE" in a select statement...
    With Access I can make the following and everything works well:
    SELECT name, birthday
    FROM client
    WHERE birthday LIKE '*/02/*';
    but if try to do it in my application (it uses Access), it doesn't work - I just can't understand that!!!
    In my application the "month" is always the currently month taken from the "System". Look what I'm doing...
    String query1 = "SELECT name, birthday " +
              "FROM client " +
              "WHERE birthday " +
              "LIKE '*/" +
              pMonth +
              "/*' " +
              "ORDER BY birthday ASC ";
    ResultSet rs = statement1.executeQuery(consulta1);
    boolean moreRecords = rs.next();
    The variable "moreRecords" is always "false", the query returns nothing although the table "client" has records that attend the query.
    Please, anyone can help me?! It's a little bit urgent.
    Thanks,
    Katia.

    Hi Katia,
    I'll bet the problem lies with the characters you're using to escape the LIKE clause. You're using the ones that Access likes to see, but that's not necessarily what's built into the JDBC-ODBC driver class.
    You can find out what the correct escape wildcard characters are from the java.sql.DatabaseMetaData.getSearchStringEscape() method. It'll tell you what to use in the LIKE clause.
    I'm not 100% sure about your code. It doesn't use query1 anywhere. I'd do this:
    String query = "SELECT name, birthday FROM client WHERE birthday LIKE ? ORDER BY birthday ASC";
    PreparedStatement statement = connection.createStatement(query);
    String escape = connection.getMetaData().getSearchStringEscape();
    String test = escape + '/' + pMonth + '/' + escape;
    statement.setString(1, test);
    ResultSet rs = statement.executeQuery();
    while (rs.hasNext())
    // load your data into a data structure to pass back.
    rs.close();
    statement.close();Let me know if that works. - MOD

  • Error in SQL Query The text, ntext, and image data types cannot be compared or sorted, except when using IS NULL or LIKE operator. for the query

    hi Experts,
    while running SQL Query i am getting an error as
    The text, ntext, and image data types cannot be compared or sorted, except when using IS NULL or LIKE operator. for the query
    select  T1. Dscription,T1.docEntry,T1.Quantity,T1.Price ,
    T2.LineText
    from OQUT T0  INNER JOIN QUT1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN
    QUT10 T2 ON T1.DocEntry = T2.DocEntry where T1.DocEntry='590'
    group by  T1. Dscription,T1.docEntry,T1.Quantity,T1.Price
    ,T2.LineText
    how to resolve the issue

    Dear Meghanath,
    Please use the following query, Hope your purpose will serve.
    select  T1. Dscription,T1.docEntry,T1.Quantity,T1.Price ,
    CAST(T2.LineText as nvarchar (MAX))[LineText]
    from OQUT T0  INNER JOIN QUT1 T1 ON T0.DocEntry = T1.DocEntry LEFT OUTER JOIN
    QUT10 T2 ON T1.DocEntry = T2.DocEntry --where T1.DocEntry='590'
    group by  T1. Dscription,T1.docEntry,T1.Quantity,T1.Price
    ,CAST(T2.LineText as nvarchar (MAX))
    Regards,
    Amit

  • SQL Query With Like Operator - Performance is very poor - Oracle Apps Table

    Hi,
    I'm querying one of the Oracle Applications Standard Table. The performance is very slow when like operator is used in the query condition. The query uses a indexed column in the where clause.
    The query is..
    select * from hz_parties
    where upper(party_name) like '%TOY%'
    In the above case, It is not using the index and doing full table scan. I have checked the explain plan and the cost is 4496.
    select * from hz_parties
    where upper(party_name) like 'TOY%'
    If I remove the '%' at the begining of the string, the performance is good and it is using the index. In this case, the cost is 5.
    Any ideas to improve the performance of the above query. I have to retrieve the records whose name contains the string. I have tried hints to force the use of index. But it is of no use.
    Thanks,
    Rama

    If new indexes are disallowed, not a lot of good ones, no.
    If you know what keyword(s) are going to be searched for, a materialized view might help, but I assume that you're searching based on user input. In that case, you'd have to essentially build your own Text index using materialized views, which will almost certainly be less efficient and require more maintenance than the built-in functionality.
    There may not be much you could do to affect the query plan in a reasonable way. Depending on the size of the table, how much RAM you're willing to throw at the problem, how your system is administered, and what Oracle Apps requires/ prohibits in terms of database configuration, you might be able to force Oracle to cache this table so that your full table scans are at least more efficient.
    Justin

  • Problem with the operator less than or equal to in a weby query

    Hi all.
    The universe is a OLAP Universe
    When i created a query in webi and put the month in the filter area with the operator less than or equal to like this.
    Month (less than or equal to) 2010.01 for example. The all result brings also the all values like 2010.02, 2010.03, etc
    What is the problem and how can fix that ?
    Thanks

    Looks like you are using a less than or equal to with a Sting data type.
    I think you should change to your filter to Year <= 2010 And Month <= 1. Hope you have a month and year object in you BeX.
    Anil

  • Case Insensitive Search coupled with "LIKE" operator.

    Greetings All, I am running Oracle 11gR1 RAC patchet 25 on Windows X64.
    This db supports and application that requires case insensitive searches.
    Because there are a few entry points into the db I created an "after login" trigger:
    CREATE OR REPLACE TRIGGER MyAppAfterLogon_TRGR
    AFTER LOGON
    ON DATABASE
    DECLARE
    vDDL VARCHAR2(200) := 'alter session set nls_comp=''linguistic''';
    vDDL2 VARCHAR2(200) := 'alter session set nls_sort=''binary_ci''';
    BEGIN
    IF ((USER = 'MyAppUSER') OR(USER = 'MyAppREPORTINGUSER')) THEN
    EXECUTE IMMEDIATE vDDL;
    EXECUTE IMMEDIATE vDDL2;
    END IF;
    END MyAppAfterLogon_TRGR;
    This ensures that everyone connecting to the DB via any mechanism will automatically have case insensitive searches.
    Now, to optimize the know queries I created the standard index to support normal matching queries:
    select * from MyTable where Name = 'STEVE';
    The index looks like:
    CREATE INDEX "CONTACT_IDX3 ON MYTABLE (NLSSORT("NAME",'nls_sort=''BINARY_CI'''))
    This all works fine, no issues.
    The problem is when I write a query that uses the "LIKE" operator:
    select * from MyTable where Name like 'STEV%';
    I get back the record set I expect. However, my index is not used? I can't for the life of me get this query to use an index.
    The table has about 600,000 rows and I have run gather schema stats.
    Does anyone know of any issues with case insensitive searches and the "LIKE" clause?
    Any and all help would be appreciated.
    L

    I think there is issue with your logon trigger :
    "IF ((USER = 'MyAppUSER') OR(USER = 'MyAppREPORTINGUSER')) THEN"
    it should be :
    IF UPPER(USER) = 'MYAPPUSER' OR UPPER(USER) = 'MYAPPREPORTINGUSER' THEN
    because user name stored in Upper case. Check and try.
    HTH
    Girish Sharma

  • Problems with Sequence Operator in OWB

    Hi everybody,
    i want to use a sequence in my mapping. Now i have two problems.
    The first problem is the following. When i want to import my sequence (exists on my DB) i can select the sequence in the Selection Window, but when i click on Import i didn't see it in the Design Center, also there is no window which tells me that i have successfully imported the sequence.
    The second problem is, when i drag the Sequence Operator into my Mapping i shows the Selection Window where i have to select the poject and object to bind the operator. But i can't select any object.
    Can anyone help me with my problems and tell me how i can use a Sequence and the Sequence Operator in my Mapping
    Many thanks in advance.
    Greetings

    Hi everyone!
    I'm having a repeated problem with sequences in OWB: I'm filling a TIME table with 1096 rows. Now matter how and when I create the sequence it always starts with 2 instead of 1. Moreover, the last value of the sequence is 1101, when it was supposed to be 1097 or 1098....
    I did achieve the right ouput sometimes, but I must be doing something wrong. Here are the several ways I've tried in OWB:
    1) I've created all the sequences by sql code, in SQL DEVELOPER or PLUS*, and then imported to OWB. Because of being imported, I didn't have to deploy each sequence. Then, I've connected (by drag and drop to the canvas mapping) the sequence I wanted with NEXTVAL (as I always do) attached do TIME_ID of table TIME;
    2) I've dropped and created, several times(as before), the sequences and never had problems..until now. I've also experimented creating, by scratch, the sequences just in OWB and then deploy them in Control Center. After this, deployed the mapping and executed, just like in 1).
    So, the difference lies on how I create the sequences and what are the correct steps to create, deploy (if needed), deploy the map and execute the map.
    This is insain and I really need this to work. I've tried so many ways....
    Could someone PLEASE help me with this? Any thoughts?

  • Problem with IN operator

    I'm having a strange problem when using IN operator in a query. The following query works in one database which is 9i and does not work(not returning any rows) in another database which is 10g.
    select * from <table>
    where <column> IN
    (select <column> from <view>
    where <column> = <value>
    Another thing is if I replace the view with a table the query returns results in 10g. If I replace IN operator with a '=' the query returns results.
    The question is:
    Am i missing any default setting in database level? Why the query did not return any rows when I use view? Any ideas?
    Thanks in advance,

    Hi,
    I agree with Walter.
    REgarfds salim.
    SQL>  create view v_emp as select * from emp;
    View created.
    SQL> select * from v_emp;
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
          7369 SMITH      CLERK           7902 17-DEC-80        800                    20
          7499 ALLEN      SALESMAN        7698 20-FEB-81       1600        300         30
          7521 WARD       SALESMAN        7698 22-FEB-81       1250        500         30
          7566 JONES      MANAGER         7839 02-APR-81       2975                    20
          7654 MARTIN     SALESMAN        7698 28-SEP-81       1250       1400         30
          7698 BLAKE      MANAGER         7839 01-MAY-81       2850                    30
          7782 CLARK      MANAGER         7839 09-JUN-81       2450                    10
          7788 SCOTT      ANALYST         7566 19-APR-87       3000                    20
          7839 KING       PRESIDENT            17-NOV-81       5000                    10
          7844 TURNER     SALESMAN        7698 08-SEP-81       1500          0         30
          7876 ADAMS      CLERK           7788 23-MAY-87       1100                    20
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
          7900 JAMES      CLERK           7698 03-DEC-81        950                    30
          7902 FORD       ANALYST         7566 03-DEC-81       3000                    20
          7934 MILLER     CLERK           7782 23-JAN-82       1300                    10
    14 rows selected.
    SQL>
    SQL> select * from emp
      2  where empno in ( select empno from v_emp);
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
          7369 SMITH      CLERK           7902 17-DEC-80        800                    20
          7499 ALLEN      SALESMAN        7698 20-FEB-81       1600        300         30
          7521 WARD       SALESMAN        7698 22-FEB-81       1250        500         30
          7566 JONES      MANAGER         7839 02-APR-81       2975                    20
          7654 MARTIN     SALESMAN        7698 28-SEP-81       1250       1400         30
          7698 BLAKE      MANAGER         7839 01-MAY-81       2850                    30
          7782 CLARK      MANAGER         7839 09-JUN-81       2450                    10
          7788 SCOTT      ANALYST         7566 19-APR-87       3000                    20
          7839 KING       PRESIDENT            17-NOV-81       5000                    10
          7844 TURNER     SALESMAN        7698 08-SEP-81       1500          0         30
          7876 ADAMS      CLERK           7788 23-MAY-87       1100                    20
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
          7900 JAMES      CLERK           7698 03-DEC-81        950                    30
          7902 FORD       ANALYST         7566 03-DEC-81       3000                    20
          7934 MILLER     CLERK           7782 23-JAN-82       1300                    10
    14 rows selected.
    SQL>

  • Problem with LIKE parameter in SQL

    Hi there,
    I got some problem trying to execute a query. Mainly the idea is that the user can choose the itemcode or part of it, thats why I use the Like operator. I try different way of using the LIKE operator,based on other topic, but still I don't get out.
    I post my query, hoping that somebody can help me (the LIKE Clause you see is one of the last I tried)
    SELECT DISTINCT ItemCode,
         (CASE WHEN WhsCode = '01' THEN (OnHand-IsCommited+OnOrder) ELSE 0 END) AS DispMag01,
         (CASE WHEN WhsCode = '02' THEN (OnHand-IsCommited+OnOrder) ELSE 0 END) AS DispMag02,
         (CASE WHEN WhsCode = '03' THEN (OnHand-IsCommited+OnOrder) ELSE 0 END) AS DispMag03,
         (CASE WHEN WhsCode = '04' THEN (OnHand-IsCommited+OnOrder) ELSE 0 END) AS DispMag04
    FROM OITW  WHERE(OnHand-IsCommited+OnOrder)>0 AND ItemCode Like '%%' + '[%itemC]' + '%%' ORDER BY ItemCode
    Waiting for your kind reply
    Rgds
    Roberto

    I think that itemc is some variable. You should creaqte the string of query as
    SELECT DISTINCT ItemCode,
         (CASE WHEN WhsCode = '01' THEN (OnHand-IsCommited+OnOrder) ELSE 0 END) AS DispMag01,
         (CASE WHEN WhsCode = '02' THEN (OnHand-IsCommited+OnOrder) ELSE 0 END) AS DispMag02,
         (CASE WHEN WhsCode = '03' THEN (OnHand-IsCommited+OnOrder) ELSE 0 END) AS DispMag03,
         (CASE WHEN WhsCode = '04' THEN (OnHand-IsCommited+OnOrder) ELSE 0 END) AS DispMag04
    FROM OITW  WHERE(OnHand-IsCommited+OnOrder)>0 AND ItemCode Like '%' + itemC + '%' ORDER BY ItemCode
    the string at the end should be like
    SELECT DISTINCT ItemCode,
         (CASE WHEN WhsCode = '01' THEN (OnHand-IsCommited+OnOrder) ELSE 0 END) AS DispMag01,
         (CASE WHEN WhsCode = '02' THEN (OnHand-IsCommited+OnOrder) ELSE 0 END) AS DispMag02,
         (CASE WHEN WhsCode = '03' THEN (OnHand-IsCommited+OnOrder) ELSE 0 END) AS DispMag03,
         (CASE WHEN WhsCode = '04' THEN (OnHand-IsCommited+OnOrder) ELSE 0 END) AS DispMag04
    FROM OITW  WHERE(OnHand-IsCommited+OnOrder)>0 AND ItemCode Like '%part_of_code%' ORDER BY ItemCode
    hope it helps

  • Problem with delete operation

    Hi all,
    Jdev version(11.1.1.3.0)
    I have a <af:table> with a check box.I can select the rows
    by checking check box and delete those rows.
    Sometimes am facing a problem in deleteing the rows.
    The viewobject that binded to the table,is based on two
    Entity Objects A&B.The table B has no primary key field.But
    it has a dynamic row_id as key fileld.
    The problem is am not able to filter
    the query results,when I select dynamic "Row_Id" in the select
    query,I can't filter the records.(In the VO if I unselect the ROW_Id,
    got an error like"Row_id missing in the view oject")Because of
    this issue am not able to delete the records.Due to
    this problem,delete works only in random.
    Please share the ideas..
    Thanks
    Swapna

    Try selecting a different attribute for EntityB as a key field

  • Strange results with Insert statement having select query

    Hi all,
    I am facing a strange issue with Insert statement based on a select query having multiple joins.
    DB- Oracle 10g
    Following is the layout of my query -
    Insert into Table X
    Select distinct Col1, Col2, Col3, Col4, Function(Col 5) from Table A, B
    where trunc(updated_date) > = trunc(sysdate-3)
    and join conditions for A, B
    Union
    Select Col1, Col2, Col3, Col4, Function(Col 5) from Table C, D
    trunc(updated_date) > = trunc(sysdate-3)
    and join conditions for C, D
    Union
    .... till 4 unions. all tables are residing in the local Database and not having records more than 50,000.
    If I execute above insert in a DBMS job, it results into suppose 50 records where as if I execute the select query it gives 56 records.
    We observed following things-
    a) no issue with size of tablespace
    b) no error while inserting
    c) since query takes lot of time so we have not used Cursor and PLSQL block for inserting.
    d) this discrepancy in number of records happens frequently but not everytime.
    e) examined the records left out from the insert, there we couldn't find any specific pattern.
    f) there is no constraint on the table X in which we are trying to insert. Also tables A, B, C....
    I went through this thread -SQL insert with select statement having strange results but mainly users are having either DB Links or comparison of literal dates, in my case there is none.
    Can somebody explain why is the discrepancy and what is the solution for it.
    Or atleast some pointers how to proceed with the analysis.
    Edited by: Pramod Verma on Mar 5, 2013 4:59 AM
    Updated query and added more details

    >
    Since I am using Trunc() in the where clause so timing should not matter much. Also I manually ruled out records which were updated after the job run.
    >
    The first rule of troubleshooting is to not let your personal opinion get in the way of finding out what is wrong.
    Actually this code, and the process it represents, is the most likely CAUSE of the problem.
    >
    where trunc(updated_date) > = trunc(sysdate-3)
    >
    You CANNOT reliably use columns like UPDATED_DATE to select records for processing. Your process is flawed.
    The value of that column is NOT the date/time that the data was actually committed; it is the date/time that the row was populated.
    If you insert a row into a table right now, using SYSDATE (8am on 3/5/2013) and don't commit that row until April your process will NEVER see that 3/5/2013 date until April.
    Here is the more typical scenario that I see all the time.
    1. Data is inserted/updated all day long on 3/4/2013.
    2. A column, for example UPDATED_DATE is given a value of SYSDATE (3/4/2013) in a query or by a trigger on the table.
    3. The insert/update query takes place at 11:55 PM - so the SYSDATE values are for THE DAY THE QUERY BEGAN
    4. The data pull begins at 12:05 am (on 3/5/2013 - just after midnight)
    5. The transaction is COMMITTED at 12:10 AM (on 3/5/2013); 5 minutes after the data pull began.
    That data extract in step 4 will NEVER see those records! They DO NOT EXIST when the data pull query is executed since they haven't been committed.
    Even worse, the next nights data pull will not see them either! That is because the next pull will pull data for 3/5/2013 but those records have a date of 3/4/2013. They will never get processed.
    >
    Job timing is 4am and 10pm EST
    >
    Another wrinkle is when data is inserted/updated from different timezones and the UPDATED_DATE value is from the CLIENT pc or server. Then you can get even more data missed since the client dates may be hours different than the server date used for the data pull process.
    DO NOT try to use UPDATED_DATE type columns to do delta extraction or you can have this issue.

  • Problem with checkbox in the selection screen

    Hi guys,
    I have a problem with the check box in the selection screen.When i select a check box then a field in the selection screen should be enabled for entering a value.Again if i unselect the checkbox then the field should be disabled for entering a value.I have written the code in at selection-screen output.
    The problem is when i select the check box ,the field is not enabled.But when i press enter after selecting the checkbox then the field is enabled for input.It is the same when i unselect the checkbox,after i press enter only the field is getting disabled.What could be the problem.Any suggestions please?
    Thanks.

    Hi d p
                 Please try this code . I think this code have some way that you would like.
    REPORT  zdownload_to_application_server.
    TABLES : caufvd, jest.
    I N C L U D E  P R O G R A M                                        *
    *INCLUDE znrpstnd.
    Selection Screen                                                    *
    SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-t03.
    PARAMETERS: p_outb RADIOBUTTON GROUP g1 USER-COMMAND outb DEFAULT 'X' ,
                p_inb RADIOBUTTON GROUP g1.
    SELECTION-SCREEN END OF BLOCK b3.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-t01.
    PARAMETERS : p_werks LIKE caufvd-werks MODIF ID a.        " Plant   "OBLIGATORY
    SELECT-OPTIONS  :  s_auart FOR caufvd-auart MODIF ID a,       " Order Type
                       s_aufnr FOR caufvd-aufnr MODIF ID a.       " Order number
    PARAMETERS: p_path TYPE string DEFAULT 'C:\SchedulerInterface-OutboundTextFile\' MODIF ID a,
                p_actual AS CHECKBOX MODIF ID a.                  " Transfer Actual
    SELECTION-SCREEN END OF BLOCK b1.
    SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-t02.
    PARAMETERS : p_werks2 LIKE caufvd-werks MODIF ID b,   " Plant   "OBLIGATORY
                 p_path2 TYPE string DEFAULT 'C:\SchedulerInterface-InboundTextFile\' MODIF ID b,
                 p_path3 TYPE string DEFAULT 'C:\SchedulerInterface-InboundTextFile\' MODIF ID b,
                 p_sessio TYPE apqi-groupid MODIF ID b.   " BDC Session
    SELECTION-SCREEN END OF BLOCK b2.
    AT SELECTION-SCREEN OUTPUT.
      IF p_outb EQ 'X'.   " Outbound --> Hide inbound
        LOOP AT SCREEN.
          "IF screen-name = '%BT02011_BLOCK_1000'.
          IF screen-group2 = 'BLK'.
            screen-active = 1.
            MODIFY SCREEN.
          ENDIF.
          IF screen-group1 = 'A'.
            screen-active = 1.
            MODIFY SCREEN.
          ENDIF.
          IF screen-group1 = 'B'.
            screen-active = 0.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ELSE.
        LOOP AT SCREEN.
          "IF screen-name = '%BT01004_BLOCK_1000'.
          IF screen-group3 = 'BLK'.
            screen-active = 1.
            MODIFY SCREEN.
          ENDIF.
          IF screen-group1 = 'A'.
            screen-active = 0.
            MODIFY SCREEN.
          ENDIF.
          IF screen-group1 = 'B'.
            screen-active = 1.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ENDIF.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_path2.
      CALL FUNCTION 'WS_FILENAME_GET'
        EXPORTING
          def_path         = 'C:\SchedulerInterface-InboundTextFile\'
          mask             = ',Text Files,.txt,All files,.*.'
        IMPORTING
          filename         = p_path2
        EXCEPTIONS
          inv_winsys       = 1
          no_batch         = 2
          selection_cancel = 3
          selection_error  = 4
          OTHERS           = 5.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_path3.
      CALL FUNCTION 'WS_FILENAME_GET'
        EXPORTING
          def_path         = 'C:\SchedulerInterface-InboundTextFile\'
          mask             = ',Text Files,.txt,All files,.*.'
        IMPORTING
          filename         = p_path3
        EXCEPTIONS
          inv_winsys       = 1
          no_batch         = 2
          selection_cancel = 3
          selection_error  = 4
          OTHERS           = 5.
    TOP-OF-PAGE.
    START-OF-SELECTION.
    Regards
    Wiboon

  • Problem with hierarchy variable while displaying query in Portal

    Hi,
    I came up with an problem with a query in the portal.  The problem is :
    I have one query which is displayed in the portal. The Query has hierarchial selection criteria. I am executing the same query using analyzer. Its taking the variable from the selection and displaying it on the analyzer. I have used the option to " display the query on web " from the BEX query designer. From there its opening and displaying the results with the given selection criteria.
    Where as when i open the query seperately in portal, its not displaying the results.
    I came to know from one of my colleague that the porblem is with the Web item and the hierarchial variable declared in WAD  was different from the variable declared in the BEX Query designer.
    I never Worked with WAD. I tried finding out the variable definition. But i was unable to find out where the Hierarchial variable was defined.
    Please help me out regarding the same.

    The problem is sovled.
    Poornima.

  • Issue with like operator

    Hi All,
    we are using like operator for search functionality (oracle 10G).
    could any one help me in handling null, when we use like operator.
    Ex:
    select empno,ename,d.deptno
    from emp e, dept d
    where e.deptno = d.deptno
    and e.ename like '%JO%';
    we have a text box in the front end to key in employee name (ename) or part of ename. when user doesnt use this option, he leaves it blank.
    so In the above query, if ename is null then my query fails.
    could anybody help me out in handling this scenario.
    My query should still give me all the employee ids, if the ename is blank.
    using dynamic sql is not advisable.
    Thanks
    Manju

    Something like this ->
    satyaki>select *
      2     from v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Prod
    PL/SQL Release 10.2.0.3.0 - Production
    CORE    10.2.0.3.0      Production
    TNS for 32-bit Windows: Version 10.2.0.3.0 - Production
    NLSRTL Version 10.2.0.3.0 - Production
    Elapsed: 00:00:00.26
    satyaki>
    satyaki>
    satyaki>select *
      2  from emp
      3  where upper(ename) like nvl('%'||upper('&str')||'%',upper(ename));
    Enter value for str:
    old   3: where upper(ename) like nvl('%'||upper('&str')||'%',upper(ename))
    new   3: where upper(ename) like nvl('%'||upper('')||'%',upper(ename))
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
          9999 SATYAKI    SLS             7698 02-NOV-08      55000       3455         10
          7777 SOURAV     SLS                  14-SEP-08      45000       3400         10
          7521 WARD       SALESMAN        7698 22-FEB-81       1250        500         30
          7566 JONES      MANAGER         7839 02-APR-81       2975                    20
          7654 MARTIN     SALESMAN        7698 28-SEP-81       1250       1400         30
          7698 BLAKE      MANAGER         7839 01-MAY-81       2850                    30
          7782 CLARK      MANAGER         7839 09-JUN-81       4450                    10
          7788 SCOTT      ANALYST         7566 19-APR-87       3000                    20
          7839 KING       PRESIDENT            17-NOV-81       7000                    10
          7844 TURNER     SALESMAN        7698 08-SEP-81       1500          0         30
          7876 ADAMS      CLERK           7788 23-MAY-87       1100                    20
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
          7900 JAMES      CLERK           7698 03-DEC-81        950                    30
          7902 FORD       ANALYST         7566 03-DEC-81       3000                    20
    13 rows selected.
    Elapsed: 00:00:00.02
    satyaki>
    satyaki>/
    Enter value for str: sa
    old   3: where upper(ename) like nvl('%'||upper('&str')||'%',upper(ename))
    new   3: where upper(ename) like nvl('%'||upper('sa')||'%',upper(ename))
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
          9999 SATYAKI    SLS             7698 02-NOV-08      55000       3455         10
    Elapsed: 00:00:00.08Regards.
    Satyaki De.

Maybe you are looking for

  • Can not find stock index in the stock app

    I tried to find stock index like BZH15.NYM in the stock app, but search reterns nothing. Can anyone help?

  • Payment History information Not in Worklist details

    Hi, Can anybody tell me how i can update the payment history information in the worklist details? In the separate tab. Somehow the information is not coming to FSCM. Do i need to enhance a badi? Regards, Richard Edited by: R. Gentenaar on Aug 19, 201

  • The lines I create with the pen tool are not showing up in After Effects.

    I'm working on a project where I need straight lines. I've added the lines using the pen tool on solid layers, but they are not showing up before or after rendering. I can see where they are supposed to be when I isolate the layer they are on. I have

  • Keynote 6.0 Video not playing (export to Quicktime)

    I have a presentation with a few embeded videos.  No matter what I do, they videos will not play when exporting the presentation to Quicktime.  The same presentation in Keynote '09, export to Quicktime works without issue.  Has anyone had similar iss

  • IPhone 3.0: also syncs Notes to MS Outlook?

    It has been announced that the iPhone 3.0 software will (finally...) be able to sync notes, but will it be limited to iCal's notes ? Or will it also sync with MS Outlook on PC, like it already does for contacts and calendar infos? Any hint is welcome