Fetching Records Based on Condition

hi all,
i am having some problem in getting the records from three tables.could anybody there to help me out of this.....
there are three tables SUB,TICKETS and INDTICKETS.
In the first table SUB(master table)which contains the masters.
In the second table TICKET(detail table) which contains the tickets belongs to the subscriber in the master(SUB)table.
So if we want to see the tickets(2 each) of one subscriber belongs to which routeid we can combine the 2 tables and get it since routeid is in the SUB master table.
Sometimes all tickets wouldnt belongs to the same routeid whatever specified in the SUB master.So i created the another INDTICKET table which will save the routeid ticketid wise.So the INDTICKET Table will contains tickets which are only having routeid is been changed.
DESC SUB
SUBNO SUBNAME ROUTEID
1 SMITH 01
2 SCOTT 02
DESC TICKETS
SUBNO TICKETID AMOUNT
1 01 1000
1 02 2000
2 09 4000
2 10 7000
DESC INDTICKET
SUBNO TICKETID ROUTEID
1 02 02
2 10 01
Now i need a query which will fetch only the tickets
1 . belongs to 01 routeid in the SUB master table and not in the INDTICKET table of other routeid
2 . and the ticketid belongs to the 01 routeid in the INDTICKET table.
So from the above example the query should fetch like this
=== Tickets in routeid '01' ===
SUBNO SUBNAME TICKETID AMOUNT
1 SMITH 01 1000
2 SCOTT 10 7000
thanks in advance
regrds,
punith

In the future, it would be much more helpful if you could post the DDL to create and populate these tables instead of DESC and query output. It would greatly increase the chances of having your question answered.
I would probably have put the routeid override as an additional column in the tickets table instead of creating a new table just for the override, but with your current layout:
sql>select * from sub;
    SUBNO SUBNAME                          ROUTEID
        1 Smith                                  1
        2 Scott                                  2
2 rows selected.
sql>select * from tickets;
    SUBNO  TICKETID    AMOUNT
        1         1      1000
        1         2      2000
        2         9      4000
        2        10      7000
4 rows selected.
sql>select * from indticket;
    SUBNO  TICKETID   ROUTEID
        1         2         2
        2        10         1
2 rows selected.
sql>select s.subno, s.subname, t.ticketid, t.amount
  2    from sub s, tickets t
  3   where s.routeid = 1
  4     and t.subno = s.subno
  5     and not exists (select null
  6                       from indticket it
  7                      where it.subno = s.subno
  8                        and it.ticketid = t.ticketid)
  9  union all
10  select s.subno, s.subname, it.ticketid, t.amount
11    from indticket it, sub s, tickets t
12   where it.routeid = 1
13     and s.subno = it.subno
14     and t.subno = s.subno
15     and t.ticketid = it.ticketid;                       
    SUBNO SUBNAME                         TICKETID    AMOUNT
        1 Smith                                  1      1000
        2 Scott                                 10      7000
2 rows selected.

Similar Messages

  • Retrive records based on condition

    HI,
    Need some clarification on getting the records based on the condition given.
    Here is my requirement. I have developed a function module to search the records based on some input given. For suppose i get some around 10000 records for this condition. Now i need the output records in multiples.
    Like first i execute the FM based on the some condition and i should get 100 records as output and the second time i execute the FM with the same search condition i need to get the records from 101 to 200 and the third time i execute and so on.
    Is there any way of fetching the records in multiles for the same search criteria. If so can anyone let me know hot to do the same.
    Thanks in advance.
    Regards,
    Ram

    HI Ram
    Please check this example to get some idea:
    tables: vbak.
    data: it_vbak type table of vbak,
          wa_vbak1 type vbak,
          wa_vbak2 type vbak.
    data: lin type i.
    select-options: s_erdat for vbak-erdat obligatory.
    select * into table it_vbak from vbak
           package size 10
           where erdat in s_erdat.
           describe table it_vbak lines lin.
           read table it_vbak into wa_vbak1 index 1.
           read table it_vbak into wa_vbak2 index lin.
           break-point.
    endselect.
    Check the entries in IT_VBAK whenever the break-point is reached. You will have a fresh set of entries for every collection.
    Hope this gives you some idea.
    Kind Regards
    Eswar

  • Delete duplicate records based on condition

    Hi Friends,
    I am scratching my head as how to select one record from a group of duplicate records based upon column condition.
    Let's say I have a table with following data :
    ID   START_DATE   END_DATE    ITEM_ID     MULT    RETAIL            |                      RETAIL / MULT
    1     10/17/2008   1/1/2009     83     3     7                 |                            2.3333
    2     10/17/2008   1/1/2009     83     2     4                 |                            2
    3     10/17/2008   1/1/2009     83     2     4                 |                            2
    4     10/31/2008   1/1/2009     89     3     6                 |                            2
    5     10/31/2008   1/1/2009     89     4     10                |                            2.5
    6     10/31/2008   1/1/2009     89     4     10                |                            2.5
    7     10/31/2008   1/1/2009     89     6     6                 |                            1
    8     10/17/2008   10/23/2008     124     3     6                 |                            2From the above records the rule to identify duplicates is based on START_DATE,+END_DATE+,+ITEM_ID+.
    Hence the duplicate sets are {1,2,3} and {4,5,6,7}.
    Now I want to keep one record from each duplicate set which has lowest value for retail/mult(retail divided by mult) and delete rest.
    So from the above table data, for duplicate set {1,2,3}, the min(retail/mult) is 2. But records 2 & 3 have same value i.e. 2
    In that case pick either of those records and delete the records 1,2 (or 3).
    All this while it was pretty straight forward for which I was using the below delete statement.
    DELETE FROM table_x a
          WHERE ROWID >
                   (SELECT MIN (ROWID)
                      FROM table_x b
                     WHERE a.ID = b.ID
                       AND a.start_date = b.start_date
                       AND a.end_date = b.end_date
                       AND a.item_id = b.item_id);Due to sudden requirement changes I need to change my SQL.
    So, experts please throw some light on how to get away from this hurdle.
    Thanks,
    Raj.

    Well, it was my mistake that I forgot to mention one more point in my earlier post.
    Sentinel,
    Your UPDATE perfectly works if I am updating only NEW_ID column.
    But I have to update the STATUS_ID as well for these duplicate records.
    ID   START_DATE   END_DATE    ITEM_ID     MULT    RETAIL    NEW_ID   STATUS_ID |   RETAIL / MULT
    1     10/17/2008   1/1/2009     83     3     7         2         1      |     2.3333
    2     10/17/2008   1/1/2009     83     2     4                                |     2
    3     10/17/2008   1/1/2009     83     2     4           2         1      |     2
    4     10/31/2008   1/1/2009     89     3     6           7         1      |     2
    5     10/31/2008   1/1/2009     89     4     10          7         1      |     2.5
    6     10/31/2008   1/1/2009     89     4     10          7         1      |     2.5
    7     10/31/2008   1/1/2009     89     6     6                            |     1
    8     10/17/2008   10/23/2008     124     3     6                            |     2So if I have to update the status_id then there must be a where clause in the update statement.
    WHERE ROW_NUM = 1
      AND t2.id != t1.id
      AND t2.START_DATE = t1.START_DATE
      AND t2.END_DATE = t1.END_DATE
      AND t2.ITEM_ID = t1.ITEM_IDInfact the entire where_ clause in the inner select statement must be in the update where clause, which makes it totally impossible as T2 is persistent only with in the first select statement.
    Any thoughts please ?
    I appreciate your efforts.
    Definitely this is a very good learning curve. In all my experience I was always writing straight forward Update statements but not like this one. Very interesting.
    Thanks,
    Raj.

  • Retrieve records based on condition from xml using XPATH

    Hi all,
    I have a table form_content where there are two columns - form_content_id (numeric) and xml_content (clob). The structure of xml_content is
    <RAF xmlns="http://www.abnamro.com/WCS/GCEG/KRT">
    <XBorderRAF>
    <ClientProfile isBranch="1" isBusinessAddressDifferent="1" isSubsidiary="0" regDate="2009-09-01">
    <RegisteredAddress city="test" country="GB" nameOfContactPerson="3454545" street1="test" telephoneNumber="34534545"/>
    </ClientProfile>
    </XBorderRAF>
    </RAF>
    I want to retrive all form_contant_id from form_content table where country is 'GB' inside RegisteredAddress tag.
    I am able to retrive all form_content_id with country value using below query,
    SELECT form_content_id,
    extractValue(xmltype(xml_content),'/RAF/XBorderRAF/ClientProfile/RegisteredAddress/@country', 'xmlns="http://www.abnamro.com/WCS/GCEG/KRT"')
    as registerAddress
    from
    form_content
    but I am finding it difficult to reterive records based on any condition..
    SELECT form_content_id,
    extractValue(xmltype(xml_content),'/RAF/XBorderRAF/ClientProfile/RegisteredAddress/@country', 'xmlns="http://www.abnamro.com/WCS/GCEG/KRT"')
    as registerAddress
    from
    form_content
    where
    (extractValue(xmltype(xml_content),'/RAF/XBorderRAF/ClientProfile/RegisteredAddress/@country', 'xmlns="http://www.abnamro.com/WCS/GCEG/KRT"')='GB'
    Please help me to resolve this problem. ....
    Thanks

    Ok, thaks to all who looked this query, I found the answer
    select form_content_id
    from xmltest
    where existsnode(xmltype(xml_content), '/RAF/XBorderRAF/ClientProfile/RegisteredAddress[@country="GB"]','xmlns="http://www.abnamro.com/WCS/GCEG/KRT"') = 1;

  • Distinct records based on condition within a table

    Hello PL/SQL Gurus/experts,
    I am using Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production version
    I have following table -
    Note - Table don't have any primary key on Order_ID -
    DROP TABLE T;
    create table T(Order_ID,Active_Flg) as select
    '201002', 'Y' from dual union all select
    '201002', '' from DUAL union all select
    '201003', '' from dual union all select
    '201004', 'Y' from DUAL union all select
    '201004', '' from dual union all select
    '201005', '' from DUAL ;I want to fetch those Order_ID which have Active-Flg as NULL and don't have the entry for Active_Flg=Y
    If use the following then it returns the distinct Order_ID but not the expected one -
    SELECT DISTINCT ORDER_ID FROM T WHERE ACTIVE_FLG IS NULL;Result -
    ORDER_ID
    201004
    201002
    201003
    201005Kindly help.....

    try this
    with t as
    select
    '201002' order_id, 'Y' active_flg from dual union all select
    '201002', '' from DUAL union all select
    '201003', '' from dual union all select
    '201004', 'Y' from DUAL union all select
    '201004', '' from dual union all select
    '201005', '' from DUAL
    select order_id
      from (
              select
                order_id,
                active_flg,
                count(case when active_flg =  'Y' then 1 end) over(partition by order_id) cntY
              from t
    where cntY = 0 and active_flg is null

  • Select the record based count condition

    Hi Experts
    I have a table with columns  StateDate,State,Name & Type . For the same date there could be 2 or more rows for the same name .
    I need to retrieve the data from the table only for the name containing single row in the table and state = 'On'
    Please find the Create & Insert Scripts below . Am assuming it needs to be done with a window function and am not yet comfortable with window function .
    CREATE TABLE ItemState
    (StateDate Date,
    State Varchar(3),
    Name Varchar(3),
    Type int)
    INSERT INTO Itemstate (Statedate,State,Name,Type)
    Values ('3/11/2014','On','XYZ',1)
    INSERT INTO Itemstate (Statedate,State,Name,Type)
    Values ('3/11/2014','Off','XYZ',1)
    INSERT INTO Itemstate (Statedate,State,Name,Type)
    Values ('3/11/2014','On','ABC',1)
    INSERT INTO Itemstate (Statedate,State,Name,Type)
    Values ('3/12/2014','Off','CBR',1)
    INSERT INTO Itemstate (Statedate,State,Name,Type)
    Values ('3/12/2014','On','CBR',1)
    INSERT INTO Itemstate (Statedate,State,Name,Type)
    Values ('3/12/2014','On','XYZ',1)
    Expected Result
    StateDate
    State
    Name
    Type
    3/11/2014
    ON
    ABC
    1
    3/12/2014
    ON
    XYZ
    1
    Kindly help
    Thanks
    Priya

    INSERT INTO Itemstate (Statedate,State,Name,Type)
    Values ('3/11/2014','On','XYZ',1)
    INSERT INTO Itemstate (Statedate,State,Name,Type)
    Values ('3/11/2014','Off','XYZ',1)
    INSERT INTO Itemstate (Statedate,State,Name,Type)
    Values ('3/11/2014','On','ABC',1)
    INSERT INTO Itemstate (Statedate,State,Name,Type)
    Values ('3/12/2014','Off','CBR',1)
    INSERT INTO Itemstate (Statedate,State,Name,Type)
    Values ('3/12/2014','On','CBR',1)
    INSERT INTO Itemstate (Statedate,State,Name,Type)
    Values ('3/12/2014','On','XYZ',1)
    again adding this 3 rows 
    INSERT INTO Itemstate (Statedate,State,Name,Type)
    Values ('3/11/2014','On','XYZ',1)
    INSERT INTO Itemstate (Statedate,State,Name,Type)
    Values ('3/11/2014','Off','XYZ',1)
    INSERT INTO Itemstate (Statedate,State,Name,Type)
    Values ('3/11/2014','On','ABC',1)
    SELECT *
    FROM   itemstate order by statedate, name,state
    2014-03-11 On
    ABC 1
    2014-03-11 On
    ABC 1
    2014-03-11 Off
    XYZ 1
    2014-03-11 Off
    XYZ 1
    2014-03-11 On
    XYZ 1
    2014-03-11 On
    XYZ 1
    2014-03-12 Off
    CBR 1
    2014-03-12 On
    CBR 1
    2014-03-12 On
    XYZ 1
    so only xyz on 2014-03-12 will qualify
    WITH test
         AS (SELECT *,
                    row_number()
                      OVER (
                        partition BY statedate, name
                        ORDER BY state ASC) rnasc, 
    count(state)
                      OVER (
                        partition BY statedate, name
                        ORDER BY state desc) rncount
             FROM   itemstate)
    SELECT *
    FROM   test t1  where rnasc = 1 
    and state = 'on' and rncount = 1
    Amish shah
    http://bloq.sqltechie.com

  • Fetch the records based on number

    Hi experts,
        I have a req like if user give input as 5..it should fetch 5 records from database.
    for example database values are
    SERNR                MATNR
    101                                              A
    102                                              A
    103                                              A
    104                                              A
    105                                              A
    106                                              A
    107                                              A
    If user gives the input as 5 it should fetch 5 records like 101 to 105....Can any body plz help me how to write select query for this..
    Thanks in advance,
    Veena.
    Edited by: s veena on Jan 18, 2011 5:52 AM

    Hi Veena,
    You can use UPTO in your select query. For example
    SELECT MATNR FROM MARA INTO TABLE IT_MATNR UPTO P_NUMBER ROWS.
    "Here P_NUMBER is the Selection Screen Parameter
    It will fetch records based on the number in the parameter.
    Thanks & Regards,
    Faheem.

  • Spliting files based on condition using multi mapping with BPM

    Hi All,
    Can any one please let me know How to <b>Splite the outbound records based on condition using multi mapping with Integration Process in BPM</b>?
    Thanks
    Govindu.

    Hi All,
    Sorry for mistake this question for Exchange infrastructure guys.
    Thanks,
    Govindu

  • Fetch records from Database based on Input value

    Hi Experts,
    In my mobile application, I have designed one input field with F4 help or input assist. I need to fetch records from database based on that input and need to display records in table.
    My question is:
    How to fetch the records from database/back end based on the input value and display them as table format as we are doing in SAP ABAP?
    Here, I need to fetch the records based on input value available in the UI screen and pass that value to gateway, fetch the records from database and need to bind with table in SAPUI5.
    Kindly share the whole process flow with sample code for this requirement. Hope I have explained the requirement in detail.
    Thanks In Advance..
    Regards,
    Arindam Samanta.

    Hi,
    Try something like this.
    In this, I am passing From date, To date, RelGrp, RelStr, Uname as input. Then I am storing those values in variables and passing this data in Odata request.
    OData.read({ requestUri: "http://xxxx:8000/sap/opu/odata/sap/Z188_PO_SRV/pos?$filter=Docdate le datetime'"
                    + todateformat+"T00:00:00' and Docdate ge datetime'"
                    + fromdateformat+"T00:00:00' and RelGrp eq '"
                    + relcode +"'and RelStr eq '"
                    + relstg +"'and Uname eq '"
                    + username+ "' "},
      function (data) {
    console.log(data);
    When we are giving correct inputs it will goes to Success function and get the data from back end.
    In console we can see the data.
    Hope this will helps to you.
    Thanks&Regards
    Sridevi

  • Fetching check number based on condition in selection screen

    In selection screen there r four fields document no,document date ,company code,fiscal year .
    According to client requirement, I have added check number in selection screen. If I enter  the document no in selection screen , the value (bseg –zuonr) should be retrived  in the field check number. If I press F4 in the check number field , the value zuonr based on condition bschl = 50 should be displayed..
    Now it is working fine in development  system.
    But in production it displays 3 values (bschl = 50, bschl = 40 and bschl = 25.Now I need that it should display a single  value based on posting key bseg -bschl = 50 only.
    my code:
    At selection-screen on value-request for P_ZUONR-low.
    select  ZUONR INTO CORRESPONDING FIELDS OF TABLE VALUE_IT1 from BSEG where BELNR IN S_BELNR and BSCHL = '50'.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
           retfield        = 'ZUONR'
           dynprofield =  'P_ZUONR'
           dynpprog    = sy-cprog
          dynpnr      = sy-dynnr
           value_org   = 'S'
           TABLES
         value_tab       = VALUE_IT1
         FIELD_TAB              = IG_BSEG
          RETURN_TAB             = RETURN
        EXCEPTIONS
          parameter_error = 1
          no_values_found = 2
          OTHERS          = 3.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    Thanks in advance.

    Hi,
    You can achieve this using Boolean type transient variable.
    > Create a Boolean type Transient variable in VO
    > Use this transient variable as SPELL like ${oa.<view instance>.<view attribute>}
    and in process for request method of controller class. set the value of this transient variable as true or false based on the condition

  • Fetch-Xml based report (to count User Access in the last 6 months ) for Microsoft Dynamics CRM Online

    Hi,
    I have created a User Access report for CRM on-premise using SQl query in the following format. One row corresponds to one user in organization. Currently, I am using Microsoft Dynamics CRM Online trial version and have two users in my organization.
    I want to the same report for CRM Online environment. Only Fetch-Xml based custom reports are supported by CRM online environment hence this SQL query cannot be used.
    I have already written fetch-xml query to retrieve user access records ("audit" entity records) in "last-x-months" (where x = 1,2,3,4,5,6) as below.
    I am able to retrieve the records with "last-x-months" condition at a time, for example, the last-2-months  in my fetch-xml query only.
    For, example, when I retrieve the records in the last-2-months, it also includes the records in the last month. I want to count the records in the 2nd month only that is the difference between these two. The difference will be my 2nd column.
    Similarly, I want the other columns.  
    For the case in the above example, I have created the two separate datasets to get the record-count for the last month and last-2-months. But, I am not able to use the two datasets in the same table in my report and hence not able to calculate the difference.
    Is there any way to solve this problem?

    Hi,
    I have modified my Fetch-XML query to retrieve all the required User Access records and removed aggregation and counting and grouping from the query as well. Did grouping and counting in SSRS. Now the report works fine as shown in the above picture.

  • Fetching records 21 to 30

    Hi All,
    I have a table and i want to fetch records where rownum>20 and rownum<31(i.e records from 21 to 30).
    What will be sql query for this.Kindly suggest.
    Thanks,
    Vineet

    For what its worth I'll throw in my 2 cents. I see this question a lot on forums.
    In a relational DB like Oracle, row numbers dont really have much significance. If you query the table, there is no guarantee Oracle will return the results in the order you loaded them in.
    So what may be in rows 21-30 now could change tomorrow if you added or deleted more rows. If you wanted say the top 10 records (based on a specific condition) that would be one thing.
    There must be some criteria for wanting to pull back only those rows. Instead of naming the rows specifically, you should look into setting a condition in your WHERE clause which pulls back those records.
    In Oracle, if you are going to explicity name rownums, you better have an ORDER BY clause, or you will not be guaranteed of any actual order.
    Personally speaking, using rownum as criteria except for a TOP N query is not great practice.
    Hope that helps!

  • How to create additional Line in file based on condition available as part of ZINVOIC02 Idoc segment

    Scenario Details:
    Receiving Zinvoic02 Idoc in PI. Idoc to file translation creates comma separated file with .csv extn
    The logic was kept in such a way that how many E1EDP01 (items) are available in IDoc that many no of records will be created in csv file.
    The file logic for some the fields is as below:
    No of records
    InvNumber
    InvDate
    CusNumber
    LineitemDesc
    Tax1Type
    Tax1%
    for 1st E1EDP01
    E1EDK01-BELNR
    E1EDK03-DATUM
    E1EDK01-PARTN
    Populate when E1EDP04/MSKWZ=O2 or O4 with E1EDP19/KTEXT
    Hardcode when E1EDP04/MSKWZ=O2 or O4
    Sum all E1EDP04 /MSATZ when E1EDP04/MSKWZ=O2 or O4
    for 2nd E1EDP01
    E1EDK01-BELNR
    E1EDK01-DATUM
    E1EDK01-PARTN
    same as above
    same as above
    same as above
    for 3rd E1EDP01
    E1EDK01-BELNR
    E1EDK03-DATUM
    E1EDK01-PARTN
    same as above
    same as above
    same as above
    Additional Line to be created when one or more of E1EDP01 is having E1EDP04/MSKWZ = O3
    same as above
    same as above
    same as above
    Hardcode "REIM for USE TAX"
    Hardcode ""
    Hardcode ""
    Now we have got addition requirement to add a new lineitem when tax code is equal to O3 for any of the E1EDP01.
    Is it possible to create additional lineitem based on condition. If yes, please share what should be the approach.
    How we can create the additional lineitem?
    Currently we are using E1EDP01 to do context handling.
    The target structure is :
    MT_FILE
         INVOICE     0..unbounded
              InvNumber     0..1
              InvDate          0..1
              CusNumber     0..1
              LineitemDesc     0..1
              Tax1Type          0..1
              Tax1%               0..1

    Hello,
    Please add one extra field in the data structure of the target mapping and let its occurrence be 0..unbounded under the root node 'MT_ADP_Invoice'.
    Apply the condition, if tax code MSKWZ (with its context changed to E1EDP01) equalsS to '03', then map it to the newly created target field whose occurrence is 0..unbounded.
    This will then create an additional field which is your requirement.
    The above is one way.
    But if you want to have the same target field name as ADP_File appended for tax field being '03'.
    Then in that case you can you two message mapping for one common operational mapping / interface.
    In the first message mapping you need to have one target data structure created with the source data structure remaining the same as the one shown by you in scrn shot. Now this target data structure will be similar to the source, except that you need to add one more field at the end(name different from other fields) in target (whose occurrence should be 0..unbounded), and it needs to be mapped to E1EDP01 provided the tax code field MSKWZ(its context changed to E1EDP01) equalsS to constant '03'.
    In the second message mapping you need to map the target structure of previous message mapping to the actual required structure. The newly added field should be mapped to ADP_File of your final target structure.
    This will then create the same structure as required.
    Note : Please change the occurence of ADP_File to 0..unbounded.
    Regards,
    Souvik

  • Unable to fetch records from database with huge selection screen

    Hi all,
    I have 20 fields from selection screen.
    I have a z table with these 20 fields .
    Now with the values entered in the selection screen i have to fetch the records from the z table.
    All fields in the selection screen are not mandatory, the user may or may not enter the values.
    I have to fetch the records based on the values entered.
    I wrote a select with where condtion to all those 20 fields. but its not retreving the records.
    All the fields in the selection screeen are parameters.
    Could you help me on this, please. I wrote in the where conditon with field1 = value AND field 2 = value.. etc... field20 = value.
    Please guys help me out.
    KV.
    Edited by: Nithin Kumar on Mar 18, 2008 8:48 AM

    Guys,
    I have a problem with the select query.
    as i said i have 20 fields, ranges are working for few fields.
    But i have couple of fields as descriptions. So i have to fetch the records for pattenr as well.
    Means, user can enter in the description............. like    "ab". So in the description if there is anything   with 'ab' it should fetch.
    it works with a LIKE statement with % symbols.
    but it doenst work with   ranges and patterns in same select. I mean the below is not working.
      SELECT  *
             FROM crmd_orderadm_h
             INTO table itab
             WHERE object_id IN r_obj AND
                   process_type IN r_pro AND
                   description LIKE s_des.
    r_obj, r_pro are ranges  and s_des is the pattern, ex: %ab%.              so in this case how it has to be done... could you please help me on this.. the other fields could be blank( r_obj and r_pro).. 
    kindly help me out......
    KV

  • Suppress Target structure based on condition

    Hi
    How to suppress target structure based on condition
    Example:
    Source is like:
    <Details>
    <Name>abdc</Name>
    <ID>234</ID>
    <Address>US</Address>
    </Details>
    I have two target structures
    1:
    <Details>
    <Name>abdc</Name>
    <ID>234</ID>
    <Address>US</Address>
    </Details>
    2:
    <Error>
        <ErrorID>
    </Error>
    if Any of the source filed is null then i dont want to map it to source structure. instead I want to assign an error id to ErrrorID node of the target.
    example
    abc,123,US
    abc
    in above case second record has two null values
    so my target structure should be
    <Details>
    <Name>abc</Name>
    <ID>123</ID>
    <Address>US</Address>
    </Details>
    <Error>
        <ErrorID>2nd record has erro</ErrorID>
    </Error>
    How to acheive this..
    Please help us
    Regards
    Sowmya

    hi ,
    plz try the following mapping
    Name-->exist-->if than else-> tuue----->Name
                                                        false---(constant)--
    error
    ID-->exist-->if than else-> tuue----->ID
                                                     false---(constant)--
    error
    adress-->exist-->if than else-> tuue----->address
                                                          false---(constant)--
    error
    regards,
    navneet

Maybe you are looking for

  • Need iPhoto 8 or 9 for older iMac

    Installed a copy of Snow Leopard on my mother-in-law's 2007 computer, but had to wipe the HD, which as corrupted to do so.  I already tried to use her older bundled software to custom install the iPhoto software, but no luck.  The install program giv

  • RoboHelp 8 for Word not installed with RoboHelp HTML?

    My workplace just upgraded from RoboHelp Office 5x to RoboHelp 8. Come to find out, *all* that was installed was RoboHelp 8 HTML. The RoboHelp 8 for Word part of the application was not installed. The department responsible for software installations

  • Overhead cost

    Dear All, We have manufacturing set up,where in the client produces  diffrent kind of mother boards (FG materails ) in a Single Line :(i,e created as a one Production Cost center) .We have four activity types through which direct cost will be capture

  • My iPhone is not showing in iTunes on my PowerBook G42005-any suggestions?

    I have a PowerBook 2005 G4.  When I sync my iPhone with the PowerBook, the iPhone does not show in the iTunes-as in the music and such is not showing.  Does anyone know what might fix that problem?

  • Diffrence b/w grid computing , clustering

    respected viewers, can any body tell me 1. What is the difference between Grid computing , Clustering and Distributed systems? plz explain a bit .... ? tellme some link where 3 of these things are explained together regards Edited by: ORA-FSD-PAK on