Import data from cluster table to internal table ?

Hi 
My Cluster table is Zcar_00 .
I have 2 tables for zcar_00 . Name is zcar_01 and zcar_02 . 
zcar_01 values :
VARKEY  PAGENO MAKE
  V1         1  OPEL
  V2         2  BMW
  V3         3  AUDI 
zcar_02 values :
VARKEY PAGENO MARKA MODEL
V1        1  OPEL  ASTRA
V1        1  OPEL  CORSA
V1        1  OPEL  VCTRA
V2        2  BMW   116
V2        2  BMW   316
V3        3  AUDI  A6 
I want to read data in this cluster table (zcar_01 , z_car02 ) .
My code is :
IMPORT ITAB TO JTAB FROM DATABASE  zaraba_00 (*error* ) ID 'MARKA'.
How can I do ?
thanks for reply ..
serkann

Hi,
Go through the following code.
TYPES:
  BEGIN OF tab,
    col1 TYPE i,
    col2 TYPE i,
  END OF tab.
DATA:
  wa_indx TYPE indx,
  wa_itab TYPE tab,
  cl      TYPE mandt VALUE '100',
  itab    TYPE STANDARD TABLE OF tab.
IMPORT tab = itab FROM DATABASE indx(xy) TO   wa_indx CLIENT cl  ID 'TABLE'.
WRITE: wa_indx-aedat, wa_indx-usera, wa_indx-pgmid.
ULINE.
LOOP AT itab INTO wa_itab.
  WRITE: / wa_itab-col1, wa_itab-col2.
ENDLOOP.

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 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.

  • Read data from cluster tables

    Hi,
      I met a problem.
      How to read data from cluster tables using:
      b2-key-pernr = 20.
      b2-key-pabrj = 2006.
      b2-key-pabrp = 09.
      b2-key-cltyp = '1'.
      import saldo from database pcl2(b2) id b2-key.
    the problem is that the sy-subrc is always 4, could anyone help me?
    thank you very much!

    Hi,
    Import and export to database is used in two programs and not in the same program.
    <b>ZPROGRAM1.</b>
    tables : indx.
    Data : SALDO type i,
           indxkey LIKE indx-srtfd VALUE 'ZAB1'.
      indx-aedat = sy-datum.
      indx-usera = sy-uname.
      indx-pgmid = sy-repid.
    EXPORT SALDO TO DATABASE indx(zc) ID indxkey.
    In another program,
    <b>ZPROGRAM2.</b>
    tables : indx.
    Data : SALDO type i,
           indxkey LIKE indx-srtfd VALUE 'ZAB1'.
      indx-aedat = sy-datum.
      indx-usera = sy-uname.
      indx-pgmid = sy-repid.
      IMPORT SALDO FROM DATABASE indx(zc) ID indxkey.
    Best regards,
    Prashant

  • 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.

  • SELECT is taking lot of time to fetch data from cluster table BSET

    <Modified the subject line>
    Hi experts,
    I want to fetch data of some fields from bset table but it is taking a lot of time as the table is cluster table.
    Can you please suggest me any other process to fetch data from cluster table. I am using native sql to fetch data.
    Regards,
    SURYA
    Edited by: Suhas Saha on Jun 29, 2011 1:51 PM

    Hi Subhas,
    As per your suggestion I am now using normal SQL statement to select data from BSET but it is still taking much time.
    My SQL statement is :
    SELECT BELNR
                  GJAHR
                  BUZEI
                  MWSKZ
                  HWBAS
                  KSCHL
                  KNUMH FROM BSET INTO CORRESPONDING FIELDS OF TABLE IT_BSET
                  FOR ALL ENTRIES IN IT_BKPF
                  WHERE BELNR = IT_BKPF-BELNR
                      AND BUKRS = IT_BKPF-BUKRS.
    <Added code tags>
    Can you suggest me anymore?
    Regards,
    SURYA
    Edited by: Suhas Saha on Jun 29, 2011 4:16 PM

  • Import data from few tables and export into the same tables on different db

    I want to import data from few tables and export into the same tables on different database. But on the target database, additional columns have been added
    to the same tables. how can i do the import?
    Its urgent can anyone please help me do this?
    Thanks.

    Hello Junior DBA,
    maybe try it with the "copy command".
    http://download.oracle.com/docs/cd/B14117_01/server.101/b12170/apb.htm
    Have a look at the section "Understanding COPY Command Syntax".
    Here is an example of a COPY command that copies only two columns from the source table, and copies only those rows in which the value of DEPARTMENT_ID is 30:Regards
    Stefan

  • Retrieve data from cluster tables

    hi
    can any one explain me how to retrieve data from cluster tables
    Regards
    sachin

    you can write a select
    select * from KONV
           into table it_konv
    where <condition>
    you cant join.. cluster tables..

  • 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

  • Importing data from Cluster

    Hi,
    I am importing data from cluster PCL2, RT table for Indonesia country code is 34 and RELID is IS.
    The amount which i am getting in RT table is coming wrong. For Eg - 40,00,000 is coming as 40,000.
    Please help.
    Thanks in advance

    solved

  • 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.

  • Using  FDM Import Action script to import data from ERPI table "tdataseg_t"

    Hi Experts
    I have extracted data from EBS using ERPI and loaded into the intermediate table "tdataseg_t"
    I am trying to use Import Action script within FDM to extract data from "tdataseg_t" table (where ERPI extract data is stored) as i could not use the normal import script.
    Requirement : I have to restrict the custom 2 dimension based on Account dimension.
    Dim Account
    Account = ???? ( i am struck here)
    If Account = 1000 to 5000 Then
    Custom2 = Right( product , 5)
    End If
    but , I could not find the exact syntax to call the Account dimension from the "tdataseg_t" table.
    Please Advise
    Thanks
    Sak
    Edited by: user12292415 on Feb 26, 2012 1:19 AM

    Hello,
    Importing data via a manual script defeats the purpose of ERPi. As it will not provide you an audit trail, drill-through/drill-back, etc.
    Your best bet is to use the default settings by the software. Just because it returns more records than you want is not a bad thing. You can conditionally change/alter the information either in an EventScript inside of FDM or by mapping the un-needed information to IGNORE.
    Thank you,

  • Data from Cluster Tables

    Hi,
      I am fetching data from BSEG  table , by using for all entries . But it is taking long time. Is there any other to do it for tables like BSEG ( Cluster tables ). Please help me .
    Regards,
    Prasad

    Hi Prasad
    You could  use  hashed tables to
    retrieve data from BSEG. That will be faster.
    According to the analysis on how sap retrieves the data from a cluster table (like bseg),it's almost the same to use a
    loop at  ht_bkpf -> select from bseg ... endloop
    or
    select ... from bseg
    for all entries in ht_bkpf where ....
    Regards
    Inder

  • 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

  • Problem retreving data from cluster table

    Hi friends,
    Iam facing a problem while retreving data from a cluster table..
    select knumv
              kposn
              krech
              kawrt
              kbetr
              waers
              kpein
              kmein
              kwert
              from konv
              into table gt_konv
              where knumv in s_agnm.
    In s_agnm i have 8 entries ie: iam giving manually 8 entries in s_sgnm-low.
    If i do the above way iam getting exactly the 82 entries which i have in KONV table.. This is perfect..
    But when iam using for all  entries iam getting only 58 records from the KONV table..
    ie :
        SELECT KNUMV
               KPOSN
               KRECH
               KAWRT
               KBETR
               WAERS
               WAERS
               KPEIN
               KMEIN
               KWERT
               FROM KONV
               INTO TABLE ITAB1
               FOR ALL ENTRIES IN ITAB
               WHERE KNUMV = ITAB-F1
    Here F1 is the field which is same as S_SGNM as above and it also contains same number of records as above
    Now when iam running the 2nd select statment iam getting only 58 entries ... instead it should get 82 entries as above...
    Can any one tell me how to correct..
    Regards
    Kumar

    even if i use all the key fields , its giving me the same results 58 reocrds, instead it should give me 82.
    select knumv
           kposn
           stunr
           zaehk
           from konv
           into table gt_tybh
           where knumv in s_agnm.
      if gt_tybh is not INITIAL.
        sort gt_tybh by agreement_number kposn stunr zaehk.
       select knumv
              kposn
              krech
              kawrt
              kbetr
              waers
              kpein
              kmein
              kwert
              from konv
              into table gt_konv
              for all entries in gt_tybh
              where knumv = gt_tybh-agreement_number and
                    kposn = gt_tybh-kposn and
                    stunr = gt_tybh-stunr and
                    zaehk = gt_tybh-zaehk.
    In the above iam getting all the 82 records for the select-options s_sgnm..
    later iam trying to get the other fields form the same konv table by using for all entries... here even if iam using all the key fields also its not getting me the total 82 records...
    Initially for s_sgnm which contains 8 values , for those 8 values iam getting 82 records it table gt_tybh. But later when iam using for all entries iam not getting those 82 records in the 2nd select statment in the internal table gt_konv.
    Why is this happening...
    can any one correct it..
    Regards
    Kumar

Maybe you are looking for

  • Cannot reject/delete sales order line item due to del.date in 2210

    Hi all, not sure if anyone else had this issue already.... Situation : Sales order line item entered with delivery date in 2210.    We would like to correct this order but can't.... every time SAP issues error : Error determining posting period (info

  • Trouble updating ipod software

    Yesterday I hooked my Ipod up to my computer (IBM Thinkpad running Windows XP Pro on a Centrino processor) it asked me to update my Ipod software. After it was complete it started showing a weird icon which i couldnt find in the ipod iconology in sup

  • Restricted Key Figure Column heading text missing

    Hello, I created a restricted Key Figure in a BEX report and dragged this RKF into the columns tab. when i execute the report , the column header text for the restricted key figure is missing. The values are fine, but the header column text  for that

  • Moving files within a session - am I missing something?!

    I posted about this last week but thought I'd ask pretty much the same question a different way! (And thanks to the guys who answered before.) OK, I make radio documentaries. Yesterday, I finished a 60 minute piece that was a continuous flow of sound

  • Maximum Number of ListPartitions on a Table.

    Hi All, I am having a table say here EMP_HISTORY which is going to have 1 Billion records. ORACLE Version: 10gR2. The table structure will be as given below. EMP_HIST_ID NUMBER, EMPNO NUMBER, ENAME VARCHAR2(4000), PREV_SAL NUMBER, PREV_DEPTNO NUMBER,