Merging data from multiple BAPI tables

Hello,
I'm executing a BAPI_XX_GETLIST with multiple "Tables" selected with the REQUESTEDTABLESX import parameter. What is the best way to combine/merge data from multiple "Tables" and bind them into a single webdynpro UI Table?
Thanks.

Hi,
Lets say the BAPI name is BAPI_XX_GETLIST and the table names are ET_TABLE1(Field1, Field2, Field3)  and ET_TABLE2 (FieldA, FieldB). You have display the fields of ET_TABLE1 (Field1, Field2, Field3) and one field from ET_TABLE2 (FieldB). "FieldA" id the key field.
Create a value node (vnField) under the model node table ET_TABLE1 with cardinality 1:1. Create a value attribute (vaFieldB). For "vnField" create a supply function (supplyfunction). If you goto the implementation you can see a method "supplyVnField(IPrivateCO_ComponentName.IVnFieldNode node, IPrivateCO_ComponentName.IET_Table1Element parentElement)".
Write the following code in the implementation.
IPrivateCO_ComponentName.IVnFieldNode nodeX = node.createValueFieldElement();
for(int i=0;i<wdContext.nodeET_Table2().size();i++){
if(parentElement.getField3Value().equals(wdContext.nodeET_Table2().getET_Table2ElementAt(i).getFieldA())){
   nodeX.setValuAttributeValue(wdContext.nodeET_Table2().getET_Table2ElementAt(i).getFieldB());
node.bind(nodeX);
Hope this solves your problem.
Regards,
Santhosh.C

Similar Messages

  • Can we merge data from multiple sources in Hyperion Interactive Reporting ?

    Hi Experts,
    Can we merge data from multiple sources in Hyperion Interactive Reporting ?Example can we have a report based on DB2
    Oracle,
    Informix and Multidiemnsional Databases like DB2,MSOLAP,ESSBASE?
    Thanks,
    V

    Yes, Each have their own Query and have some common dimension for the Results Sections to be joined together in a final query.
    look in help for Creating Local Joins

  • To fetch Data from multiple database tables!

    How to fetch Data from fields of multiple database tables!
    Give me one example!

    use <b>join....</b>
    c the SAPHELP docs...
    FROM tabref1 [INNER] JOIN tabref2 ON cond
    Effect
    The data is to be selected from transparent database tables and/or views determined by tabref1 and tabref2. tabref1 and tabref2 each have the same form as in variant 1 or are themselves Join expressions. The keyword INNER does not have to be specified. The database tables or views determined by tabref1 and tabref2 must be recognized by the ABAP Dictionary.
    In a relational data structure, it is quite normal for data that belongs together to be split up across several tables to help the process of standardization (see relational databases). To regroup this information into a database query, you can link tables using the join command. This formulates conditions for the columns in the tables involved. The inner join contains all combinations of lines from the database table determined by tabref1 with lines from the table determined by tabref2, whose values together meet the logical condition (join condition) specified using ON>cond.
    Inner join between table 1 and table 2, where column D in both tables in the join condition is set the same:
    Table 1                      Table 2
    A
    B
    C
    D
    D
    E
    F
    G
    H
    a1
    b1
    c1
    1
    1
    e1
    f1
    g1
    h1
    a2
    b2
    c2
    1
    3
    e2
    f2
    g2
    h2
    a3
    b3
    c3
    2
    4
    e3
    f3
    g3
    h3
    a4
    b4
    c4
    3
    |--|||--|
        Inner Join
        |--||||||||--|
        | A  | B  | C  | D  | D  | E  | F  | G  | H  |
        |--||||||||--|
        | a1 | b1 | c1 | 1  | 1  | e1 | f1 | g1 | h1 |
        | a2 | b2 | c2 | 1  | 1  | e1 | f1 | g1 | h1 |
        | a4 | b4 | c4 | 3  | 3  | e2 | f2 | g2 | h2 |
        |--||||||||--|
    Example
    Output a list of all flights from Frankfurt to New York between September 10th and 20th, 2001 that are not sold out:
    DATA: DATE   LIKE SFLIGHT-FLDATE,
          CARRID LIKE SFLIGHT-CARRID,
          CONNID LIKE SFLIGHT-CONNID.
    SELECT FCARRID FCONNID F~FLDATE
        INTO (CARRID, CONNID, DATE)
        FROM SFLIGHT AS F INNER JOIN SPFLI AS P
               ON FCARRID = PCARRID AND
                  FCONNID = PCONNID
        WHERE P~CITYFROM = 'FRANKFURT'
          AND P~CITYTO   = 'NEW YORK'
          AND F~FLDATE BETWEEN '20010910' AND '20010920'
          AND FSEATSOCC < FSEATSMAX.
      WRITE: / DATE, CARRID, CONNID.
    ENDSELECT.
    If there are columns with the same name in both tables, you must distinguish between them by prefixing the field descriptor with the table name or a table alias.

  • Moving the data from multiple internal tables into a single one

    Hello everyone,
    I am creating a classical report which uses the following tables.
    tables : ekko, ekpo, mara, makt,lfa1.
    my input parameter is 
    Select-options Purchase Order number
    Following fields are getting used.
    Doc no                  EKKO-EBELN
    Material              EKPO-MATNR
    Item number          EKPO-EBELP
    Quantity             EKPO-MENGE
    Material Group          MARA-MATKL
    Vendor                  EKKO-LIFNR
    Old Material code   MARA-BISMT
    Material Desc.           MAKT-MAKTX
    Vendor name         LFA1-NAME1
    Now i need to do the following task.
    1 Select record from EKKO Using document number.
    2 Select record from EKPO using EKKO record using Document no as key.
    3 Find out Old Material code of each and every material from Material master.
    4 Find out Material description for each and every material from MAKT.
    5 Sort record on Vendor, Purchase Order number and Material.
    I have defined seperate internal tables for these operation.
    Once i have fetched records into these individual internal tables  from the corresponding DB tables i need to move these values into a new internal tables which has all the above fields mentioned
    I need to move these values into a new internal table because to display the values on the report.
    Any idea for the above ? Plz help with a sample example or some relevant.
    Regards,
    Ranjith Nambiar

    Hi
    1 Select record from EKKO Using document number.
    2 Select record from EKPO using EKKO record using Document no as key.
    Use inner join and retrive data into one internal table.for Ex ITAB1
    3 Find out Old Material code of each and every material from Material master.
    Use ITAB1 with for allentries in MARA table to get the onl materil number populate in to one table.
    4 Find out Material description for each and every material from MAKT.
    Get the Material desc with the same manner as above,
    5 Sort record on Vendor, Purchase Order number and Material.
    now sort the ITAB1 as you req.
    now Loop on the ITAB1.
    and read above 2 tables for old matnr and matner deac and append into another table as you want.
    Hope this will help.
    Regards,
    Hiren Patel

  • Merge data from multiple DSO's into one DSO

    Hi,
    I want to transfer data from 4 different 1st level DSO's to a single 2nd level DSO. I have 8 key fields in the 2nd level DSO, 2 from each 1st Level DSO. The 1st level DSO's are Sales Orders, Deliveries, Sales Invoices and Financial Invoices. The goal of this is to create a 2nd level DSO for Sales KPI so the data has to be consolidated so it's not supposed to contain all the records from each DSO but it has to consolidate them somehow.
    example:
    R/3     Order           0000012901     item 10          created              05/08/2008
         Delivery              0080015843     item 10          created              05/08/2008
         Invoice          0090036871     item 10          created          05/08/2008
         FI invoice      1400000135     item 1          created          05/08/2008
    BW     
    F1             F2     F3                     F4     F5                     F6     F7                     F8     F9             F10       F11        F12       F13
    12901     10                                                                                   5/08                    
    12901     10     80015843     10                                                         5/08      5/08               
    12901     10     80015843     10     90036871     10                               5/08      5/08      5/08          
    12901     10     80015843     10     90036871     10     1400000135     1     5/08      5/08             5/08              5/08     -

    Hi,
    I think your second level DSO should have only 2 key fields: Sales Order no and Item. The other fields will get update in this case. Hope this helps.
    Thanks and Regards
    Subray Hegde

  • Is there any way to merge data from multiple user accounts on the same mac?

    After a HD crash I reconstructed from Time Machine. Somehow I created multiple users and the data is different. I'd like to eliminate the user accounts and get to just a single user. Anything there?

    Have a read here http://web.me.com/pondini/AppleTips/Transfer.html
    Stefan

  • How to fetch data from multiple fact tables from a normalized schema?

    Hello everybody,
    I am working on a normalized schema to build my repository. I have categorized the tables into dimensions and facts. I have 3 fact tables in my schema and they have a 1:m:1 relationship i.e. if I have table A, B, and C; A has 1:m relationship with B and C also has 1:m relationship with B. How can I use measures from these tables to create a star schema. If A = Sales, B = Transaction, C = Payment_Amount
    Sales(Sales ID, Amount, Tax pct, ...)
    Transaction(Transaction ID, Sales ID, Payment ID,Transaction Amt, ...)
    Payment_Amount(Payment ID, Check ID, Payment Made, ...)
    Please give me some direction to pursue.
    Thank you!
    D

    Hi dcole,
    Go through this link for snowflake schema http://gerardnico.com/wiki/datamodeling/snowflake_
    http://www.rittmanmead.com/2007/06/19/obiee-data-modeling-tips-1-integrating-1-1-and-1-many-source-tables/
    I suppose it should work with snowflake schema...Im interested in this topic please let me know what is your approach every now and then.
    By,
    KK

  • How can I take data from multiple pages documents and put them into a numbers table?

    I produce invoices in pages, with dates, invoice numbers, references and amounts due. I want to take all this data from multiple documents and transfeer it to a single numbers table. Is this possible and if so, how do I do it. I know I can do it the other way round with mail merge but I can't figure out how to do it this way round?
    Thanks,
    Keith

    The data is spread throughout a pages document in specific areas here's a copy of an invoice for you to have a look at.

  • Display Data from multiple models in one table

    Hi Experts,
    Is it possible to display data from multiple models in one table smltnsly.
    I have created a table dynamically.Now I would like to display data from multiple models... If this possible,can anyone give me a lead as to how to do it..
    Regards
    SU

    Hi
    Your Model Nodes be
    Model1
    ---Output_Model1
    Attrib1
    Attrib2
    Model2
    ---Output_model2
    Attrib1
    Attrib2
    and the value node is
    ValueNode
    ---Attrib1
    ---Attrib2
    Now the coding.
    int size;
    IPrivate<ViewName>.IOutput_mode1Node  node1 = wdContext.nodeOuptut_Model1();
    IPrivate<ViewName>.IValueNodeElement elem;
    size = node1.size();
    for(int i=0; i<size; i++)
       elem = wdContext.createValueNodeElement();
       elem.setAttrib1( node1.getOutput_Model1ElementAt(i).getAttrib1() );
       elem.setAttrib2( node1.getOutput_Model1ElementAt(i).getAttrib2();
       wdContext.nodeValueNode().addElement( elem );
    similar code for Model Node 2
    Regards
    Abhimanyu L

  • How to get the data from multiple nodes to one table

    Hi All,
    How to get the data from multiple nodes to one table.examples nodes are like  A B C D E relation also maintained
    Regards,
    Indra

    HI Indra,
    From Node A, get the values of the attributes as
    lo_NodeA->GET_STATIC_ATTRIBUTES(  IMPORTING STATIC_ATTRIBUTES = ls_attributesA  ).
    Similarily get all the node values from B, C, D and E.
    Finally append all your ls records to the table.
    Hope you are clear.
    BR,
    RAM.

  • Generic datasource by function module to fetch data from multiple tables?

    I'm writing a function module to fetch price, for generic datasource.
    At first, extract test is OK. But InfoPackage never stop  when loading data to PSA in BW.
    And I find the example codes:
         OPEN CURSOR WITH HOLD S_CURSOR FOR
          SELECT (S_S_IF-T_FIELDS) FROM SFLIGHT
                                   WHERE CARRID  IN L_R_CARRID AND
                                         CONNID  IN L_R_CONNID.
        ENDIF.                             "First data package ?
    * Fetch records into interface table.
    *   named E_T_'Name of extract structure'.
        FETCH NEXT CURSOR S_CURSOR
                   APPENDING CORRESPONDING FIELDS
                   OF TABLE E_T_DATA
                   PACKAGE SIZE S_S_IF-MAXSIZE.
        IF SY-SUBRC <> 0.
          CLOSE CURSOR S_CURSOR.
          RAISE NO_MORE_DATA.
        ENDIF.
        S_COUNTER_DATAPAKID = S_COUNTER_DATAPAKID + 1.
      ENDIF.
    There using Cursor to fetch data package by package, and raise exception NO_MORE_DATA to stop the loading process.
    Now I fetch data from multiple tables, I don't think I can use Cursor.
    Then How can I handle this?  
    Thanks a lot.

    Thanks
    IF IT_999[] IS INITIAL.
        SELECT A~KNUMH A~MATNR A~KSCHL VKORG VTWEG A~DATBI A~DATAB KBETR KMEIN KPEIN C~MTART APPENDING CORRESPONDING FIELDS OF
          TABLE TP_DATA
            FROM A999 AS A
              INNER JOIN KONP AS B
                  ON A~KNUMH = B~KNUMH
              INNER JOIN MARA AS C
                 ON A~MATNR = C~MATNR
    *          FOR ALL ENTRIES IN IT_999
                    WHERE
    *      A~KNUMH = IT_999-KNUMH  AND
           ( ( A~KSCHL = 'ZPRC' AND VKORG = 'Z000' AND VTWEG = 'Z1' ) OR
                          ( A~KSCHL = 'ZPRD' AND VKORG = 'A000' AND VTWEG = 'Y3' ) ) AND
    *                      A~DATBI >= SY-DATUM AND
                          LOEVM_KO = ''.
        SELECT A~KNUMH A~MATNR A~KSCHL VKORG VTWEG A~DATBI A~DATAB KBETR AS KHETR  KMEIN KPEIN C~MTART APPENDING CORRESPONDING FIELDS OF
          TABLE TP_DATA
            FROM A999 AS A
              INNER JOIN KONP AS B
                  ON A~KNUMH = B~KNUMH
              INNER JOIN MARA AS C
                 ON A~MATNR = C~MATNR
    *          FOR ALL ENTRIES IN IT_999
                    WHERE
    *      A~KNUMH = IT_999-KNUMH AND
          A~KSCHL = 'ZPR3' AND A~VKORG = 'I000' AND
    *                      DATBI >= SY-DATUM AND
                          LOEVM_KO = ''.
      ENDIF.
      IF IT_997[] IS INITIAL.
        SELECT A~KNUMH A~MATNR A~KSCHL VTWEG A~DATBI A~DATAB KBETR AS KHETR KMEIN KPEIN C~MTART APPENDING CORRESPONDING FIELDS OF
          TABLE TP_DATA
            FROM A997 AS A
              INNER JOIN KONP AS B
                  ON A~KNUMH = B~KNUMH
              INNER JOIN MARA AS C
                 ON A~MATNR = C~MATNR
    *          FOR ALL ENTRIES IN IT_997
                    WHERE
    *      A~KNUMH = IT_997-KNUMH      AND
          A~KSCHL = 'ZPRA' AND VTWEG = 'Y1' AND
    *                      DATBI >= SY-DATUM AND
                      LOEVM_KO = ''.
      ENDIF.
      IF IT_996[] IS INITIAL.
        SELECT A~KNUMH A~MATNR A~KSCHL A~DATBI A~DATAB KBETR AS KHETR KMEIN KPEIN C~MTART APPENDING CORRESPONDING FIELDS OF
           TABLE TP_DATA
             FROM A996 AS A
               INNER JOIN KONP AS B
                   ON A~KNUMH = B~KNUMH
               INNER JOIN MARA AS C
                  ON A~MATNR = C~MATNR
    *          FOR ALL ENTRIES IN IT_996
                    WHERE
    *      A~KNUMH = IT_996-KNUMH AND
          A~KSCHL = 'ZPRB' AND
    *                       DATBI >= SY-DATUM AND
          LOEVM_KO = ''.
      ENDIF.
      SELECT   MATNR     "u7269u6599u53F7u7801
               MEINH     "u4ED3u50A8u5355u4F4Du7684u5907u7528u8BA1u91CFu5355u4F4D
               UMREZ     "u57FAu672Cu8BA1u91CFu5355u4F4Du8F6Cu6362u5206u5B50
               UMREN     "u8F6Cu6362u4E3Au57FAu672Cu8BA1u91CFu5355u4F4Du7684u5206u6BCD
          FROM MARM
          INTO CORRESPONDING FIELDS OF TABLE IT_MARM
           FOR ALL ENTRIES IN TP_DATA
         WHERE MATNR = TP_DATA-MATNR AND  MEINH = TP_DATA-KMEIN.
      LOOP AT TP_DATA.
        IF TP_DATA-KPEIN NE 0.
          TP_DATA-KBETR =  TP_DATA-KBETR / TP_DATA-KPEIN.
          TP_DATA-KHETR =  TP_DATA-KHETR / TP_DATA-KPEIN.
        ENDIF.
        IF TP_DATA-KSCHL = 'ZPRA'.
    *       TP_DATA-MEINH = 'ZI'.
    *      TP_DATA-KSCHL = 'B4'.
          IF TP_DATA-KMEIN = 'ZI'.
            TP_DATA-KBETR = TP_DATA-KHETR / '1.17'.
          ELSE.
            READ TABLE IT_MARM INTO WA_MARM1 WITH KEY MATNR = TP_DATA-MATNR MEINH = TP_DATA-KMEIN.
    *           READ TABLE IT_MARM INTO WA_MARM2 WITH KEY MATNR = TP_DATA-MATNR MEINH = 'CT'.
            TP_DATA-KHETR = TP_DATA-KHETR * WA_MARM1-UMREN / WA_MARM1-UMREZ.
    *           * WA_MARM2-UMREZ / WA_MARM2-UMREN.
            TP_DATA-KBETR = TP_DATA-KHETR / '1.17'.
          ENDIF.
        ELSEIF TP_DATA-KSCHL = 'ZPRB'.
    *      TP_DATA-KSCHL = 'L0'.
    *       TP_DATA-MEINH = 'ZI'.
          IF TP_DATA-KMEIN = 'ZI'.
            TP_DATA-KBETR = TP_DATA-KHETR / '1.17'.
          ELSE.
            READ TABLE IT_MARM INTO WA_MARM1 WITH KEY MATNR = TP_DATA-MATNR MEINH = TP_DATA-KMEIN.
    *           READ TABLE IT_MARM INTO WA_MARM2 WITH KEY MATNR = TP_DATA-MATNR MEINH = 'BAG'.
            TP_DATA-KHETR = TP_DATA-KHETR * WA_MARM1-UMREN / WA_MARM1-UMREZ.
    *           * WA_MARM2-UMREZ / WA_MARM2-UMREN.
            TP_DATA-KBETR = TP_DATA-KHETR / '1.17'.
          ENDIF.
        ELSEIF TP_DATA-KSCHL = 'ZPRC' OR TP_DATA-KSCHL = 'ZPRD'.
    *       TP_DATA-MEINH = 'ZI'.
          IF TP_DATA-KMEIN = 'ZI'.
            TP_DATA-KHETR = TP_DATA-KBETR * '1.17'.
          ELSE.
            READ TABLE IT_MARM INTO WA_MARM1 WITH KEY MATNR = TP_DATA-MATNR MEINH = TP_DATA-KMEIN.
    *           READ TABLE IT_MARM INTO WA_MARM2 WITH KEY MATNR = TP_DATA-MATNR MEINH = 'WZI'.
            TP_DATA-KBETR = TP_DATA-KBETR * WA_MARM1-UMREN / WA_MARM1-UMREZ.
    *           * WA_MARM2-UMREZ / WA_MARM2-UMREN.
            TP_DATA-KHETR = TP_DATA-KBETR * '1.17'.
          ENDIF.
        ELSEIF TP_DATA-KSCHL = 'ZPR3'.
    *      TP_DATA-KSCHL = 'B2'.
          IF TP_DATA-KMEIN = 'ZI'.
            TP_DATA-KBETR = TP_DATA-KHETR / '1.17'.
          ELSE.
            READ TABLE IT_MARM INTO WA_MARM1 WITH KEY MATNR = TP_DATA-MATNR MEINH = TP_DATA-KMEIN.
    *           READ TABLE IT_MARM INTO WA_MARM2 WITH KEY MATNR = TP_DATA-MATNR MEINH = 'BAG'.
            TP_DATA-KHETR = TP_DATA-KHETR * WA_MARM1-UMREN / WA_MARM1-UMREZ.
    *           * WA_MARM2-UMREZ / WA_MARM2-UMREN.
            TP_DATA-KBETR = TP_DATA-KHETR / '1.17'.
          ENDIF.
        ENDIF.
        TP_DATA-MEINH = '01'.
        MODIFY TP_DATA.
    E_T_DATA-MATNR =   TP_DATA-MATNR.
    E_T_DATA-KSCHL =   TP_DATA-KSCHL.
    E_T_DATA-KHETR =   TP_DATA-KHETR.
    E_T_DATA-KBETR =   TP_DATA-KBETR.
    E_T_DATA-KMEIN =   TP_DATA-KMEIN.
    E_T_DATA-DATAB =   TP_DATA-DATAB.
    E_T_DATA-DATBI =   TP_DATA-DATBI.
    APPEND E_T_DATA.
        CLEAR WA_MARM1.
        CLEAR WA_MARM2.
      ENDLOOP.
    Edited by: Shen Peng on Oct 20, 2010 10:09 AM

  • Move data from multiple Tables to a Single Table & Convert the list to ALV.

    Hi,
    My aim is to get the list of Materials with their descriptions, with MRP Controller, with Unrestriced Qty. & the Reorder Qty. So, I have to fetch the data from different tables. But finally I am not able to copy or move the fetched data from multiple tables into the single final table.
    Also tell me how to convert this list into ALV.
    Below is the program code.
    *& Report  Y_REORDER_REPORT
    REPORT  Y_REORDER_REPORT.
    tables : marc,makt, mard.
    DATA: Begin of i_final occurs 0,
            matnr type marc-matnr,
            maktx type makt-maktx,
            DISPO type marc-DISPO,
            MINBE type marc-MINBE,
            LABST type mard-LABST,
          end of i_final.
    DATA: Begin of i_marc occurs 0,
           matnr type marc-matnr,
           DISPO type marc-DISPO,
           MINBE type marc-MINBE,
          end of i_marc.
    DATA: Begin of i_makt occurs 0,
           matnr type makt-matnr,
           maktx type makt-maktx,
          end of i_makt.
    DATA: Begin of i_mard occurs 0,
           matnr type mard-matnr,
           LABST type mard-LABST,
           LGORT TYPE MARD-LGORT,
          end of i_mard.
    SELECT  matnr
            dispo
            minbe from marc
            into corresponding fields of table i_marc
            where dispo EQ 'STR'.
    SORT I_MARC by MATNR.
    WRITE: /10  'Material',
            75  'MRP',
            80  'Reorder Qty.'.
    LOOP at i_marc.
    Write: /10  i_marc-matnr,
            75  i_marc-dispo,
            80  i_marc-minbe.
    ENDLOOP.
    write: /.
    SELECT  matnr
            MAKTX from makt
            into corresponding fields of table i_makt
            for all entries in i_marc
            where matnr = i_marc-matnr.
    LOOP at i_makt.
    Write: /10 i_makt-matnr,
            30 i_makt-maktx.
    ENDLOOP.
    SELECT  matnr
            LGORT
            LABST from mard
            into corresponding fields of table i_mard
            for all entries in i_marc
            where matnr = i_marc-matnr.
    LOOP at i_mard.
    Write: /10 i_mard-matnr,
            30 I_MARD-LGORT,
            40 i_mard-labst.
    ENDLOOP.
    move  i_mard-matnr to i_final-matnr.
    move  i_marc-dispo to i_final-dispo.
    move  i_marc-minbe to i_final-minbe.
    move  i_makt-maktx to i_final-maktx.
    move  i_mard-labst to i_final-labst.
    WRITE: /10  'Material',
            30  'Material Desc.',
            75  'MRP',
            80  'Reorder Qty.',
            105 'Current Stock'.
    LOOP at i_final.
    Write: /10  i_final-matnr,
            30  i_final-maktx,
            75  i_final-dispo,
            80  i_final-minbe,
            105 i_final-labst.
    ENDLOOP.
    *LOOP at i_mard.
    *Write: /10  i_mard-matnr,
           30  i_makt-maktx,
           75  i_marc-dispo,
           80  i_marc-minbe,
           105 i_mard-labst.
    *ENDLOOP.
    Regards,
    Vishal

    Change like this,
    SELECT matnr
    lgort
    labst FROM mard
    INTO CORRESPONDING FIELDS OF TABLE i_mard
    FOR ALL ENTRIES IN i_marc
    WHERE matnr = i_marc-matnr.
    LOOP AT i_mard.
       WRITE: /10 i_mard-matnr,
       30 i_mard-lgort,
       40 i_mard-labst.
    ENDLOOP.
    LOOP AT i_marc.
       READ TABLE i_mard WITH KEY matnr =  i_marc-matnr.
       READ TABLE i_makt WITH KEY matnr =  i_marc-matnr.
       MOVE i_mard-matnr TO i_final-matnr.
       MOVE i_marc-dispo TO i_final-dispo.
       MOVE i_marc-minbe TO i_final-minbe.
       MOVE i_makt-maktx TO i_final-maktx.
       MOVE i_mard-labst TO i_final-labst.
       APPEND i_final.
    ENDLOOP.
    WRITE: /10 'Material',
    30 'Material Desc.',
    75 'MRP',
    80 'Reorder Qty.',
    105 'Current Stock'.

  • How to extract data from multiple tables (always got errors)

    Dear Experts,
    I have a simple mapping to extract data from multiple tables as a source (A, B, C) to a target table (X). Below is the picture:
    (Sources)....(Target)
    A----------------***
    B----------------X
    C----------------***
    Sample Source Data:
    Table A:
    ColA1
    100
    200
    etc
    Table B:
    ColB1 ColB2 ColB3
    10 Y Ten
    20 Y Twenty
    30 Y Thirty
    etc
    Table C:
    ColC1 ColC2
    11
    12
    13
    etc
    Target table (X) should be (just has 1 group INGRP1):
    ColA1 ColB1 ColB3 ColC1
    100 10 Ten 11
    100 10 Ten 12
    100 20 Twenty 21
    etc
    Scenarios:
    1. Directly map from A, B, C to X. Unable to map with error message: "API8003: Connection target attribute group is already connected to an incompatible data source. Use a Joiner or Set operator to join the upstream data first before connecting it into this operator."
    2. Map each source to Expression Operator and then map from each Expression to target table. I am able to map all attributes successfully but got error when validating it with message: "VLD-1104: Attributes flowing into TEST.EXPR_SRC.INGRP1 have different data sources."
    How can I achieve the correct mapping for this purpose?
    Use Joiner? I have no key to join the sources
    Use Set? The sources have different number of columns
    Thanks in advance
    Prat

    Thanks Nico,
    I think it will results data like this:
    100 10 Ten 11
    200 20 Twenty 12
    300 30 Thirty 13
    etc
    and not the expected:
    100 10 Ten 11
    100 10 Ten 12
    100 20 Twenty 21
    etc
    But it inspired me to solve this by adding key expression in each source table (B & C) to be joined to table A with this formula:
    100+TRUNC(INGRP1.COLB1,-2)
    Regards
    Prat

  • JDBC-XI-FILE scenario. How to extract data from multiple tables

    Hi,
    At this moment I didn't have the access for XI system. So here I have some silly question. Could you please clarify the same ??
    If I got to extract data from single table using JDBC adapter I can put the below query in communication channel
    SELECT *FROM orders WHERE new='true'.
    But if I got to extract data from multiple tables, logic to be used should be like as shown below. ( from previous thread------prabhu).
    SELECT <Table_2>.EID, <Table_2>.FName, <Table_2>.LName, <Table_1>.REC_DAT, <Table_1>.DESCRP
    FROM <Table_1> INNER JOIN <Table_2> on
    <Table_1>.CARDNO = <Table_2>.CARD
    where REC_DAT = <condition>
    union
    SELECT <Table_2>.EID, <Table_2>.FName, <Table_2>.LName, <Table_1>.REC_DAT, <Table_1>.DESCRP
    FROM <Table_1> INNER JOIN <Table_2> on
    <Table_1>.CARDNO = <Table_2>.CARD
    where REC_DAT = <condition>
    But my query is ........how to put the above entire code in one line. (i.e in Qery place of communication channel ) ??
    Thanks
    Kumar

    Hi Palnati,
        You either use a select query with join or a stored procedure which will contain the logic to extract the data from multiple tables. But, the limitation in case of stored procedure is u can hv only one selct query in it.
    You write ur actual query provided in the parameter 'Query SQL Statement". u can also wrt a stored procedure in it. Also, u can provide a update statement in it which will update a certain flag so tht u don selct the data again.
    Check the following link
    <a href="http://help.sap.com/saphelp_nw04/helpdata/en/14/80243b4a66ae0ce10000000a11402f/frameset.htm">http://help.sap.com/saphelp_nw04/helpdata/en/14/80243b4a66ae0ce10000000a11402f/frameset.htm</a>
    Regards,
    Akshay
    Message was edited by:
            Akshay Salunke

  • Query regarding the data type for fetcing records from multiple ODS tables

    hey guys;
    i have a query regarding the data type for fetcing records from multiple ODS tables.
    if i have 2 table with a same column name then in the datatype under parent row node i cant add 2 nodes with the same name.
    can any one help with some suggestion.

    Hi Mudit,
    One option would be to go as mentioned by Padamja , prefxing the table name to the column name or another would be to use the AS keyoword in your SQL statement.
    AS is used to rename the column name when data is being selected from your DB.
    So, the query  Select ename as empname from emptable will return the data with column name as empname.
    Regards,
    Bhavesh

Maybe you are looking for

  • Read id3 tags

    I'm looking for a way to read the id3 tags (id3 v2) from my mp3 collection - not happy with iTunes handling of these files. I've found id3lib in C#, is there a way to embed this into LV script?

  • Opening a Photoshop smart object file in Illustrator looks horrible (antialiasing problem)

    Hello all, This problem is killing me and I really wish I had done this logo in Illustrator, but I didn't now I have to suffer. Help! I am doing a freeland job for a friend so I am not all that and a bag of chips with Illustrator. I am better at Phot

  • Since 5.1 many image links do not work

    This must be the most bizarre bug of all times. Since upgrading to Safari 5.1 clicking on certain images produce NO result. Example: the icons (smileys, links, pictures, etc) of all of the forums I use when composing a post do nothing when I click on

  • XML service is not getting parsed

    Greetings!  My ip phone 9951 is not creating objects from xml service, it just returns xml code. This could be explained by the fact, that I'm doing something wrong, but I CAN see my service working as intended from another ip phone (model 8945). I h

  • Exporting CLOB

    While exporting a table containing a CLOB field I am getting the following error on Oracle 8.1.7. The length of the CLOB is more than 4K. EXP-00056: ORACLE error 24801 encountered ORA-24801: illegal parameter value in OCI lob function anybody knows h