Reading Cluster Tables

How to read Cluster Tables.

Sample program
Import and export to database is used in two programs and not in the same program.
ZPROGRAM1.
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,
ZPROGRAM2.
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.

Similar Messages

  • How to read cluster tables

    Hi ,
    I have a requirement  to read cluster tables data using import statement . I have to access cluster tables data based on selection criteria . Any body help me regarding this isuue .
    Regards
    Uday

    Hi Uday,
    Check this one:
    [Extraction from cluster tables through function module|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a0f46157-e1c4-2910-27aa-e3f4a9c8df33]
    Re: BW extractor for ERP cluster tables
    Regards,
    Chandra Sekhar

  • Error reading cluster table COIX for report 13BUD1A

    Hi All,
    We have issue when display report 13BUD1A using t.code CJE0 in ECC6 system. The error message appear as per below:-
    Error reading cluster table COIX for report 13BUD1A (ID=13BUD1A     KP  01RPSCO_X                        0)
    Message no. KH050
    Diagnosis
    The report structure for report 13BUD1A is stored in the cluster table COIX. An error occurred while the system was reading this data (ID = 13BUD1A     KP  01RPSCO_X                        0).
    Table TKEB1 (Report List) contains administration information for report 13BUD1A. Consequently, table TKEB1 has an entry for the report, but table COIX does not.
    The error may have resulted following a transport -- COIX has not yet been transported to the current client but TKEB1 is already there.
    Procedure
    If it is a transport problem, see if you can execute report 13BUD1A in client 000. If so, import it to the current client again.
    If it is not a transport problem, delete report 13BUD1A from Tables TKEB1 and TKEB2.
    Need you advice, how can we solve this error.
    Thank You.

    Dear AP,
    Thanks for your reply. FYI, we dont have access to client 000. And how to resolve this issue without access client 000?

  • Special authorization need for read cluster table??

    In one report, I use following coding to read information from RFDT table:
    form get_f110_parm .
      f110id-laufd   = p_laufd.
      f110id-laufi   = p_laufi.
      f110versionpar = space.
      clear:   buktab, fkttab, slktab, sldtab, trctab, usrtab,
               faetab, jobtab, f110v, f110c,  trcopt, f110versionpar.
      import buktab fkttab slktab sldtab trctab usrtab
             faetab jobtab f110c trcopt f110versionpar
             from database rfdt(fb) id f110id
             accepting padding.
    endform.                    " GET_F110_PARM
    I can fill F110c, trcopt and f110versionpar by this program. But there is no entry in table like fkttab, usrtab.
    Is there any authorization need for read cluster table??
    Thanks in advance.
    Edited by: Amy Xie on Dec 21, 2010 10:41 AM

    Hello,
    After you run your code, check transaction SU53 to see if any authorization check failed.

  • Reading Cluster Table BSEG

    Just want to know though BSEG is a cluster table but we can read it using Select or use SQL statements meant for transparent table. How is it possible?
    Kindly clarify.
    Regards
    anya

    Hi,
    there a 2 types of 'cluster' tables. The first one is a physical cluster, linking of tables sort of speak. Here you can use select statements as already described in the above answers.
    see .<a href="http://help.sap.com/saphelp_47x200/helpdata/en/81/415d363640933fe10000009b38f839/frameset.htm">http://help.sap.com/saphelp_47x200/helpdata/en/81/415d363640933fe10000009b38f839/frameset.htm</a>
    Another type of cluster table is the one with a fixed structure. This can be used to store data dynamically with the export statement you speak of eg. you can store an intire internal table this way or a deep structure and later on extract it again.
    <a href="http://help.sap.com/saphelp_47x200/helpdata/en/fc/eb3c1f358411d1829f0000e829fbfe/frameset.htm">http://help.sap.com/saphelp_47x200/helpdata/en/fc/eb3c1f358411d1829f0000e829fbfe/frameset.htm</a>

  • Read from cluster table ZL-PCL2

    Hi all,
    I need to read cluster table ZL that stores wage type for pernr. Now previously i was suggested
    FM 'CU_READ_RGDIR'
    FM 'CD_RED_LAST'.
    FM 'PYXX_READ_PAYROLL_RESULT'. But i want to use the statement
    Import from database.
    i have included the file RPC2ZL00.
    then the statement
    Import ZL to ZZL from database PCL2(ZL) ID ZL-KEY.
    Now does anyone have idea abt ZL-KEY??
    means what value i need to feed in ZL-KEy and how do i feed it??
    thanks in advance for all those who help me..
    Reena

    Hi Reena,
    Key is the combination of Pernr & sequence no., which u see it from report display payroll result(HINCLSTR) or RGDIR table.
    Instead of Import statement You can also use macro as below .
      CALL FUNCTION 'CU_READ_RGDIR'
           EXPORTING
                PERSNR          = PERNR-PERNR
           TABLES
                IN_RGDIR        = RGDIR
           EXCEPTIONS
                NO_RECORD_FOUND = 1
                OTHERS          = 2.
      CHECK SY-SUBRC = 0.
      PAY_BEGDA = SEL-BEGDA.
      LOOP AT RGDIR WHERE SRTZA = 'A'  AND VOID = SPACE
                      AND  ( PAYDT >= SEL-BEGDA AND PAYDT <= SEL-ENDDA ).
        IF RGDIR-RUNDT >= PAY_RUNDT.
          MOVE RGDIR-RUNDT TO PAY_RUNDT.
          PAY_BEGDA = RGDIR-FPBEG.
          SEQNR = RGDIR-SEQNR.
        ENDIF.
      ENDLOOP.
      RX-KEY-PERNR = PERNR-PERNR.
      UNPACK SEQNR TO RX-KEY-SEQNO.
      <b>RP-IMP-C2-RU.</b> 
      CHECK RP-IMP-RU-SUBRC = 0.
    Read the cluster table
      LOOP AT CRT.
      ENDLOOP.
      Hope this helps.
    Thanks,
    Sarika.

  • How to read data from a CLUSTER STRUCTURE not cluster table.

    Hi,
    how to read data from a CLUSTER STRUCTURE not cluster table.
    regards,
    Usha.

    Hello,
    A structre doesnt contain data.. so u cannot read from it. U need to find out table of that structure and read data from it.
    Regards,
    Mansi.

  • To read data from cluster table  urgent

    i need to get personnel number(PERNR) from BSEG table which is a CLUSTER TABLE
    what else i have to add in here to get personnel number(PERNR)
    this code is giving no data only lots of ZEROS
    FORM getexpcode1 TABLES   in_tab21 STRUCTURE itcsy
                             out_tab21 STRUCTURE itcsy.
      DATA : w_belnr LIKE bseg-belnr,
                 w_bukrs LIKE bseg-bukrs,
                 w_gjahr LIKE bseg-gjahr,
                  w_pernr like bseg-pernr,
                 w_invnos(255).
    Read company code
      READ TABLE in_tab21 INDEX 1.
      IF sy-subrc = 0.
        w_bukrs = in_tab21-value.
      ENDIF.
    Read document number
      READ TABLE in_tab21 INDEX 2.
      IF sy-subrc = 0.
        w_belnr = in_tab21-value.
      ENDIF.
    Read Fiscal Year
      READ TABLE in_tab21 INDEX 3.
      IF sy-subrc = 0.
        w_gjahr = in_tab21-value.
      ENDIF.
      SELECT   pernr FROM bseg
        INTO  w_pernr
       WHERE  bukrs = w_bukrs
         AND  belnr = w_belnr
         AND  gjahr = w_gjahr.
      ENDSELECT.
      READ TABLE in_tab21 INDEX 1.
      out_tab21-value = w_pernr.
      MODIFY out_tab21 INDEX 1 TRANSPORTING value.
    ENDFORM.                    "GETEXPCODE1

    hi,
    try:
    SELECT pernr FROM bseg
    INTO w_pernr
    WHERE bukrs = w_bukrs
    AND belnr = w_belnr
    AND gjahr = w_gjahr
    AND PERNR <> SPACE.
    ENDSELECT.
    A.
    Message was edited by:
            Andreas Mann

  • Store/Read JPG/GIF as file on Application server,cluster table/MIME Rpstory

    Hello All ,
    I was trying to build up a ImageStore proxy class to save JPG/GIF in the following ways .
    u2022     File format on Application server with GUID reference / Whenever I need I can read/ archive it with  ID#
    u2022     In cluster table  - Same concept
    u2022     In MIME repository
    I am thinking to use MIME APIs which are already available in SAP system .   Let me know if anyone of you has any good suggestions/tips/tricks to do it .
    BTW I have looked at Thomas Jung  blog as a starting point .
    /people/thomas.jung/blog/2007/09/05/abap-bitmap-image-processing-class
    Thanks.
    Khan

    Solved myself!!! Canu2019t believe.  .. Donu2019t ask how ..Lots of coding involves.

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

  • 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

  • Reading Cluster and Pooled tables

    Hi,
         I have a requirement to read the following tables..
    BSEG, KNOV, CDPOS, T6B2Fand AUAA.
    out of which reading BSEG and CDPOS throwing timeout error. 20 million records each.
    The idea is to read these tables and split the primary key into individual keys and dump into a Z table.
    Your inputs are much valuable.
    Thanks
    AJ

    Hi,
    Please search the forum for the performance issues. These two table you've mentioned are very common giving performance issues. There are many posts on these table. Only option you have is using basic performance enhancement techniques.
    Thanks.
    Ravi

  • Edit next extent size of the Cluster table

    Hi Guys
    I need to change the next extent size of the a table.
    I ran se14 but i am not able to get into edit mode, because there is no button for edit mode.
    Reason: Cluster table
    Two questions:
    1. Why there is no Edit button? Is it because this table doesnot exixt at DB level.
    2. How can i change the next extent size for a Cluster table from sql prompt or from brtools if possible.
    Information:
    I am facing this issue only in DEV, QAS boxes, where as in Production its fine.
    Regards
    Ricky
    Edited by: Ricky kayshap on Dec 9, 2008 3:52 PM

    Hi,
    Cluster Tables doesn't exist in DB, Because of that you can't make changes to extents at DB level.
    if you experiencing some space issue. I woud suggest to check the underline Transparent tables and make changes to those.
    hope this helps.
    Kalyan.

  • How to fetch data for a struture from a cluster table

    How can I fetch data for a struture, from a cluster table, based on the name of the structure?

    Hi,
    In order to read from Cluster DB Table use the following statement:
    Syntax
    IMPORT <f1> [ TO  < g1 > ] <f2> [TO < g2 >] ...
    FROM DATABASE <dbtab>(<ar>)
    [CLIENT <cli>] ID <key>|MAJOR-ID <maid> [MINOR-ID <miid>].
    This statement reads the data objects specified in the list from a cluster in the database <dbtab>.
    You must declare <dbtab> using a TABLES statement. If you do not use the TO <gi> option, the
    data object <fi> in the database is assigned to the data object in the program with the same
    name. If you do use the option, the data object <fi> is read from the database into the field <gi>.
    For <ar>, enter the two-character area ID for the cluster in the database. The name <key>
    identifies the data in the database. Its maximum length depends on the length of the name field
    in <dbtab>.
    The CLIENT <cli> option allows you to disable the automatic client handling of a client-specific cluster database, and specify the client yourself. The addition must always come directly after the name of the database.
    For Eg:
    PROGRAM SAPMZTS3.
    TABLES INDX.
    DATA: BEGIN OF JTAB OCCURS 100,
    COL1 TYPE I,
    COL2 TYPE I,
    END OF JTAB.
    IMPORT ITAB TO JTAB FROM DATABASE INDX(HK) ID 'Table'.
    WRITE: / 'AEDAT:', INDX-AEDAT,
    / 'USERA:', INDX-USERA,
    / 'PGMID:', INDX-PGMID.
    SKIP.
    WRITE 'JTAB:'.
    LOOP AT JTAB FROM 1 TO 5.
    WRITE: / JTAB-COL1, JTAB-COL2.
    ENDLOOP.
    Regards,
    Neha
    Edited by: Neha Shukla on Mar 12, 2009 1:35 PM

  • How do I get to know the structures stored in a cluster table

    Dear fellow developers,
    this question is about Cluster Tables of the INDX-type which need to be read with
    IMPORT/EXPORT FROM/TO ...
    I need some advice concerning the question of how to find
    out the definition of a structured field in such a cluster.
    To be more precise:
    By using the command
    IMPORT DIRECTORY ...
    I know that in the table/cluster
    VARI
    section
    VB
    there are two structured
    fields the content of which I'm interested in for reading and writing purposes:
    %_VARI40C
    and
    %_VARIVDAT
    I already know the structure of the first one, but only because I found a Standard FM that reads it with an appropriately defined WA-structure, but I cannot find something similar to find out the structure definition for the other one (%_VARIVDAT). It can't be possible that this is so difficult to find out. There must be some better and easier way to find this out that I don't know yet...
    Thanks in advance for your appreciated help
    Andreas

    Hi Andreas,
    I think you have nothing into SAP to find the structure of a cluster table.
    The way I use, is to find a standard program that use this cluster, and I look in the ABAP code the structure used by SAP.
    You just have to use the ST05, and use the option to see the code where the cluster has been readed.
    Rgd
    Frédéric

Maybe you are looking for