Select Statement to fetch Multiple records of a same field

Hi one and all,
           I have ascenario like this,
I need to fetch the material starting with 'MA%' and material Starting with 'RT%' and so on.....data from the table resb with reference to AFPO-AUFNR.
Now how can write select Query.
Iknow how to fetch for a single type of material 'MA%'(using LIKE)
But for multiple selection of the same fieldi cant do anything ,
if anybody knows Please Help me.....
I wil be very thankful if u r helped.
Regards,
rajesh.

I have been trying in the same way
like
DATA : sp TYPE char3,
       b3 TYPE char3,
       b5 TYPE char3,
       rt TYPE char3,
       sh TYPE char3,
       rp TYPE char3.
sp = 'SP%'.
b3 = 'B3%'.
b5 = 'B5%'.
rt = 'RT%'.
sh = 'SH%'.
rp = 'RP%'.
SELECT * FROM
         resb
  INTO   TABLE gt_resb
WHERE aufnr = wa_itab-aufnr.
AND matnr LIKE RT.
OR matnr  LIKE b3
OR matnr  LIKE b5
OR matnr  LIKE sh
OR matnr  LIKE rp
OR matnr  LIKE sp.
its not working.
Regards,
rajesh S

Similar Messages

  • Need help for SQL SELECT query to fetch XML records from Oracle tables having CLOB field

    Hello,
    I have a scenario wherein i need to fetch records from several oracle tables having CLOB fields(which is holding XML) and then merge them logically to form a hierarchy XML. All these tables are related with PK-FK relationship. This XML hierarchy is having 'OP' as top-most root node and ‘DE’ as it’s bottom-most node with One-To-Many relationship. Hence, Each OP can have multiple GM, Each GM can have multiple DM and so on.
    Table structures are mentioned below:
    OP:
    Name                             Null                    Type        
    OP_NBR                    NOT NULL      NUMBER(4)    (Primary Key)
    OP_DESC                                        VARCHAR2(50)
    OP_PAYLOD_XML                           CLOB       
    GM:
    Name                          Null                   Type        
    GM_NBR                  NOT NULL       NUMBER(4)    (Primary Key)
    GM_DESC                                       VARCHAR2(40)
    OP_NBR               NOT NULL          NUMBER(4)    (Foreign Key)
    GM_PAYLOD_XML                          CLOB   
    DM:
    Name                          Null                    Type        
    DM_NBR                  NOT NULL         NUMBER(4)    (Primary Key)
    DM_DESC                                         VARCHAR2(40)
    GM_NBR                  NOT NULL         NUMBER(4)    (Foreign Key)
    DM_PAYLOD_XML                            CLOB       
    DE:
    Name                          Null                    Type        
    DE_NBR                     NOT NULL           NUMBER(4)    (Primary Key)
    DE_DESC                   NOT NULL           VARCHAR2(40)
    DM_NBR                    NOT NULL           NUMBER(4)    (Foreign Key)
    DE_PAYLOD_XML                                CLOB    
    +++++++++++++++++++++++++++++++++++++++++++++++++++++
    SELECT
    j.op_nbr||'||'||j.op_desc||'||'||j.op_paylod_xml AS op_paylod_xml,
    i.gm_nbr||'||'||i.gm_desc||'||'||i.gm_paylod_xml AS gm_paylod_xml,
    h.dm_nbr||'||'||h.dm_desc||'||'||h.dm_paylod_xml AS dm_paylod_xml,
    g.de_nbr||'||'||g.de_desc||'||'||g.de_paylod_xml AS de_paylod_xml,
    FROM
    DE g, DM h, GM i, OP j
    WHERE
    h.dm_nbr = g.dm_nbr(+) and
    i.gm_nbr = h.gm_nbr(+) and
    j.op_nbr = i.op_nbr(+)
    +++++++++++++++++++++++++++++++++++++++++++++++++++++
    I am using above SQL select statement for fetching the XML records and this gives me all related xmls for each entity in a single record(OP, GM, DM. DE). Output of this SQL query is as below:
    Current O/P:
    <resultSet>
         <Record1>
              <OP_PAYLOD_XML1>
              <GM_PAYLOD_XML1>
              <DM_PAYLOD_XML1>
              <DE_PAYLOD_XML1>
         </Record1>
         <Record2>
              <OP_PAYLOD_XML2>
              <GM_PAYLOD_XML2>
              <DM_PAYLOD_XML2>
              <DE_PAYLOD_XML2>
         </Record2>
         <RecordN>
              <OP_PAYLOD_XMLN>
              <GM_PAYLOD_XMLN>
              <DM_PAYLOD_XMLN>
              <DE_PAYLOD_XMLN>
         </RecordN>
    </resultSet>
    Now i want to change my SQL query so that i get following output structure:
    <resultSet>
         <Record>
              <OP_PAYLOD_XML1>
              <GM_PAYLOD_XML1>
              <GM_PAYLOD_XML2> .......
              <GM_PAYLOD_XMLN>
              <DM_PAYLOD_XML1>
              <DM_PAYLOD_XML2> .......
              <DM_PAYLOD_XMLN>
              <DE_PAYLOD_XML1>
              <DE_PAYLOD_XML2> .......
              <DE_PAYLOD_XMLN>
         </Record>
         <Record>
              <OP_PAYLOD_XML2>
              <GM_PAYLOD_XML1'>
              <GM_PAYLOD_XML2'> .......
              <GM_PAYLOD_XMLN'>
              <DM_PAYLOD_XML1'>
              <DM_PAYLOD_XML2'> .......
              <DM_PAYLOD_XMLN'>
              <DE_PAYLOD_XML1'>
              <DE_PAYLOD_XML2'> .......
              <DE_PAYLOD_XMLN'>
         </Record>
    <resultSet>
    Appreciate your help in this regard!

    Hi,
    A few questions :
    How's your first query supposed to give you an XML output like you show ?
    Is there something you're not telling us?
    What's the content of, for example, <OP_PAYLOD_XML1> ?
    I don't think it's a good idea to embed the node level in the tag name, it would make much sense to expose that as an attribute.
    What's the db version BTW?

  • Placeholder fetching multiple records

    Hi,
    From the below piece of code in placeholder i am fetching multiple records.
    How can i show those multiple records to the user?
    <cq:contentQuery logic="and">
    <cq:contentPropertyComparison logic="and" propertySet="UCMRepository/IDC:Folder" name="dDocAuthor" type="string">
    <cq:equals>
    <cq:literal>weblogic</cq:literal>
    </cq:equals>
    </cq:contentPropertyComparison>
    </cq:contentQuery>
    Thanks in Advance,
    Venu--

    Placeholders will, by design, select and display a single returned content item. If you would like to render more items, look to the Content Selector technology rather than Placeholder.
    This document might be of assistance: [Choosing the Type of Interaction Management to Develop|http://download.oracle.com/docs/cd/E13155_01/wlp/docs103/interaction/interaction.html#wp1009277]
    Brad

  • Need help using Select statement  to  retrieve one record

    Hi guys, my first post so be gentle please. The basis of this fucntion is to search my dtabase using the select statement to find the record the user wants, by retrieving the name of theitem from the text box. details are then displayed on a joption message box.
    Everytime I run this program it throws an exception 'Exception: null'. Can anyone see where I am going wrong, I have only bn learning java for thepast 6 months so perhaps I am doing something wrong.
    Or perhaps there is another way for me to close the st, con, rs?
    Your help appreciated
    public void searchproducts(){
    Connection con = null;
    Statement st = null;
    ResultSet rs = null;
    try{
    //creating and loading a database connection
    String dbUrl = "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=db2.mdb;"; // String dbUrl = "jdbc:odbc:people";
    String user = "";
    String password = "";
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    Connection c = DriverManager.getConnection(
    dbUrl, user, password);
    int count;
    st = con.createStatement();
    rs = st.executeQuery("SELECT ItemName, Country, Yearmade, ValuePrice, Forsale FROM Collectman WHERE ItemName="+" '"+txtsearchproduct.getText()+"'" );
    while(rs.next()) {
    String ItemName = rs.getString(1);
    String Country = rs.getString(2);
    String Yearmade = rs.getString(3);
    String ValuePrice = rs.getString(4);
    String Forsale = rs.getString(5);
    JOptionPane.showMessageDialog(null, "product details are: " + ItemName + " " + Country + " " + Yearmade + " " + ValuePrice + " " + Forsale);
    //It keeps on throwing this excpetion with null
    catch (Exception e) {
    System.err.println("Exception: " + e.getMessage());
    } finally {
    try {
    if(rs != null)
    rs.close();
    if(st != null)
    st.close();
    if(con != null)
    con.close();
    } catch (SQLException e) {
    }

    And while we're waiting on that, I'll just say it's nice to see you almost got the general layout of a db call correct...that's a rare thing around here. The finally should have a try/catch round each of the close statements and not around all three in one go. If the resultset throws an exception in your version then you would fail to close either the statement or the connection.
    The second thing is, look up PreparedStatements. They're a better choice for handling SQL requiring variables than using a bog standard Statement.

  • Need Select statement for fetch the details

    Hi
      i want to fetch particular customer wise sales orderds and that sales order No  and  date of sales order was created..  and  that sales order related PO No  and Materials ..
    for this..   how can i write an executable programm.. is it needed to  define seperate  internal tables or single internal table is enough  ?
    what is the select statement for fetching  all these details..
    any help will be appriciated
    Thanks
    Bbau

    custmer master table is KNA1  knb1  knbk
    sales data tables r  VBAK VBAP VBEP
    Material data  MARA, MARAC, MARD
    PO RELATED ekko  ekpo  eket
    <REMOVED BY MODERATOR>
    Edited by: Alvaro Tejada Galindo on Feb 13, 2008 3:04 PM

  • How can i select some row from multiple row in the same group of data

    I want to select some row from multiple row in the same group of data.
    ColumnA        
    Column B
    1                  OK
    1                   NG
    2                   NG
    2                          NG
    3                          OK
    3                          OK
    I want the row of group of
    ColumnA if  ColumnB contain even 'NG'
    row , select only one row which  Column B = 'NG'
    the result i want = 
    ColumnA         Column B
    1                         NG
    2                   NG
    3                          OK
    Thank you

    That's some awful explanation, but I think this is what you were driving at:
    DECLARE @forumTable TABLE (a INT, b CHAR(2))
    INSERT INTO @forumTable (a, b)
    VALUES
    (1, 'OK'),(1, 'NG'),
    (2, 'NG'),(2, 'NG'),
    (3, 'OK'),(3, 'OK')
    SELECT f.a, MIN(COALESCE(f2.b,f.b)) AS b
    FROM @forumTable f
    LEFT OUTER JOIN @forumTable f2
    ON f.a = f2.a
    AND f.b <> f2.b
    GROUP BY f.a

  • How can I call multiple records(40) at same time as webservice ?

    Hi All
      My scenario is some thing like calling SOAP(Webservice) to Rfc(BAPI)
      Thing is how can i call multiple records at the same time using the SOAP
       adapter i.e i need to make a request to BAPI and in the BAPI response
       based on the fields, i need to send to different records....it is Sync call
    Can any explain me how to implement this scenario ?
    Regards
    Kiran lvs

    HI,
    Please see the below link
    http://help.sap.com/saphelp_nw04/helpdata/en/42/ed364cf8593eebe10000000a1553f7/content.htm
    Regards
    Chilla..

  • Write a SELECT statement in different ways is not the same thing!!!

    Let's take a look
    use AdventureWorks2012
    go
    dbcc freeproccache
    go
    and now select something
    select * from [HumanResources].[vEmployeeDepartmentHistory]
    go
    so, analyzing 'Compiled Plan'
    SELECT usecounts, cacheobjtype, objtype, text
    FROM Sys.dm_exec_cached_plans
    CROSS APPLY sys.dm_exec_sql_text(plan_handle)
    where cacheobjtype = 'Compiled Plan'
    ORDER BY usecounts DESC;
    GO
    and now let's write some SELECT in "fuzzy case"
    dbcc freeproccache
    go
    select * from [HUMANResources].[vEmployeeDepartmentHistory]
    go
    select * from [HumanRESOURCES].[vEmployeeDepartmentHistory]
    go
    select * from [HumanResources].[VEmployeeDepartmentHistory]
    go
    select * from [HumanResources].[vEmployeeDEPARTMENTHistory]
    go
    select * from [HumanResources].[vEmployeeDepartmentHISTORY]
    go
    SELECT * from [HumanResources].[vEmployeeDepartmentHistory]
    go
    select * FROM [HumanResources].[vEmployeeDepartmentHistory]
    go
    and now let's see compiled plans again
    SELECT usecounts, cacheobjtype, objtype, text
    FROM Sys.dm_exec_cached_plans
    CROSS APPLY sys.dm_exec_sql_text(plan_handle)
    where cacheobjtype = 'Compiled Plan'
    ORDER BY usecounts DESC;
    GO
    So, write a SELECT statement in different ways is not the same thing!!!
    Hope it'll be useful
    P.Ceglie

    Yes.  There is little or no query normalization that happens in front of the query plan cache.  It would be a performance tradeoff to parse and normalize the query before matching it to the cached plans.  The benefit of reducing the number
    of plans in the cache probably wouldn't be worth it. 
    David
    David http://blogs.msdn.com/b/dbrowne/

  • Regarding fetching multiple records in a BDC call transaction mode

    hi experts,
    well the scenario is that i hv made a bdc report in which the values concerning purchase orders are stored in a text file in the form of records.(rows) and i want to upload these values into the transaction me21n.
    i hv been able to do that by marking a recording nd then using GUI UPLOAD fm and then fetching the values from an internal table,(which had all the row values)
    but now the problem is that i want to fetch multiple rowws at one go.
    as in different purcahse quantity , net price etc under teh same purchase order.
    that is i want to upload various rows for the same purchase order.
    could u guys plz help me with this.
    points will be rewarded generously.
    take care all.

    Hi,
    First you sort the internal table by PO number before sending to BDC. Then loop at this internal table. For each new PO number build BDC tables.
    I am giving pseudo code below.
    Loop at potable.
    at new potable-ponumber.
      bdctable-ponumber = potable-ponumber.
    endat.
    fill item data like matnr,quantity....
    at end of potable-ponumber.
      call transaction.
    endat.
    endloop.
    Hope this helps.
    Ramesh.

  • SELECT statement not returning NULL records

    I have the following SELECT statement:
    SELECT *
    FROM RPT_DS1_CNT_CAT
    WHERE DUPS_SAME <> 'N/A';
    I also tried:
    SELECT *
    FROM RPT_DS1_CNT_CAT
    WHERE DUPS_SAME != 'N/A';
    Same results - There ARE Null DUPS_SAME values
    which are not being selected. I get NO results.
    When I execute this, I do get NULL values.
    SELECT *
    FROM RPT_DS1_CNT_CAT
    WHERE DUPS_SAME IS NULL;
    How can I ensure that I get all non - 'N/A' records
    if it won't pick up the nulls? Is there a function
    I can use or a different wording? I do want to use
    != or <> because there may be other values besides
    'N/A' such as 'YES' or 'NO' and they may be null or
    filled with spaces.

    The expression
    NVL(DUPS_SAME,'') is meaningless. You're saying "If DUPS_SAME is NULL, return the empty string, which is NULL, otherwise return DUPS_SAME." If you're going to use NVL, the string that gets returned if the column is NULL should be non-NULL, i.e.
    NVL(DUPS_SAME,'DUPS_SAME was NULL') Your query should, as others have pointed out, either be
    SELECT *
      FROM rpt_ds1_cnt_cat
    WHERE dups_same <> 'N/A' OR dups_same IS NULLor
    SELECT *
      FROM rpt_ds1_cnt_cat
    WHERE NVL(dups_same, 'DUPS_SAME is NULL') <> 'N/A' Either of these return the same results as your query but they're going to be far clearer for whoever needs to maintain the code. There may be performance differences as well if DUPS_SAME is indexed depending on the data distribution...
    Justin

  • Logic to fetch multiple records from BKPF, SRGBTBREL and SOOD

    Hi All
    Need help in developing a login for a report.
    We are trying to display records of a/c documents which have an associated note with them. This involves 4 categories.
    1)     My Document, I attached the note.
    2)     My Document, someone else attached the note.
    3)     No note attached.
    4)     All.
    The logic desired is as below:
    1)     BKPF-BUKRS + BKPF-BELNR + BKPF-GJAHR = SRGBTBREL-INSTID_A. (SRGBTBREL can have multiple records for this combination if multiple notes attached)
    2)     a) SOOD-OBJTY = SRGBTBREL-INSTID_B+17(3).
    b) SOOD-OBJYR = SRGBTBREL-INSTID_B+20(2).
    c) SOOD-OBJNO = SRGBTBREL-INSTID_B+22(12).
    Unique combination.
    I have fetched the details from the three database tables but finding it challenging to put it across in one output internal table. It doesnu2019t cover the scenario where multiple notes are attached to the document (One can be from the same person who created the document and another ones can be from different person or both from the different people).
    Thanks in advance,
    Harsh

    Code Snippet Part 2.
    * Approved Document.
        IF rb_app = 'X'.
          CLEAR wa_sood.
    *      READ TABLE gt_sood INTO wa_sood WITH KEY objtp = lv_objtp
    *                                               objyr = lv_objyr
    *                                               objno = lv_objno.
          LOOP AT gt_sood INTO wa_sood WHERE objtp = lv_objtp
                                         and objyr = lv_objyr
                                         and objno = lv_objno.
    *      IF sy-subrc = 0.
            IF wa_bkpf-usnam <> wa_sood-cronam.
    * Company Code.
              wa_output-bukrs = wa_bkpf-bukrs.
    * A/c Document No.
              wa_output-belnr = wa_bkpf-belnr.
    * Fiscal Year.
              wa_output-gjahr = wa_bkpf-gjahr.
    * Document Type.
              wa_output-blart = wa_bkpf-blart.
    * Document Date.
              wa_output-budat = wa_bkpf-budat.
    * Day On Which Accounting Document Was Entered.
              wa_output-cpudt = wa_bkpf-cpudt.
    * User name.
              wa_output-usnam = wa_bkpf-usnam.
    * Reverse Document Number.
              wa_output-stblg = wa_bkpf-stblg.
    * Transaction Code.
              wa_output-tcode = wa_bkpf-tcode.
    * Short description of contents.
              wa_output-objdes = wa_sood-objdes.
    * Creator Name.
              wa_output-cronam = wa_sood-cronam.
    * Date created.
              wa_output-crdat = wa_sood-crdat.
    * Time created.
              wa_output-crtim = wa_sood-crtim.
    * Status.
              WRITE icon_green_light TO wa_output-light.
              APPEND wa_output TO gt_output.
    *          CLEAR: wa_output,
    *                 wa_sood.
    *        ENDIF.
          ENDIF.
                   ENDLOOP.
        ENDIF.
    * All Documents.
        IF rb_all = 'X'.
    * Company Code.
          wa_output-bukrs = wa_bkpf-bukrs.
    * A/c Document No.
          wa_output-belnr = wa_bkpf-belnr.
    * Fiscal Year.
          wa_output-gjahr = wa_bkpf-gjahr.
    * Document Type.
          wa_output-blart = wa_bkpf-blart.
    * Document Date.
          wa_output-budat = wa_bkpf-budat.
    * Day On Which Accounting Document Was Entered.
          wa_output-cpudt = wa_bkpf-cpudt.
    * User name.
          wa_output-usnam = wa_bkpf-usnam.
    * Reverse Document Number.
          wa_output-stblg = wa_bkpf-stblg.
    * Transaction Code.
          wa_output-tcode = wa_bkpf-tcode.
          CLEAR wa_sood.
    *      READ TABLE gt_sood INTO wa_sood WITH KEY objtp = lv_objtp
    *                                               objyr = lv_objyr
    *                                               objno = lv_objno.
          LOOP AT gt_sood INTO wa_sood WHERE objtp = lv_objtp
                                         and objyr = lv_objyr
                                         and objno = lv_objno.
    *      ELSE.
            IF wa_bkpf-usnam <> wa_sood-cronam.
    * Status.
              WRITE icon_green_light TO wa_output-light.
    * Short description of contents.
              wa_output-objdes = wa_sood-objdes.
    * Creator Name.
              wa_output-cronam = wa_sood-cronam.
    * Date created.
              wa_output-crdat = wa_sood-crdat.
    * Time created.
              wa_output-crtim = wa_sood-crtim.
            ELSE.
    * Status.
              WRITE icon_yellow_light TO wa_output-light.
    * Short description of contents.
              wa_output-objdes = wa_sood-objdes.
    * Creator Name.
              wa_output-cronam = wa_sood-cronam.
    * Date created.
              wa_output-crdat = wa_sood-crdat.
    * Time created.
              wa_output-crtim = wa_sood-crtim.
            ENDIF.
    *      ENDIF.
          ENDLOOP.
          IF sy-subrc <> 0.
            WRITE icon_red_light TO wa_output-light.
          ENDIF.
          APPEND wa_output TO gt_output.
    *      CLEAR: wa_output,
    *             wa_sood.
        ENDIF.
      ENDLOOP.

  • SQL Query - Multiple records from value of field

    I have a table that has the following lay out
    ID
    AreaUnitServes
    Filter1Quantity
    Filter1Size
    Filter2Quantity
    Filter2Size
    And I’m trying to convert it to
    FkPSAUnitsID
    Size
    Location
    I’ve got the following query started but I’m stuck on how to INSERT INTO multiple records by the value of Filter1Quantity. I also have to query for Filter2Quantity.
    INSERT
    INTO RapidServ.dbo.PSAFilters
    (FkPSAUnitsID,Size,Location)
    SELECT ID
    AS FkPSAUnitsID,Filter1Size
    AS Size,
    AreaUnitServes
    AS Location
    FROM RapidServ.dbo.PSA
    Thanks,
    why767

    Please follow basic Netiquette and post the DDL we need to answer this. Follow industry and ANSI/ISO standards in your data. You should follow ISO-11179 rules for naming data elements. You should follow ISO-8601 rules for displaying temporal data. We need
    to know the data types, keys and constraints on the table. Avoid dialect in favor of ANSI/ISO Standard SQL. And you probably need to read and download the PDF for: 
    https://www.simple-talk.com/books/sql-books/119-sql-code-smells/
    >> I have a table that has the following lay out <<
    How nice for you! Why did you draw ASCII pictures?  It has all kinds of magical names. The table is nameless because it is forbidden by a wizard to speak its name? There are generic, universal “size” and “location”of nothing in particular. Is the “fk-”
    prefix a meta data design error for “foreign key”? We never do that in RDBMS; name a data element for what it is by its nature, not for how it was used in one place in one schema. This is why we have no magical “id” in a valid schema. Data elements do not
    change names from table to table. 
    You seem to have inherited a pile of garbage with a repeated group in it. Look up First Normal Form (1NF). You also do not know why row is not a record and why fields are  not columns. Did you notice that “area_unit_serves” is a sentence and not
    a name? 
    >> I’ve got the following query started but I’m stuck on how to INSERT INTO multiple records [sic] by the value of Filter1Quantity. I also have to query for Filter2Quantity. <<
    My guess until I get a usable business rules and DDL is that you can use a UNION something like this skeleton: 
    INSERT INTO PSA_Filters (psa_units_id, filter_size, area_service_unit)
    SELECT psa_units_id, filter_1_size, area_service_unit
      FROM Magic_Nameless_Stuff
    UNION ALL
    SELECT psa_units_id, filter_2_size, area_service_unit
      FROM Magic_Nameless_Stuff;
    --CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
    in Sets / Trees and Hierarchies in SQL

  • File Adapter - Multiple Record Types to same Target

    I am currently reading in a fixed length file and loading into a table.
    The issue is, some of the lines in my file differ by two spaces at the end. See example below.
    For example,
    Record 1 might look like :
    DD/MM/YY - length of 8
    Record 2 might look like:
    DD/MM/YY{space}{space} - length of 10
    and they both go into the same date column of my target
    Question 1) Is there a way for BPEL to skip the two spaces at the end of each line for Record 2
    Queston 2) I have currently created multiple record types for the two types but it won't allow me in my transformation to map them both to the "date" column in the target table. It says multiple nodes cannot be mapped to the target
    Any help would be appreciated.

    Hi,
    Unfortunately the IKM SQLDR doesn't have the "when" condition to be wrote at ctl file.
    If you wish a simple solution, just add an option (drop me a email if you want a LKM with this)
    The point is:
    With a single option, you will control the when ctl clause and, for instance, can define:
    1) create 2 datastores (1 for each file)
    2) the first position will be a column at each datastore
    3) write the when condition to this first column at the LKM in the interface.
    Does it help you?

  • 2LIS_02_HDR - Multiple records coming for same EBELN, why?

    Hello All,
    I ran a setup table for init and tested extraction in rsa3 for  data source 2LIS_02_HDR , only one EBELN and it retrievs 3 records for same EBELN. As per my understanding the header data comes from EKKO hence it should bring only one record but retireves multiple records,I want to know why this happens?
    thanks
    V Pola
    Edited by: V pola on Jan 30, 2008 5:35 PM

    Hi,
    Thanks for your reply. The link does not explain why 2LIS_02_HDr retrieves multiple records instead of one.
    Thanks
    V Pola

  • Using !format on multiple occurrences of the same field

    I'm trying to use the @if function to apply formatting to two occurrences of a field, but am not having any luck so far.  The specific example is that I have two check boxes on the template, and would like to have only one of them checked at a time, using the same field in my data file for both check boxes.  The field that I'm using in my data file is:
    ^field ACCOUNT_TYPE
    And the only two possible values for that field are CHECKING and SAVINGS.  On the first ACCOUNT_TYPE checkbox, I have entered the following !format:
    @(If("@_$_."=="CHECKING","X"," "))
    And on the second ACCOUNT_TYPE check box it is
    @(If("@_$_."=="SAVINGS","X"," "))
    The @if statement works fine when I apply it to only one of the check boxes, but when I apply it to both, nothing populates into the field.  A simple solution would be to change the data, but doing so is not an option in this case for me.  Any help or alternate solutions is appreciated.  Thanks!

    Hi
    I treid different combination keeping the same field name for two radio buttons but it didnt work. You can work out with an alternate solution , keep different name for two radio buttons say : JF07 & JF08
    And under JF07 for !Format event : @(If("@JF03."=="SAVING","S",""))
    And under JF08 for !Format event : @(If("@JF03."=="CHECKING","C",""))
    where JF03 is the field name which may have one of two value : i.e either SAVING or CHECKING
    So your form consits of 2 radio buttons ( JF07,JF08) and one field label JF03. In your dat file you have to refer to first radio button that appears first on the form i.e left to right or top to bottom.(So whatever radio button is appearign first in the sequence on the form from left to right use that radio button in dat file.Here its JF07)
    ^symbolset 108
    ^page 1
    ^field JF03
    CHECKING
    ^field JF07
    ==========
    ^symbolset 108
    ^page 1
    ^field JF03
    SAVING
    ^field JF07
    Hope this layman's altenate solution will give you a bit of relief.
    thanks
    jaY

Maybe you are looking for