Handling High Number Records in ABAP Table

Hi,
Other than creating indexes is there other option to handle in an efficient way searches in an ABAP table containing more than 30 million records?
Thanks in advance.

Hi Ruben,
for me indexing would be the way to go: It totally depends on your access pattern. If you often read by a primary key and have no big volume queries around it would be ok.
mentioned physical Partitioning is a good option IF you can find a meaningful partition key that more or less evenly spreads the data over the partitions (i.e.  12 FISCPER that divides the 30 Mio. into partitions of 2- 3 Mio records) and that this key is used by all the quries you would start on that table. The index would be equi-partitioned. You have your DBA involved for this option; SE14 supports the physical partitioning of a table.
the other options mentioned (OPEN CURSOR...) are not much of help if you have to do number crunching;
(however, to write good SQL is the key to good performance so avoid the common pitfalls mentioned there).
You may consider a reliable archiving strategy that keeps your table on a certain row level while you move the "old" data in a kind of history table from time to time. If you need all data you would UNION  both tables.
you can hint an SQL with a PARALLEL clause to speed up the processing (i.e. you retrieve all or a big amount of the 30 Mio rows)
bye
yk

Similar Messages

  • How to handle the failed records from the table when using DB Adapter

    Hi,
    I am reading some records from table using DB Adapter inside my synchronous BPEL process. Say like reading 100 records from table in between after successful reading of 90 records an error occured in 91st record due some various reasons(like DB down, Connection interrupted etc.). Then how to handle this situation, whether i have to read all the records from the begining and is there any option to continue from where it stopped reading.
    Can please anybody help me out in the regard?
    Thanks in advance
    Regards,
    Aejaz

    we had the same requirement some time ago and had two option:
    1. ask the R/3 development team add a deletion indicator in the table (and thus not actually deleting the record). this deletion indicator could then be used like for any other standard datasource
    this option was however refused, due to huge data volume after a while
    2. at the end of the load we copied the ZTABLE1 to ZTABLE2. then in the begin of the load (day after) we compare the data of table1 to table2. entries available in table2 but not in table1 are deleted, and we put a 'D'. in deletion indicator; as we only keep the deleted entries for one day, the volume of the new table is acceptable.
    M.

  • How to handle a number of records in stored procedure?

    i wanna handle a number of records in a stored procedure one by one.
    what should i do?
    can any one give me some sample about the following question?
    Q:
    tb_main,tb_attach are two tables.
    i want to create a procedure to write off a record in tb_main. before do that, i want to write off all records in tb_attach which is related with the record to be written off in tb_main. and a procedure named pr_write_off_attach for writing off a record in tb_attach has been created already.
    what should i do?
    help!!
    null

    Dg.dataProvider.length is the number of records in the ArrayCollection
    Dg.rowCount is the number of visible rows.
    Alex Harui
    Flex SDK Developer
    Adobe Systems Inc.
    Blog: http://blogs.adobe.com/aharui

  • WLI problem when processing a high number of records - SQLException: Data e

    Hi
    I'm having some trouble with a process in WLI when processing a high number of records from a table. I'm using WLI 8.1.6 and Oracle 9.2.
    The exception I'm getting is:
    javax.ejb.EJBException: nested exception is: java.sql.SQLException: Data exception -- Data -- Input Data length 1.050.060 is greater from the length 1.048.576 specified in create table.
    I think the problem is not with the table because it's pretty simple. I'll describe the steps in the JPD below.
    1) A DBControl checks to see if the table has records with a specific value in a column.
    select IND_PROCESSADO from VW_EAI_INET_ESTOQUE where IND_PROCESSADO = 'N'
    2) If there is one or more records, we update the column to another value (in other DBControl)
    update VW_EAI_INET_ESTOQUE  set IND_PROCESSADO = 'E' where IND_PROCESSADO = 'N'
    3) We then start a transaction with following steps:
    3.1) A DBControl queries for records in a specific condition
    select
    COD_DEPOSITO AS codDeposito,
    COD_SKU_INTERNO AS codSkuInterno,
    QTD_ESTOQUE AS qtdEstoque,
    IND_ESTOQUE_VIRTUAL AS indEstoqueVirtual,
    IND_PRE_VENDA AS indPreVenda,
    QTD_DIAS_ENTREGA AS qtdDiasEntrega,
    DAT_EXPEDICAO_PRE_VENDA AS dataExpedicaoPreVenda,
    DAT_INICIO AS dataInicio,
    DAT_FIM AS dataFim,
    IND_PROCESSADO AS indProcessado
    from VW_EAI_INET_ESTOQUE
    where IND_PROCESSADO = 'E'
    3.2) We transform all the records found to and XML message (Xquery)
    3.3) We update again update the same column as #2 to other value.
    update VW_EAI_INET_ESTOQUE set  IND_PROCESSADO = 'S'   where IND_PROCESSADO = 'E'.
    4) The process ends.
    When the table has few records under the specified condition, the process works fine. But if we test it with 25000 records, the process fails with the exception below. Sometimes in the step 3.1 and other times in the step 3.3.
    Can someone help me please?
    Exception:
    <A message was unable to be delivered from a WLW Message Queue.
    Attempting to deliver the onAsyncFailure event>
    <23/07/2007 14h33min22s BRT> <Error> <EJB> <BEA-010026> <Exception occurred during commit of transaction
    Xid=BEA1-00424A48977240214FD8(12106298),Status=Rolled back. [Reason=javax.ejb.EJBException: nested
    exception is: java.sql.SQLException: Data exception -- Data -- Input Data length 1.050.060 is greater from the length  1.048.576 specified in create table.],numRepliesOwedMe=0,numRepliesOwedOthers= 0,seconds since begin=118,seconds left=59,XAServerResourceInfo[JMS_cgJMSStore]=(ServerResourceInfo[JMS_cgJMSStore]=(state=rolledback,assigned=cgServer),xar=JMS_cgJMSStore,re-Registered =
    false),XAServ erResourceInfo[weblogic.jdbc.wrapper.JTSXAResourceImpl]=(ServerResourceInfo[weblogic.jdbc.wrapper.JTSXAResourceImpl]=
    (state=rolledback,assigned=cgServer),xar=weblogic.jdbc.wrapper.JTSXAResourceImpl@d38a58,re-Registered =false),XAServerResourceInfo[CPCasaeVideoWISDesenv]=
    (ServerResourceInfo[CPCasaeVideoWISDesenv]=(state=rolledback,assigned=cgServer),xar=CPCasaeVideoWISDesenv,re-Registered = false),SCInfo[integrationCV+cgServer]=(state=rolledback),
    properties=({weblogic.jdbc=t3://10.15.81.48:7001, START_AND_END_THREAD_EQUAL=false}),
    local properties=({weblogic.jdbc.jta.CPCasaeVideoWISDesenv=weblogic.jdbc.wrapper.TxInfo@9c7831, modifiedListeners=[weblogic.ejb20.internal.TxManager$TxListener@9c2dc7]}),OwnerTransactionManager=ServerTM[ServerCoordinatorDescriptor=
    (CoordinatorURL=cgServer+10.15.81.48:7001+integrationCV+t3+,
    XAResources={JMS_FileStore, weblogic.jdbc.wrapper.JTSXAResourceImpl, JMS_cgJMSStore, CPCasaeVideoWISDesenv},NonXAResources={})],CoordinatorURL=cgServer+10.15.81.48:7001+integrationCV+t3+): javax.ejb.EJBException: nested exception is: java.sql.SQLException: Data exception -- Data -- Input Data length 1.050.060 is greater from the length 1.048.576 specified in create table.
            at com.bea.wlw.runtime.core.bean.BMPContainerBean.ejbStore(BMPContainerBean.java:1844)
            at com.bea.wli.bpm.runtime.ProcessContainerBean.ejbStore(ProcessContainerBean.java:227)
            at com.bea.wli.bpm.runtime.ProcessContainerBean.ejbStore(ProcessContainerBean.java:197)
            at com.bea.wlwgen.PersistentContainer_7e2d44_Impl.ejbStore(PersistentContainer_7e2d44_Impl.java:149)
            at weblogic.ejb20.manager.ExclusiveEntityManager.beforeCompletion(ExclusiveEntityManager.java:593)
            at weblogic.ejb20.internal.TxManager$TxListener.beforeCompletion(TxManager.java:744)
            at weblogic.transaction.internal.ServerSCInfo.callBeforeCompletions(ServerSCInfo.java:1069)
            at weblogic.transaction.internal.ServerSCInfo.startPrePrepareAndChain(ServerSCInfo.java:118)
            at weblogic.transaction.internal.ServerTransactionImpl.localPrePrepareAndChain(ServerTransactionImpl.java:1202)
            at weblogic.transaction.internal.ServerTransactionImpl.globalPrePrepare(ServerTransactionImpl.java:2007)
            at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:257)
            at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:228)
            at weblogic.ejb20.internal.MDListener.execute(MDListener.java:430)
            at weblogic.ejb20.internal.MDListener.transactionalOnMessage(MDListener.java:333)
            at weblogic.ejb20.internal.MDListener.onMessage(MDListener.java:298)
            at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:2698)
            at weblogic.jms.client.JMSSession.execute(JMSSession.java:2610)
            at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:224)
            at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:183)
    Caused by: javax.ejb.EJBException: nested exception is: java.sql.SQLException: Data exception -- Data -- Input Data length 1.050.060 is greater from the length 1.048.576 specified in create table.
            at com.bea.wlw.runtime.core.bean.BMPContainerBean.doUpdate(BMPContainerBean.java:2021)
            at com.bea.wlw.runtime.core.bean.BMPContainerBean.ejbStore(BMPContainerBean.java:1828)
            ... 18 more

    Hi Lucas,
    Following is the information regarding the issue you are getting and might help you to resolve the issue.
    ADAPT00519195- Too many selected values (LOV0001) - Select Query Result operand
    For XIR2 Fixed Details-Rejected as this is by design
    I have found that this is a limitation by design and when the values exceed 18000 we get this error in BO.
    There is no fix for this issue, as itu2019s by design. The product always behaved in this manner.
    Also an ER (ADAPT00754295) for this issue has already been raised.
    Unfortunately, we cannot confirm if and when this Enhancement Request will be taken on by the developers.
    A dedicated team reviews all ERs on a regular basis for technical and commercial feasibility and whether or not the functionality is consistent with our product direction. Unfortunately we cannot presently advise on a timeframe for the inclusion of any ER to our product suite.
    The product group will then review the request and determine whether or not the functionality/feature will be included in a future release.
    Currently I can only suggest that you check the release notes in the ReadMe documents of future service packs, as it will be listed there once the ER has been included
    The only workaround which I can suggest for now is:
    Workaround 1:
    Test the issue by keep the value of MAX_Inlist_values parameter to 256 on designer level.
    Workaround 2:
    The best solution is to combine 'n' queries via a UNION. You should first highlight the first 99 or so entries from the LOV list box and then combine this query with a second one that selects the remaining LOV choices.
    Using UNION between queries; which is the only possible workaround
    Please do let me know if you have any queries related to the same.
    Regards,
    Sarbhjeet Kaur

  • Tables with more than one cell with a high number of rowspan (ej. 619). This cell can not be print in a page and it must be cut. But I don't know how  indesign can do this action.

    Tables with more than one cell with a high number of rowspan (ej. 619). This cell can not be print in a page and it must be cut. But I don’t know how  indesign can do this action.

    set the wake-on lan on the main computer
    The laptop's too far away from the router to be connected by ethernet. It's all wifi.
    No separate server app on the laptop, it's all samba
    The files are on a windows laptop and a hard drive hooked up to the windows laptop. The windows share server is pants, so I'd need some sort of third party server running. Maybe you weren't suggesting to use Samba to connect to the windows share though?
    I'm glad that you've all understood my ramblings and taken and interest, thanks The way I see it, I can't be the only netbook user these days looking for this kind of convenience, and I certainly won't be once chrome and moblin hit the market.
    Last edited by saft (2010-03-18 20:38:08)

  • Record level lock on SAP ABAP table editing

    Hello All,
    I have a requirement wherein I need to give users ability to be able to update contents of a table. Currently, there are using maintenance view on the table for adding/editing contents of this table. However, this prevents other users from being able to enter the table and edit contents of other records within the table.
    Can anybody please guide me how do I go about giving record level edit lock on the table instead of entire table edit lock.
    Appreciate all responses.
    Thanks and Regards,
    Samta.

    Ok
    I  have had a request like yours, i.e the users could manage the same table in the same time.
    The standard behavior avoids it, because a lock of entire table is set.
    This was my solution:
    A) I've created a maintenance view for my table, and I set the attibute S (for subset) for all fields will be the key I want to lock.
    B) I've generated the maintenance table program for the view above.
    In this way if it try to manage the view by SM30, it'll be possible only to indicate the  values of the fields for the subset, so not all data of the table will be loaded, but only the records satisfying  the key.
    C) I've created a program to run SM30 for my view, using the fm VIEW_MAINTENANCE_CALL:
    .CALL FUNCTION 'VIEW_MAINTENANCE_CALL'
           EXPORTING
                action      = 'S'  "Display mode
                view_name   = <table name>
           TABLES
                dba_sellist = tb_sellist
           EXCEPTIONS
                OTHERS      = 14.
    As you can see above, the SM30 is always called for DISPLAY only, in this way no standard lock is set
    D) I've use the event 19 in order to change the mode and set my lock:
    DATA: BEGIN OF MY_LOCK,
              MANDT       TYPE ZPPTA019-MANDT,
              WERKS       TYPE ZPPTA019-WERKS,
              /TRILOG/SE  TYPE ZPPTA019-/TRILOG/SE,
              COD_MOD_TAG TYPE ZPPTA019-COD_MOD_TAG,
            END OF MY_LOCK.
      DATA: W_SEL_LIST TYPE VIMSELLIST.
      DATA: VARKEY TYPE RSTABLE-VARKEY.
      FIELD-SYMBOLS: <MY_KEY> TYPE ANY.
      LOOP AT DBA_SELLIST INTO W_SEL_LIST
        WHERE VIEWFIELD = 'WERKS'
          OR  VIEWFIELD = '/TRILOG/SE'
          OR  VIEWFIELD = 'COD_MOD_TAG'.
        ASSIGN COMPONENT W_SEL_LIST-VIEWFIELD
           OF STRUCTURE MY_LOCK TO <MY_KEY>.
        IF SY-SUBRC = 0.
          MOVE W_SEL_LIST-VALUE TO <MY_KEY>.
        ENDIF.
      ENDLOOP.
      IF SY-SUBRC = 0.
        IF NOT MY_LOCK IS INITIAL.
          MY_LOCK-MANDT = SY-MANDT.
          VARKEY = MY_LOCK.
          CALL FUNCTION 'ENQUEUE_E_TABLEE'
            EXPORTING
              MODE_RSTABLE   = 'E'
              TABNAME        = 'ZPPTA019'
              VARKEY         = VARKEY
            EXCEPTIONS
              FOREIGN_LOCK   = 1
              SYSTEM_FAILURE = 2
              OTHERS         = 3.
          IF SY-SUBRC <> 0.
            MESSAGE ID SY-MSGID TYPE 'S' NUMBER SY-MSGNO
                    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          ELSE.
            MAINT_MODE = VIEW_ACTION = 'U'.
          ENDIF.
        ENDIF.
      ENDIF.
      CLEAR OLD_019.
    I hope it can help you
    Max

  • How to handle BLOB field in receiver JDBC adapter into ABAP table

    Dear Experts,
    I am working in a synchronous scenario with Sender ABAP Proxy to Oracle Database as receiver via SAP PO 7.4.I will be calling a stored procedure view with fields ID, NAME,Age,*** and BLOB (Image binary).
    1. The response from Oracle Database field BLOB is to be stored in ABAP table.Would I have to write any JAVA program to read the BLOB or the receiver JDBC adapter will handle it and store in a table by using ABAP proxy once it reaches ECC.
    2. If yes, would the JAVA program have to deal with other 4 fields.
    3. Can I use a UDF mapping to this BLOB field.
    Regards
    Rebecca...

    Dear Praveen,
    Thanks for your response...
    Please correct me if I am wrong.
    1. For 1-1 response mapping for BLOB field, I will use just use the below UDF code.
    public static byte[] hexStringToByteArray(String s) { 
                int len = s.length(); 
                byte[] data = new byte[len / 2]; 
                for (int i = 0; i < len; i += 2) { 
                            data[i / 2] = (byte) ((Character.digit(s.charAt(i), 16) << 4) 
                                                                                         + Character.digit(s.charAt(i+1), 16)); 
                return data; 
    2. ===Using the byte data, create binary attachment in mapping for abap proxy response===
    Could you please share how to create the binary attachment.. I am not clear
    Regards...

  • How to read records from Relationship table using ABAP API's

    Hi All,
    I need to retrieve the records from Relationship table. In Java API's I came to know there is an option to retrieve this. I could not find anything in ABAP API's. Is there any option in ABAP API's to do this.
    Please Suggest.
    Thank You,
    Gajendra.

    Hi Gajendra,
    You can mainly read records from MDM (in a DDIC structure) using ABAP API's using the following function modules/methods:
    1. RETRIEVE: This is used to generically retrieve records from tables. Attributes and Values can also be retrieved.
    2. RETRIEVE SIMPLE: Retrieve records from MDM in a simple way.( simple data types).
    3. RETRIEVE CHECKOUT: Retrieves all checked out ID's.
    4. RETRIEVE ATTRIBUTES: Retrieves attribute(s) from a Taxanomy table.
    You will find all these methods in the following interface
    Interface : IF_MDM_CORE_SERVICES
    Hope it helps.
    *Please reward points if found useful.
    Thanks and Regards
    Nitin Jain

  • Number of records in FAGLFLEXT table

    Dear colleagues,
    Could You please tell me what the maximum number of records FAGLFLEXT table may contain.
    I was said during FI-GL migration project in 2008 that the optimal number of records is 500 000 per year.
    After having implemented new project we expect the number of records to increase approximately up to 1 500 000 - 3 500 000 records for 1 year. Is this critical?
    I read at the forum that SAP recommends to have maximum 10 000 000 records in this table but it was not clarified for what period: for one year or for the whole life of the system.
    Regards,
    Stanislav.

    - hope below notes help.
    [Note 820495|https://websmp230.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=820495]
    [Note 1045430|https://websmp230.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=1045430]
    Rgds.

  • Number of records in SETUP table

    Hello
    I am working with PO extractor. Is the number of records in XXXXXXSETUP table equal to the number of records setup?

    Hi if I understand the question the answer is no.  For example I have recently carried out a setup run for Stock Initialisation MC03BX0SETUP.
    The number of records in this table is just over 4000 and when I carry out an opening balance load to BW for the 2LIS_03_BX the number of records are just under 2million
    The setup tables are cluster tables

  • NUMBER OF RECORDS IN EACH TABLE???

    Hi!
    how can i find the number of records in each table in the database. the result should be like this
    table_1 123
    table_2 60
    table_3 88
    thanks!!
    also if we want to see it only for a particular schema???

    You can get all the table names and schemas from ALL_TABLES table.
    then you can stored that on a cursor,
    then you can create a function where you use an execute_immediate to run the queries dinamically. with that you can run a COUNT for each TABLE
    That's the idea give it a shot :)
    Regards

  • How  to retrieve one row from the number of records in a table

    i want to retrieve the rows from the number of records in a table without using the perticular column name.

    select count(*) from table
    /If you have your table currently analyzed, and no changes have been made, then you could
    select num_rows from user_tables where table_name = 'table'

  • RFC function to return number of records in a table

    Hello,
    I am looking for a RFC function to return just the number of records in a SAP table.
    I don't want to use RFC_READ_TABLE since it takes too long when I query a big table.
    Any advices?

    Check the following post: Link: [Re: RFC function module to count records in DB table;

  • ABAP Table - Invoice number & accounting doc date

    Hi ,
    In which ABAP Table i can get invoice number and Accounting document date ?
    Srini

    Hi Srini,
    I guess what you're really asking is "How can I find the tables that contain certain fields".  So, if that is really your question you should check out a blog like this;
    /people/martin.english/blog/2010/01/13/finding-what-tables-and-fields-lie-behind-an-sap-transaction
    Otherwise, every time you need to find a table for a field you don't know you'll have to ask the forum.
    Regards,
    Nick

  • Huge number of unprocessed logging table records found

    Hello Experts,
    I am facing one issue where huge number of unprocessed logging table records were found in SLT system for one table. I have check all setting and error logs but not found any evidence that causing the unprocessed records. In HANA system also it shows in replicated status. Could you please suggest me something other than to replicate same table again, as that option is not possible at this moment.

    Hi Nilesh,
    What are the performance impacts on the SAP ECC system when multiple large SAP tables like BSEG are replicated at the same time? Is there a guideline for a specific volume or kind of tables?
    There is no explicit guideline since aspects as server performance as well as change rate of the tables are also relevant. As a rule of thumb, one dedicated replication job per large table is recommended.
    from SLT
    How to enable parallel replication before DMIS 2011 SP6    do not ignore its for SP06 == go through
    How to improve the initial load
    Regards,
    V Srinivasan

Maybe you are looking for