Retrieving records in batches

hi,
I am looking for the same feature as this discussion form display. first a few records are displayed then links for 2,3,4....
How can i do it using xsqlservlet ,xsl.
help
null

The doyouxml demo that ships with XSQL Servlet illustrates a technique to accomplish this kind of paging.

Similar Messages

  • Why does rs.next() pause for sometime while retrieving records

    I'm trying to read records from the result set.
    At some point the rs.next() gets stuck.
    It takes lot of time to execute the rs.next() but the records are finally retrieved.
    Could some one tell me why this happens.
    I'm using a PreparedStatement to execute the query.
    Thanks
    Kalyan

    Maybe because the database returns records in batches rather than one at a time to the JDBC driver, so that after you process the first 200 records, there's a pause while it fetches the next 200? You can sometimes affect this behaviour by using the setFetchSize() method.
    Or maybe because there is a spike of network traffic that slows down your retrieval?

  • A better way to delete IT2001 records in batch.,

    Hi Gurus,
    A little problem here. Due to data source error, I need to delete IT2001 records in batch.
    Currently I am using standard report RPUREOPN to do this. But RPUREOPN will not update those deduction in IT2006 quota. So I've to delete & reupload cooresponding IT2006 quota data which is inconvenient.
    Is there a better way to do this job? I mean deleting IT2001 in batch and also update the deductions in IT2006.
    Thanks in adv!
    Br,Kee

    After running the report you mentioned above to delete absences/attn you can try running the report RPTUPD00 to revaluate the attendance and absence.
    Regards,
    Divya

  • Retrieving record from oracle DB very slow..pls help

    Hi, i'm writing a VB code to retrieving records from Oracle DB Server version 8. I'm using VB Adodb to retrieve the records from various tables. Unfortunately one of the table are very slow to response, the table only contain around 204900 records. The SQL Statement to retrieve the records is a simple SQL Statement that contain WHERE clause only. Any issue that will make the retrieving time become slow? Is that a Indexing? Oracle Driver? Hardware Spec? Or any solution for me to improve the performance. Thanks!

    Well, there are a few things to consider...
    First, can you try executing your query via SQL*Plus? If there are database tuning problems, your query will be slow no matter where you run it.
    Second, are you retrieving significantly more rows in this query than in your other queries? It can take a significant amount of time to retrieve records to the client, even if it's quick to select them.
    Justin

  • Retrieving records using SQL Date Queries

    Hello,
    I am using Lab Windows CVI 8.5 and also SQL TOolkit for my project. I am using DBMapColumnToChar function for mapping Date to the database. And for retrieving records I am using SQL Query as follows:
    SELECT * FROM DBTable WHERE DATE_TABLE BETWEEN '%s' AND '%s'",cCurrentDate,cCurrentDate
    I have given a drop down for selecting dates.
    When I execute the query I am not getting the selected date values an instead I am getting some records for which the dates aren't selected...
    Quick help needed for this..Thanks in advance

    Depending on the database, the date/time structure can be completely different from the structure in CVI.  CVI uses the Windows format for time(), that is the number of seconds since 1900.  The tm struct can break this apart into a date and time structure that is usable.
    I am using MS Access for the databases and SQL toolkit.  I finally ended up replace the date field with an INT field format, and then store the CVI time (gotten with time()) as an INT value.
    Easy then to get a search range, store it a tm struct and then convert with mktime() to a calendar time to search with.
    Hope this helps.  The date/time thing is a never ending struggle.
    Regards, David E.

  • C# retrieving records

    I am trying to retrieve records from a table using the code below, but I always get no records even though I know there are records in the table because I am checking with SQL+
    Can anyone help please ?
    try
                             using(OleDbConnection conn_oracle = new OleDbConnection(source))
                                  conn_oracle.Open();
                                  // store subsystem and update Lane statics
                                  string select = "SELECT * FROM pvdba.Subsystem";                               
                                  OleDbCommand cmd = new OleDbCommand(select, conn_oracle);
                                  OleDbDataReader reader = cmd.ExecuteReader();
                                  while(reader.Read())
                                       if(reader.IsDBNull(0) == false)
                                            m_nSubSystem = (int)reader[0];
                                       if(reader.IsDBNull(3) == false)
                                            Lane.s_sFilePath = (string)reader[3];
                                       if(reader.IsDBNull(4) == false)
                                            Lane.s_sSanderson = (string)reader[4];
                                       else
                                            Lane.s_sSanderson = ""; // SOO 1/9/2003 1.0.0.9
                                       if(reader.IsDBNull(5) == false)
                                            Lane.s_sOasis = (string)reader[5];
                                       else
                                            Lane.s_sOasis = ""; // SOO 1/9/2003 1.0.0.9
                                       if(reader.IsDBNull(6) == false)
                                            Lane.s_sOverViewPath = (string)reader[6];
                                       if(reader.IsDBNull(2) == false)
                                            m_sSubSystemName = (string)reader[2];
                                       //     Lane.TheMainForm = this;
                                  reader.Close();

    Please post your questions at forum for OLEDB for Oracle:
    Oracle Provider for OLE DB
    Regards
    Jagriti

  • Error records in Batch Input

    how to get the list of error records from batch input method.

    u can record them using bdcmsgcoll and also in t100 table.
    *&      Form  prepare_bdc_tab
    Prepare BDC Table for updating Copack Purchase Prices
    FORM prepare_bdc_tab .
      REFRESH gv_bdc_tab.
    *MEK1 intial screen
      PERFORM bdc_dynpro      USING 'SAPMV13A' '0100'.
      PERFORM bdc_field       USING 'BDC_CURSOR' 'RV13A-KSCHL'.
      PERFORM bdc_field       USING 'BDC_OKCODE' '/00'.
      PERFORM bdc_field       USING 'RV13A-KSCHL' 'PB00'.
      PERFORM bdc_dynpro      USING 'SAPLV14A' '0100'.
      PERFORM bdc_field       USING 'BDC_CURSOR' 'RV130-SELKZ(03)'.
      PERFORM bdc_field       USING 'BDC_OKCODE' '=WEIT'.
      PERFORM bdc_field       USING 'RV130-SELKZ(01)' ''.
      PERFORM bdc_field       USING 'RV130-SELKZ(03)' 'X'.
      PERFORM bdc_dynpro      USING 'SAPMV13A' '1018'.
      PERFORM bdc_field       USING 'BDC_CURSOR' 'RV13A-DATBI(01)'.
      PERFORM bdc_field       USING 'BDC_OKCODE' '/00'.
      PERFORM bdc_field       USING 'KOMG-LIFNR' gs_data-lifnr.
      PERFORM bdc_field       USING 'KOMG-MATNR' gs_data-matnr.
      PERFORM bdc_field       USING 'KOMG-EKORG' gs_data-ekorg.
      PERFORM bdc_field       USING 'KOMG-ESOKZ(01)' '0'.
      PERFORM bdc_field       USING 'KONP-KBETR(01)'  gs_data-kbetr.
      PERFORM bdc_field       USING 'KONP-KONWA(01)' 'USD'.
      PERFORM bdc_field       USING 'KONP-KPEIN(01)'  gs_data-peinh.
      PERFORM bdc_field       USING 'RV13A-DATAB(01)' gs_data-datab.
      PERFORM bdc_field       USING 'RV13A-DATBI(01)' gs_data-datbi.
      PERFORM bdc_dynpro      USING 'SAPMV13A' '1018'.
      PERFORM bdc_field       USING 'BDC_CURSOR'  'KOMG-ESOKZ(01)'.
      PERFORM bdc_field       USING 'BDC_OKCODE'  '=SICH'.
    ENDFORM.                    " prepare_bdc_tab
           Start new screen                                              *
    FORM bdc_dynpro USING program dynpro.
      CLEAR:  gs_bdc_tab.
      gs_bdc_tab-program  = program.
      gs_bdc_tab-dynpro   = dynpro.
      gs_bdc_tab-dynbegin = gc_x.
      APPEND gs_bdc_tab TO gv_bdc_tab.
    ENDFORM.                    "bdc_dynpro
           Insert field
    FORM bdc_field USING fnam fval.
      CLEAR:  gs_bdc_tab.
      gs_bdc_tab-fnam = fnam.
      gs_bdc_tab-fval = fval.
      APPEND gs_bdc_tab TO gv_bdc_tab.
    ENDFORM.                    "bdc_field
    *&      Form  call_transaction_mek1
    Call Transaction for updating CoPack Price entries
    FORM call_transaction_mek1 .
    *Local  Data Declaration
      CONSTANTS:lc_e         TYPE c VALUE 'E',
                lc_mek1(4)   TYPE c VALUE 'MEK1',
                lc_mode(1)   TYPE c VALUE 'N',
                lc_update(1) TYPE c VALUE 'U'.
      REFRESH: gv_bdc_msg.
    *Call MEK1 Transaction
      CALL TRANSACTION     lc_mek1
                USING      gv_bdc_tab
                 MODE      lc_mode
               UPDATE      lc_update
        MESSAGES INTO      gv_bdc_msg.
      IF sy-subrc NE 0.
        IF gv_bdc_open_flag IS INITIAL.
          PERFORM bdc_open_group.
          gv_bdc_open_flag = gc_x.
        ENDIF.
        PERFORM bdc_insert_group.
        DELETE gv_bdc_msg WHERE msgtyp NE lc_e.
        REFRESH:gv_bdc_msg,
                gv_bdc_tab.
      ENDIF.
      CLEAR:gs_data.
    ENDFORM.                    " call_transaction_mek1
    *&      Form  bdc_open_group
    Subroutine for Open BDC Group
    FORM bdc_open_group .
      CALL FUNCTION 'BDC_OPEN_GROUP'
        EXPORTING
          client              = sy-mandt
          group               = p_esnm
          user                = sy-uname
        EXCEPTIONS
          client_invalid      = 1
          destination_invalid = 2
          group_invalid       = 3
          group_is_locked     = 4
          holddate_invalid    = 5
          internal_error      = 6
          queue_error         = 7
          running             = 8
          system_lock_error   = 9
          user_invalid        = 10
          OTHERS              = 11.
      IF sy-subrc <> 0.
        WRITE :/ text-040. "Error in BDC_OPEN_GROUP
        EXIT.
      ENDIF.
    ENDFORM.                    " bdc_open_group
    *&      Form  BDC_INSERT_GROUP
    Subroutine for calling BDC_INSERT for inserting BDC Table
    FORM bdc_insert_group .
      CALL FUNCTION 'BDC_INSERT'
        EXPORTING
          tcode            = 'MEK1'
        TABLES
          dynprotab        = gv_bdc_tab
        EXCEPTIONS
          internal_error   = 1
          not_open         = 2
          queue_error      = 3
          tcode_invalid    = 4
          printing_invalid = 5
          posting_invalid  = 6
          OTHERS           = 7.
      IF sy-subrc <> 0.
        WRITE :/ text-041. "Error in BDC_INSERT
        EXIT.
      ENDIF.
    ENDFORM.                    " BDC_INSERT_GROUP
    *&      Form  BDC_CLOSE_GROUP
    Subroutine for Closeing of BDC group
    FORM bdc_close_group .
      CALL FUNCTION 'BDC_CLOSE_GROUP'
        EXCEPTIONS
          not_open    = 1
          queue_error = 2
          OTHERS      = 3.
      IF sy-subrc <> 0.
        WRITE :/ text-042.         "Error in BDC_CLOSE_GROUP.
        EXIT.
      ENDIF.
    ENDFORM.                    " BDC_CLOSE_GROUP
    if u can see gv_bdc_msg is holding the messages
    hope this helps
    dont go through the code as it is ...it is only part of it
    Message was edited by:
            Durgaprasad Kare

  • Unable to retrieve records with search criteria

    Hi All,
    I am trying to retrieve records based on search criteria as below, but not able to retrieve records.
    I created a search Search s=new Search(repSchema.getTableId("Customers"));
    Search s=new Search(repSchema.getTableId("Customers"));
              SearchGroup sg = new SearchGroup();
    FieldSearchDimension fsdCustFinValidated = new FieldSearchDimension(new FieldId(repSchema.getFieldId("Customers", "Financially_Validated")));
    BooleanSearchConstraint bSearchComm_Validated = new BooleanSearchConstraint(false);
    s.addSearchItem(fsdCustFinValidated, bSearchComm_Validated);
    s.setComparisonOperator(Search.AND_OPERATOR);     
    FieldSearchDimension fsdMaintableType = new FieldSearchDimension(new FieldId(repSchema.getFieldId("Customers", "Company_Type")));
    TextSearchConstraint tscCustType = new TextSearchConstraint("CUSTOMER", TextSearchConstraint.EQUALS);
    s.addSearchItem(fsdMaintableType, tscCustType);
    s.setComparisonOperator(Search.AND_OPERATOR);
    Calendar calCreate = Calendar.getInstance(TimeZone.getTimeZone("GMT"));
    calCreate.add(Calendar.DATE,-6);
    System.out.println("customerCreditEscalation: calCreate:" + calCreate.getTime());
    FieldSearchDimension fsdMaintableDate = new FieldSearchDimension(new FieldId(repSchema.getFieldId("Customers", "Financially_Validated_Trigger")));
    SearchConstraint srchConstCreateGE = new DateTimeSearchConstraint(calCreate,DateTimeSearchConstraint.LESS_THAN_OR_EQUAL_TO);
    sg.addSearchItem(fsdMaintableDate,srchConstCreateGE) ;
    sg.setComparisonOperator(Search.AND_OPERATOR);
    Calendar calCreate1 = Calendar.getInstance(TimeZone.getTimeZone("GMT"));
    calCreate1.add(Calendar.DATE,-7);
    SearchConstraint srchConstFinVldTrgrDate = new DateTimeSearchConstraint(calCreate1,DateTimeSearchConstraint.GREATER_THAN_OR_EQUAL_TO);
    sg.addSearchItem(fsdMaintableDate, srchConstFinVldTrgrDate);
    s.addSearchItem(sg);
    Basically I am trying to search using A=a and B=b and (C=c and D=d) where (C=c and D=d) is the search group.
    Please let me know if I am doing anything wrong.
    Thanks
    -Sai

    Hi Greg,
    Thanks for the answer. I am trying to do a search as below.
    Earlier in the blog I mentoned A=a and B=b and (C=c and D=d) where (C=c and D=d) is the search group, but my search is
    A=a and B=b and (C=c and C=d) . C is the same dimension, which is a timestamp field.
    I am getting my results with A=a and B=b and C< c where C is Timestamp field. But my requirment is equal to a date older than two days. So when I try equal A=a and B=b and C=c  it is not working(may be because it is timestamp field and c is a calendar ). So I am trying to do A=a and B=b and (C<c and C>d) so that I get records that fall with in those days. So for (C<c and C>d) I am creating a search group and adding it to search which is not giving me the rows.
    Hope I explained it ok.
    If you know of any samples please let me know.
    Regards
    -Sai

  • No matching records found 'Batchs and Serial Numbers' (OSRD) (ODBC-1028)

    Hi experts,
    These days In our 2007 system, we had a serial number maintain problem on 'Recipt from Production' transaction.
    When we open 'Serial Number Management' form, we can not update S/N by 'Complete' operation mode for some items. but it works for 'Update' operation mode.
    The system show 'No matching records found 'Batchs and Serial Numbers' (OSRD) (ODBC-1028)' in the status bar.
    How could I fix it ?
    thanks for your help.

    Hi Wilson,
    Do you manage the serial number transaction for respective item with "On Every Transaction" or "On Release Only" (in Item master data)? Because, when you manage those item with "On Every Transaction", you should already filled the serial number when you tried to receive those item whether by Goods Receipt PO or Receive from Production transaction.
    "Complete" operation in Serial Numbers Management only works for item which you manage by "On Release Only", it doesn't work for item which managed using "On Every Transaction". Hope I don't misunderstood your question.
    Best Regards,
    Hendry Wijaya

  • How to select records in batch?

    Hi Friends.
    I want to select 10 lacs records. But if i used for all entries also it is giving error of time out. now i want to select records ina batch og 100000. Means forst it will select 100000 records and move in a internal table ..after that it will again fetch next 100000 records and append in that internal table like that..Is it possible..how to do this? i am selecting BELNR from BKPF and using FOR ALL ENTRIES fetching records from BSEG. requirement is such as i have to fetch records from BSEG only and not from BSID,BSIK... like tables..
    Please help me...its urgent friends....

    Hi ..
    My program is not a normal abap program..it is a RFC. actually requirement is to fetch data from sap and send it to squ server database. So non sap application execute the RFC. so i cant run this it in background...is it possible to run RFC in background..

  • Retrieving records from a Data Block same as retrieving records from cursor

    Dear Gurus,
    Is it possible to retrieve records from a datablock same as retrieving records from a cursor,
    Eg:
    I am having two data blocks in two different tabs, Say B1 in Tab1, B2 in Tab2
    B1 is filled with two records, now when I switch to Tab2,
    I want all records of B1 in B2, assuming that blocks are having the same structure.
    The code I wish to write is,
    Goto B1,
    Take all the records like a cursor,
    Goto B2,
    loop
    insert
    end loop;
    Is this possible???

    I need to show it before saving,
    I tried this and it is successful somehow, do not know about any further problems,
    I took the record count of both blocks
    if :B1.reccount <> :B2.reccount
                   then
                   go_block('B1');
                   first_record;
                   for i in 1..:B1.reccount
                   loop
                        go_block('B1');
                        go_record(i);
              assign values from B1 to variables.
              go_block('B2');
              assign values from variables to B2
              next_record;
                   end loop;
                   clear_record;
              end if;
    This is working, Now I just want to know, if my block is having numerous fields, say more than 100 (may not be a value for large databases)
    how can I replace these variables here.
    I mean is it possible to declare something like a cursor record type.
    For eg : r1 cursor%rowtype

  • Processing Record by batch

    Hi Experts,
    I have an scenario, In the internal table suppose If I  have a 50,000 records ( fifty thousand records) , suposse I want to process the records in the batch of 5000 ( five thousand ) , I need to process 10 times to compelete this 50,000 records.
    or if I need to process 50,000 records in  the batch of 2000 then ,I need to process it 25 times...
    The number of records per batch will be given by the user ...
    But how to calculate the iterations and process all the records in ABAP langauage...
    Thanks in Advance...
    Regards,
    IFF
    Edited by: IFF on Feb 18, 2008 6:15 PM
    First Iteration : 1-5000
    Second Iteration : 5001-10000
    Last iteration:45001-5000
    The batch size may be directly given by the user
    Regards,
    IFF

    hi
    after the user inputs the no. of records per batch..
    using usual code send those number of records to the batch and delete it from the internal table..
    as u put it in the loop, the process continues until all the records are processed (that is the internal table become empty).
    Regards,
    K.Tharani.

  • Retrieve Records By RemoteKey in Java API

    Hi All,
          I want to retrieve records by RemoteKey for that i found a class RetrieveRecordIdsByRemoteKeyCommand in Java API documentation but I am not able to use that because I am not able to create instance of KeyMapping class as it is a interface.
          Any one has done this before? can you please help me how to new keyMapping in java code to set to this class.
    Thanks
    Ninad

    Hi.
    at first if u want to know what is it RemoteSystemId get RemoteSystemProperties[] with GetRemoteSystemListCommand and after that call .getId().getIdValue() - that method return int it is really id of remote system in MDM u can check it in DB in table A2I_CM_AGENCIES of your repository schema(column ID ).
    So.. let's go forward there is some sample code which search records by remotekeys:
                TableId tbl=mdmGate.getRepSchema().getTable(tblCode).getId();
                ResultDefinition rd=new ResultDefinition(tbl);
                KeyMapping km=KeyMappingFactory.createKeyMapping(new RemoteSystemId(idSys));
                km.addKey(id);
                RetrieveRecordsByRemoteKeyCommand rrBYrk=new RetrieveRecordsByRemoteKeyCommand(mdmGate.getPool());
                rrBYrk.setRemoteKeys(km);
                rrBYrk.setResultDefinition(rd);
                rrBYrk.setSession(mdmGate.getUserSessionId());
                try {
                    rrBYrk.execute();
                } catch (CommandException ex) {
                    ex.printStackTrace();
                    return -1;
    I hope this help u

  • Get username from session and retrieve records from database wit tat userna

    hello..
    i got a ChangePassword.jsp which i retrieve the username from session using bean to display on e page..
    <jsp:getProperty name="UsernamePassword" property = "username"/>
    but in my servlet, i wan to retrieve records from database with tat username..
    i tot of coding
    String username = (String)request.getSession().getAttribute("UsernamePassword");
    and then use tat username to retrieve records.. but is that e right way? The page did not display and i got a CastingException..
    Please help.

    If you are using the session inside a jsp, you can say "session" without having to declare it.String usernamePassword = (String) session.getAttribute("usernamePassword");However, right after you get this value, check if it is null:
    if(usernamePassword==null)
    // do sth like forward to error page
    else
    // continue processing
    If it is null, then you are probably not setting it right in the first place. Make sure that in your servlet A you create a session, and before you return or forward to a jsp, that you actually set this value in the session like saying
    session.setAttribute("usernamePassword", usernamePassword);
    and it is case sensitive for the key.

  • How to retrieve records from taxonomy table

    Hi,
    I have a main table which has taxonomy field,for ex: category.
    Main table: Products which has ProductName(text),ProductNo(text),Category fields(Lookup[taxnomoy])
    Could anyone please tell me how to retrieve the records and attributes from a taxonomy table.
    Please provide some sample codes.
    Thanks
    Sabari

    Hi Sabari,
    your question is not so clear-  any way find the following example
    if you want to get records based on search criteria( ex: taxonomy values where ProductName = "something "),, follow the below steps;
    1 . build Search Object-  ( I guess you know this step)
    2.  get RecordResultSet Object -
         Example
         //Compose array of the fields to retrieve
         FieldId[] fields = new FieldId[5];
         fields[0] = assign FiledId of Category field ;
         //Create the result definition for the search table
         ResultDefinition rd = new ResultDefinition(productsTableId);
         rd.setSelectFields(fields);
        // Retrive ResultSet
           RetrieveLimitedRecordsCommand recordsCommand = new  
           RetrieveLimitedRecordsCommand(mdmConnection.getConnection());
         recordsCommand.setSession(mdmConnection.getAuthenticatedUserSession().getSession());
         recordsCommand.setResultDefinition(rd);
         recordsCommand.setSearch(search);
         recordsCommand.execute();          
            RecordResultSet  records= recordsCommand.getRecords();
    3 . Now Iterate through resultSet for CategoryRecord lookUp Id
               Record record = records.getRecord( i );
         FieldId[] fieldIds = record.getFields();
                for(int n=0; n<fieldIds.length; n++) {
                   FieldId fieldId = fieldIds[n];
                   FieldProperties fieldProps = records.getRecordMetadata().getField(fieldId);
                   String fieldCode = fieldProps.getCode();
                            MdmValue value = record.getFieldValue(fieldId);                    
                          if(fieldCode.equals("Category")) {                         
                   if (!(value instanceof NullValue)) {
                                  //LookupValue appLookUpValue = (LookupValue) value;
                                  Record[] lookupRecord=record.findLookupRecords(fieldId);
                                  if(lookupRecord!=null && lookupRecord.length>0)
                                                            populate for  a category for every lookup record 
                                       // cat=this.getCategory(lookupRecord[0].getId(),locale);
    Note:- from Main table records  , you will get Category lookup records, you need to look up for every Category lookUp Record; there may be number of Category records for one main table Record;
    if you still face problem , let me know;
    Regards
    Rajasekhar k

Maybe you are looking for