How to extract data from cluster table

Hi, experts,
Here I want to extract change documents, which is from tables CDHDR(header) and CDPOS(line items). The problem is that CDPOS is a cluster table so that I can't create a view to develop a generic data source.
I have search on the forum and some one said generic data source based on function module was a choice, but I think coding FM is so complex, especially including delta implementation.
Could any one give me some advice? or give me some coding samples?
Thanks a lot!

Dear Sam,
I would suggest you to have a look at the function module CHANGEDOCUMENT_READ u2013 you can use this function module as a core in the developed function module for generic extractor. Unfortunately, the suggested function module can not handle import parameters for field names, so the strategy which can be applied here is to use this function module to fill the internal table based on restrictions on object class and table name and then go through filled internal table and delete records which are not relevant for fields KOFIZ or ABRSPERR.
As for delta implementation, would you please advise if delta relevant field based on timestamp generated on date and time of the change document is sufficient for your needs? If so then you can use fields UDATE and UTIME to generate timestamp on them including the field containing generated timestamp to the extract table. Next step here is to choose this field as delta relevant field in the Generic DataSource maintenance (TCode RSO2).
Please inform me if this solution suits you or if you have any questions or concerns regarding it.
My best regards,
Vadim

Similar Messages

  • How to Extract data from Cluster table  and transperant table

    Hello BW Experts ,
    I want to extract the data from cluster table BSEG and a transperant table BKPF .
    The primary fields are BELNR , GJHAR and BUKRS.
    the fields of table BKPF to extarct is BUDAT and fields of BSEG table is HKONT , BSCHL , ZUONR and POSID.
    I can not create a view over these two tables as BSEG is a Cluster table.
    Please guide me.
    Regadrs ,
    Amol.

    hi Amol,
    take a look Sigg's weblog
    /people/siegfried.szameitat/blog/2005/09/29/generic-extraction-via-function-module
    you can use RSAX_BIW_GET_DATA_SIMPLE as sample, there specified import parameters
    FUNCTION RSAX_BIW_GET_DATA_SIMPLE.
    ""Lokale Schnittstelle:
    *" IMPORTING
    *" VALUE(I_REQUNR) TYPE SRSC_S_IF_SIMPLE-REQUNR
    *" VALUE(I_DSOURCE) TYPE SRSC_S_IF_SIMPLE-DSOURCE OPTIONAL
    *" VALUE(I_MAXSIZE) TYPE SRSC_S_IF_SIMPLE-MAXSIZE OPTIONAL
    *" VALUE(I_INITFLAG) TYPE SRSC_S_IF_SIMPLE-INITFLAG OPTIONAL
    *" VALUE(I_READ_ONLY) TYPE SRSC_S_IF_SIMPLE-READONLY OPTIONAL
    *" TABLES
    *" I_T_SELECT TYPE SRSC_S_IF_SIMPLE-T_SELECT OPTIONAL
    *" I_T_FIELDS TYPE SRSC_S_IF_SIMPLE-T_FIELDS OPTIONAL
    *" E_T_DATA STRUCTURE SFLIGHT OPTIONAL
    *" EXCEPTIONS
    *" NO_MORE_DATA
    *" ERROR_PASSED_TO_MESS_HANDLER

  • How to fetch data from cluster tables

    hi
    i need to know  how to fetch data from cluster tables please update me if any
    i know that we cannot use joins in cluster table we use view etc
    but i need detailed inforation on methods for fetching data from cluster tables
    regards
    Nishant

    Hi,
        Check the following links
    http://fuller.mit.edu/hr/cluster_tables.html
    The specified item was not found.
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a0f46157-e1c4-2910-27aa-e3f4a9c8df33

  • 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

  • How to extract data from 12 tables ?

    Hi experts,
    I want to extract data from 12 tables into bi.
    How can we do this. And also can we extract some fields from
    a structure?
    Full points will be assigned.
    Regards,
    V N.

    Hi,
    First you need to check if the tables are standard tables or custom tables. If they are standard tables check which extractors are using those tables.
    If they are not being used by any of the standard extractors then you you need to create generic datasource for the same. The same hold true for custom tables as well. For custom tables, you'll need to create generic datasource. If you search the forum for generic datasources you'll get a lot of information.
    Its very important that you understand the table relationships, data volumes, if delta is possible or not, data granularity, etc for your datasource design.
    Cheers,
    Kedar

  • 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

  • How to select data from cluster table

    hi experts,
                   I have a report which picks data from bseg (cluster table ) for a month report it is taking around 4 minutes to process.I feel it is not good when take the report after some months.
    how to select data from these table???how to declare itab for these cluster tables????can we include any search condition or any other kind of internal table???
    please advice.
    mani

    Hi Manikandan,
    The following code may be helpful to understand how to select the data from cluster table.
    Types: Begin of ty_kna1,
    Kunnr type kna1-kunnr,
    adrnr type kna1-adrnr,
    end of ty_kna1,
    begin of ty_bseg,
    belnr type bseg-belnr,
    kunnr type bseg-kunnr,
    end of ty_bseg,
    begin of ty_final,
    belnr type bseg-belnr,
    kunnr type kna1-kunnr,
    adrnr type kna1-adrnr,
    end of ty_final.
    Data: it_kna1 type table of ty_kna1,
    wa_kna1 type ty_kna1,
    it_bseg type table of ty_bseg,
    wa_bseg type ty_bseg,
    it_final type table of ty_final,
    wa_final type ty_final.
    Select kunnr adrnr from kna1 into table it_kna1 where....
    if sy-subrc = 0.
    select belnr kunnr into table it_bseg for all entries in it_kna1 where kunnr = it_kna1-kunnr.
    endif.
    sort it_kna1 by kunnr.
    Loop at it_bseg into wa_bseg.
    move wa_bseg-belnr to wa_final-belnr.
    read table it_kna1 into wa_kna1 with kunnr = wa_bseg-kunnr binary search.
    if sy-subrc = 0.
    move: wa_kna1-kunnr to wa_final-kunnr,
    wa_kna1-belnr to wa_final-belnr.
    endif.
    append wa_final to it_final.
    clear wa_final.
    endloop.
    Loop at it_final into wa_final.
    write: / wa_final-belnr, wa_final-kunnr, wa_final-adrnr.
    endloop.
    Reward if useful.
    Thankyou,
    Regards.

  • How to access data from Cluster table....?

    Hi Experts,
    Can You plz tell How to import/read data from cluster table? Plz give me the syntaxes also..
    Thanx in advance.

    Types of TABLES and the differences
    Transparent tables
    Pool tables
    Cluster Tables
         From the user point of view, all tables are used to store data and there is no difference in behavior or operation of these tables. All of them can be managed by using the standard OPEN SQL. However from the administrator point of view, transparent tables do exists with the same structure both in the directory as well as the database, exactly with the same data and fields. While other two are not transparent in the sense that they are not manageable directly using database system tools. We cannot use Native SQL statements on these tables. These are logical tables, which are arranged as records of transparent tables.

  • How to  extract  data from PCD tables to create  custom activity report

    Hi Friends
    I have a requiremnt for creating custom portal activity report, even though we have
    standard report for that, we need to extract the data from the following pcd tables
    WCR_USERSTAT, WCR_WEBCONTENTSTAT,WCR_USERFIRSTLOGON,
    WCR_USERPAGEUSAGE.
    This extraced data will be used to create BW Reports.
    my questions  are
    1.How to extract the  data from   pcd tables?
    2.can i use   UME API   for  extracting the  data from the given PCD tables?
    3.Can i querry   the  PCD tables from JSPdynpage or  Webdynpro APP?
    Please guide me.
    Thanks in advance
    Ashok

    Hi Kishore,
    Refer to
    http://wiki.sdn.sap.com/wiki/display/Snippets/DirectAccesstoDatabaseTables
    http://wiki.sdn.sap.com/wiki/display/WDJava/OracleConnectivitywithEJBusingWebDynproApplication
    JDBC Connectivity with Webdynpro and Max DB
    Thanks
    Prashant

  • How to extract data from MDTC table.

    Hi all.
    I want to fetch data from MDTC table. But in that table field CLUSTD contain compressed data. How can i extract that data.
    Can i extract data for structure MDPSX.
    is MDTC table is used in function module MD_STOCK_REQUIREMENTS_LIST_API .
    Please help me and give the information.
    thanks.

    Dear Sam,
    I would suggest you to have a look at the function module CHANGEDOCUMENT_READ u2013 you can use this function module as a core in the developed function module for generic extractor. Unfortunately, the suggested function module can not handle import parameters for field names, so the strategy which can be applied here is to use this function module to fill the internal table based on restrictions on object class and table name and then go through filled internal table and delete records which are not relevant for fields KOFIZ or ABRSPERR.
    As for delta implementation, would you please advise if delta relevant field based on timestamp generated on date and time of the change document is sufficient for your needs? If so then you can use fields UDATE and UTIME to generate timestamp on them including the field containing generated timestamp to the extract table. Next step here is to choose this field as delta relevant field in the Generic DataSource maintenance (TCode RSO2).
    Please inform me if this solution suits you or if you have any questions or concerns regarding it.
    My best regards,
    Vadim

  • How to read data from cluster table.

    Hi experts.
    CDPOS  --- "Change document items"   ... is a cluster table.
    how to select data from it into an internal table....
    please help..
    i will award points for every help.
    thanks
    saurabh.

    Hi Saurabh,
    Use the foll. statement,
    IMPORT <f1> [TO <g 1>] <f 2> [TO <g 2>] ... FROM MEMORY ID <key>.
    For Eg,
    IMPORT ITAB TO JTAB FROM MEMORY ID 'table'.
    This code reads the internal table ITAB from the cluster "table" into the internal table JTAB.
    Hope it helps.

  • Need suggestion on how to extract data from a table

    Many years ago, I wrote many Perl scripts to increase my work productivity.
    Now I am starting learning Java, Javascript and PHP for some purposes. Just wrote a simple html2txt java program.
    Now I need experts' suggestion for one specific purpose - extract data from a html table. One of the examples is here: http://mops.tse.com.tw/nas/t06sa18/200902/A02_2454_200902.htm
    I need to extract datum from the table and make some analysis. (Txt is in Chinese, sorry)
    What is the best way to code it? Java, PHP or other? If Java, any suggestion what classes/module and approach to use?
    Thanks very much.

    xcomme wrote:
    Many years ago, I wrote many Perl scripts to increase my work productivity.
    Now I am starting learning Java, Javascript and PHP for some purposes. Just wrote a simple html2txt java program.
    Now I need experts' suggestion for one specific purpose - extract data from a html table. One of the examples is here: http://mops.tse.com.tw/nas/t06sa18/200902/A02_2454_200902.htm
    I need to extract datum from the table and make some analysis. (Txt is in Chinese, sorry)
    What is the best way to code it? It this a one shot (one time only task)? Then the best way is whatever way you are most comfortable with and which works.
    If on going then I doubt language choice matters but using a html parser rather than attempting to parse it yourself is going to help in any language.
    And are you starting with html files or starting with a http server? The two are very different.

  • How to extract data from Oracle Table to an Oracle XMLtype field

    All,
    I'm very new with ODI and I'm looking for a way to implement the following scenario:
    I have the Oracle table A, already mapped to Data Model A. This table has the following fields:
    field X (PK)
    field Y
    field Z
    field W
    I have a table B, already mapped to Data Model B. This table has the following fields:
    field X (PK)
    field V (XMLType)
    I want to extract the data from Table A to a XML file with the following structure:
    <X> yada yada yada </X>
    <Y> yada yada yada </Y>
    <Z> yada yada yada </Z>
    <W> yada yada yada </W>
    and then insert this file into the field V of Table B. How can I do that?
    TIA,
    Rodrigo

    You can use UDConnect to get from Oracle database in to BW
    <b>Data Transfer with UD Connect -</b>
    http://help.sap.com/saphelp_nw04/helpdata/en/78/ef1441a509064abee6ffd6f38278fd/content.htm
    <b>Prerequisites</b>
    You have installed the SAP WAS J2EE Engine with BI Java components.  You can find more information on this in the SAP BW installation guide on the SAP Service Marketplace at service.sap.com/instguides.
    Hope it Helps
    Chetan
    @CP..

  • How to extract data from monthly tables for annual balance chart?

    Hello Again!
    I am wanting to decide whether to enter all of my transactions into one table for the whole year or separate tables for each month. If I was to use one table for the whole year it would probably have in the region of 1000 entries, and as I understand it, Numbers doesn't work so well with such large tables. Also, as I will be mostly using Numbers on my iPad, where it runs slower, this may well slow things down considerably. Another reason for using Monthly Tables is that it would be easier to search.
    Having said this, I am using the following method to construct balance charts for my accounts which seems to depend on having just one table for all transactions for the year. Here is a sample of the transactions table:
    which updates the balance for each account after each new transaction is entered.
    Then I use the following table for creating the balance charts:
    It uses the following formula to return the balance at the end of each week for each account (this is the formula for Account 1) which then is displayed in the chart.
    =LOOKUP(A2,$Week Number,All Transactions :: Account 1)
    If I was to use the Monthly Tables method it is not obvious to me how I would create the Weekly Balance Table, given that I would need to draw data from 12 different tables, and that some of these Tables would contain the same Week Number (for weeks that overlap months).
    I would be grateful for any advice on achieving the result I am looking for by the most efficient method.
    Thanks
    Nick
    P.S. Hopefully this is the last question for a while!

    I wasn't urging you to keep an annual table but to spit it on an easier to rule basis.
    Split it in chuncks of exactly 35 days starting from the first one of the 'year' in operation
    Doing that everything will be easier
    the index of a day will be calculated by
    =DATEDIF(B,D,"D")+1
    The index of the 'custom_week' will be calculated by :
    =1INT((DATEDIF(B,D,"D")1)/7)
    So, it would be easy to gather datas from a given 'custom_week'.
    Yvan KOENIG (VALLAURIS, France) jeudi 5 août 2010 10:22:25

  • How to extract data from cluster of component levels?

    I use harmonic analyzer function to read out the component levels cluster, which cotain data for channel 0 and 1
     but have problem reading out the fundamental component for each channel ( array element 1). Pleas help.
    Thanks
    Solved!
    Go to Solution.
    Attachments:
    extract comonent levels cluster.doc ‏33 KB

    Uhhh....  you marked your reply as the accepted solution.  Give yourself a cigar!!!!
    Instead of using index, wire the array of clusters to a For Loop.  Set indexing enabled on the input terminal.  Then you can build an array of all the elements if you wish to handle it that way.  You can get an output array for each element in the cluster.  Not sure if this is desirable to you, just a thought.
    Message Edited by tbob on 04-20-2010 03:46 PM
    - tbob
    Inventor of the WORM Global

Maybe you are looking for