How to fetch 100 records in php4?

as title
I only see the function "ora_fetch()"
null

You could do a select count(*) to get the total records then it it is grater than 100 do a select top 100
Andy Tauber
Data Architect
The Vancouver Clinic
Website | LinkedIn
This posting is provided "AS IS" with no warranties, and confers no rights. Please remember to click
"Mark as Answer" and "Vote as Helpful" on posts that help you. This can be beneficial to other community members reading the thread.

Similar Messages

  • How to send 100 records from an IDOC to File Scenario without using BPM?

    Hi All,
    I have a requirement that i need to send 100 records from sap to file by using the scenario IDOC to File. Can you suggest how can i achieve this?
    Regards,
    Ramvilas.

    Hi,
       Create a H type RFC destination.Tagert host and port give  Xi system host and port.Path give the
       /sap/xi/adapter_plain?namespace=<NameSpcae>&interface=<Interface> &service=<SenderBusinessSystem>&qos=EO or EOIO.
    Go to we21 find xmlhttp port.give the port name and assign RFC.Give the port in we20 your idoc and change to collective.
    In Xi export the IDOC and change the occurance to 0-unbounded and import it.
    Regards,
    Prakasu.M

  • How to post 100 records from R3 to JDBC

    Hi,
      I want to post the 100 records from R3 to XI using RFC adapter synchronously, from xi to JDBC synchronously. how can we implement this scenario.
    thanks.

    Hi,
    See this link,
    Here is an example of mapping for synch JDBC.
    /people/siva.maranani/blog/2005/09/16/xi-how-to-on-jdbc-receiver-response
    /people/siva.maranani/blog/2005/05/21/jdbc-stored-procedures
    Also go thru these links:
    http://help.sap.com/saphelp_nw2004s/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm
    /people/alessandro.berta/blog/2005/10/04/save-time-with-generalized-jdbc-datatypes
    http://help.sap.com/saphelp_nw2004s/helpdata/en/4d/8c103e05df2e4b95cbcc68fed61705/frameset.htm
    Regards,
    Akshay Jamgaonkar.
    Reward points if find useful.
    null

  • How to post 100 records from R3 to file in XI

    Hi,
       Can any one explain me how to post 100 from R3 using RFC sender adapter to flat file.
    thanks
    dhanush.

    hi
    Follow this link it is helpfull to you.
    https://www.sdn.sap.com/irj/sdn/advancedsearch?query=howtopost100fromR3usingRFCsenderadaptertoflatfile&cat=sdn_all
    IDOC/EDI/ALE
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/e698aa90-0201-0010-7982-b498e02af76b
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/18dfe590-0201-0010-6b8b-d21dfa9929c9
    Regards,
    Santosh
    Message was edited by:
            Venkata Santosh Kumar Boddu

  • How to fetch previous record from internal table?

    Hi,
    My final internal table (it_final) has all the data month wise year wise.(opening and closing qty)
    but if
    Material   Batch    Month   Year        opening_qty         closing_qty
    FC5431   abc        08        2008        100                       50
    FC5431   ABC       09        2009         0                          100
    Suppose I want to take PREVIOUS record(closing_qty = 50  in my 09/2009  openin_qty = 50)  how will Ido this?
    Any solution????????? BTW i m using S033 for opening an closing qt monthwise.
    Plz reply soon if anyone knows.
    Thanks and Regards,
    Archana

    Hi,
    Test the following Sample code hope will solve out your problem,
    TYPES:  BEGIN OF ty_test,
            m(3),
            open_qty TYPE i,
            close_qty TYPE i,
            END OF ty_test.
    DATA: it_test TYPE STANDARD TABLE OF ty_test WITH HEADER LINE,
          wa_test LIKE LINE OF it_test,
          ctabix LIKE sy-tabix,
          ptabix LIKE sy-tabix.
    it_test-m = 'AAA'. it_test-open_qty = 100. it_test-close_qty = 50. append it_test.
    it_test-m = 'AAA'. it_test-open_qty =  0. it_test-close_qty = 100. append it_test.
    LOOP AT it_test.
      ctabix = sy-tabix.
      IF sy-tabix > 1.
        ptabix = sy-tabix - 1.
        READ TABLE it_test into wa_test INDEX ptabix.
        IF sy-subrc = 0.
          it_test-open_qty = wa_test-close_qty.
        ENDIF.
        MODIFY it_test INDEX ctabix.
      ENDIF.
    ENDLOOP.
    LOOP AT it_test.
      WRITE: it_test-m, it_test-open_qty, it_test-close_qty, /.
    ENDLOOP.
    Regards,
    Faisal

  • How to fetch n records at a time from a FM and then fetch next n records

    I have a report program which is calling a function module . This function module returns all the records from a table. As the table has millions of records, it cant be returned at a time. How can we return N records from a function module and then return Next n records .The Function module and the report program are in different system .
    Thanks in Advance.

    Use open cursor and fetch cursor.
    Check the program as in SAP Help.
    DATA: BEGIN OF count_line,
            carrid TYPE spfli-carrid,
            count  TYPE i,
          END OF count_line,
          spfli_tab TYPE TABLE OF spfli.
    DATA: dbcur1 TYPE cursor,
          dbcur2 TYPE cursor.
    OPEN CURSOR dbcur1 FOR
      SELECT carrid count(*) AS count
             FROM spfli
             GROUP BY carrid
             ORDER BY carrid.
    OPEN CURSOR dbcur2 FOR
      SELECT *
             FROM spfli
             ORDER BY carrid.
    DO.
      FETCH NEXT CURSOR dbcur1 INTO count_line.
      IF sy-subrc <> 0.
        EXIT.
      ENDIF.
      FETCH NEXT CURSOR dbcur2
        INTO TABLE spfli_tab PACKAGE SIZE count_line-count.
    ENDDO.
    CLOSE CURSOR: dbcur1,
                  dbcur2.
    Regards
    Kannaiah

  • How to fetch the records which matches a partial value?

    Hi,
    I have a table called Employee which contains the following value in Category column
    ID Value
    1 Student,Staff
    2 Staff
    3 Parent,Student
    4 Member,Staff,Student
    I wanted to fetch only 1 and 3rd and 4th record since it matches the value Student.
    basically looking for the exact pattern matched with student separated by comma.
    how to perform this query. it would be great, if i get the query in MS Sql also.
    Edited by: Pannar on Nov 1, 2009 7:08 PM

    Hi,
    I'm sure the regexps will pass by, but here's a way (no idea if this will run in MS SQL, I'm not familiar with that):
    HO%xe> with employee as ( --generating your sample data:
    2  select 1 id, 'Student,Staff' category from dual union all
    3  select 2, 'Staff' from dual union all
    4  select 3, 'Parent,Student' from dual union all
    5  select 4 ,'Member,Staff,Student' from dual
    6  )
    7  --
    8  -- Actual query:
    9  --
    10  select id
    11  ,      category
    12  from   employee
    13  where  category like '%Student%'
    14  and    instr(category, ',')>0;
           ID CATEGORY
            1 Student,Staff
            3 Parent,Student
            4 Member,Staff,StudentYou can use UPPER or LOWER as well, if you want to be case-insensitive.
    edit
    Something like:
    MHO%xe> with employee as ( --generating your sample data:
      2  select 1 id, 'Student,Staff' category from dual union all
      3  select 2, 'Staff' from dual union all
      4  select 3, 'Parent,Student' from dual union all
      5  select 4 ,'Member,Staff,Student' from dual union all
      6  select 5, 'Student' from dual union all
      7  select 6, 'Student,' from dual
      8  )
      9  --
    10  -- Actual query:
    11  --
    12  select id
    13  ,      category
    14  from   employee
    15  where  regexp_like(category,',Student|Student,');
            ID CATEGORY
             1 Student,Staff
             3 Parent,Student
             4 Member,Staff,Student
             6 Student,Might work as well.
    Edited by: hoek on Nov 1, 2009 2:50 PM

  • How to fetch last record from the table to display in screen painter?

    Hi Gurus,
                  I have a requirement where i have to fetch the last record value in the table.
    I have a screen where the TEXT name is REQUEST and I/P field name is REQ and SAVE push button.
    In this I/P field automatically 1 should display when i excecute the program and when i save this, the request number should turn to 2 that is dynamically..once agin save then 3 and so on....and this 1, 2, 3 will be storeing in table.
    I have succeeded till generating the values dynamically and saving in the table like 1 is displayed and when i click save it is changeing to 2..but the problem is when i am coming out of program and logon again the request number is again displaying as 1 rather it has to start with 4 because already 3 request are there in the table.
    My code is...
    Table zsave.
    data declarations....
    data req type i.
    req = 0.
    req = zsave-req.
    PROCESS BEFORE OUTPUT
    req = 0.
    select req into table fun_st from zsave.
    req = zsave-req.
    zsave-req = req.
    req = zsave-req + 1.
    PAI
    req = zsave-req + 1.
    zsave-req = req.
    when 'save'.
    wa_funst-req = zsave-req.
    Please can you provide me with the solution....answer will be rewared.
    THKS

    Can you tell me, when updaing the ZSAVE table with the counter value are you modifying the exisiting value or inserting the value as new record?
    From the code in your first post, i see that you are extracting records into internal table but when you are moving to variable REQ, you are moving from table work area which is blank, so everytime when you execute it may be starting as 0.
    Hope below code can help you understand on handling your requirement
    Global Declaration:
    >DATA: l_req TYPE i. 
    PBO:
      SELECT MAX( req ) INTO l_req FROM zsave.
      l_req = l_req + 1.
    PAI:
      DATA: wa TYPE zsave.
      CASE ucomm.
      WHEN 'SAVE'.
        wa-req = l_req.
        INSERT zsave FROM wa.
      ENDCASE.

  • How to fetch last record from a flatfile

    I have a flatfile with 5000+ records and last record is the count record , i want to fetch the last record only through sql loader or External table (OS IS Unix)
    Pls any body can give the answer
    Kiran Kumar Thayyuru
    Message was edited by:
    user557500

    you migth want to take a look at the option CONTINUEIF LAST

  • How to fetch corresponding records from 2 tables using ADF Toplink & EJB

    Hi,
    I am unable to fetch records from 2 tables, which has a foregin key.Used the custom query in toplink, But the output is the cartition of the first table draged and the first row of the second table.The output required should be in the form of ADF Table. I am able to find the output in JSF data table.
    Two tables:
    Table name:Solutions
    sol_id varchar2(PK)
    sol_name varchar2
    Table name:Solution_details
    sol_id varchar2(FK)
    common_asum_id varchar2(PK)
    common_detail varchar2
    Output Required:
    sol_id,sol_name,common_asum_id,common_detail
    Custom query:
    SELECT * FROM solutions a
    ,solution_details b
    WHERE a.sol_id=b.sol_id

    Hi,
    I am unable to fetch records from 2 tables, which has a foregin key.Used the custom query in toplink, But the output is the cartition of the first table draged and the first row of the second table.The output required should be in the form of ADF Table. I am able to find the output in JSF data table.
    Two tables:
    Table name:Solutions
    sol_id varchar2(PK)
    sol_name varchar2
    Table name:Solution_details
    sol_id varchar2(FK)
    common_asum_id varchar2(PK)
    common_detail varchar2
    Output Required:
    sol_id,sol_name,common_asum_id,common_detail
    Custom query:
    SELECT * FROM solutions a
    ,solution_details b
    WHERE a.sol_id=b.sol_id

  • How to fetch some certain records at a time

    Hi everyone,
    I dont know how to fetch some records at a time,
    for some reason,there is not enouht memory.so I cant
    fethch all the records at a time.
    example, every time I only want to fetch 10
    records. Does anyone know that?
    thanks
    Krussi

    I think you may be getting setFetchSize(int) and setMaxRows(int) confused. I may have added to the confusion with my breaking out of the loop comment.
    setFetchSize(int) gives the driver a hint as to how many rows it should store in memory at a time internally, ie. within the driver. It has no real effect on how you write your program at all. Its only purpose is to limit memory usage by the driver. To limit the rows returned, use setMaxRows.
    For example, assume a result set has 20 rows and you use:
    rs.setFetchSize(5);
    while (rs.next()) {
       System.out.println("Rows: " + (++count));
    }  You still get a count from 1 to 20. However, internally the driver is only holding in memory 5 records at a time, after the 5 returned it will discard those and get the next 5. So instead of holding 20 rows, its only holding 5 at a time. If you change rs.setFetchSize(5) to rs.setMaxRows(5) you will only get a count from 1 to 5, the rest are silently discared and rs.next() returns false.
    Check your documentation to see if your driver supports the method. I believe many drivers don't. If not, I believe there is no way around multiple queries. Even if there is no rowid, as long as you order your queries you should be able to start again where you left off.
    Disclaimer: Both drivers I commonly use do not implement setFetchSize(int). Someone let me know if I've fudged something here.
    Good Luck

  • How to fetch all the records from ztable

    Hi 
    My program is outbound program.
    According to the requirement i have to fetch all the records from ztable which are not tranmitted before to the third party and once the records are extracted and written to output file they will be marked as 'X' in the "status" field of that ztable for the next days run.
    How to fetch the records.Please suggest me.
    Thanks,
    Neelima

    HI,
    Fetch all the records whose status is equal to 'X' as whatever data is sent to third party system is marked as 'X' in status field of table after sending.
    You need to first fetch the data into internal table using the select statement where status EQ space. You get the data which is not yet transmitted to third part. And later in the program after trasmitting the data to third party modify the Records in the DB table which are transmitted with Staus eq 'X'.

  • Fetch last record from database table

    hi,
    how to fetch last record from database table.
    plz reply earliest.
    Regards,
    Jyotsna
    Moderator message - Please search before asking - post locked
    Edited by: Rob Burbank on Dec 11, 2009 9:44 AM

    abhi,
    just imagine the table to be BSEG or FAGLFLEXA... then what would be performance of the code ?
    any ways,
    jyotsna, first check if you have a pattern to follow like if the primary key field have a increasing number range or it would be great if you find a date field which stores the inserted date or some thing..
    you can select max or that field or order by descending using select single.
    or get all data.. sort in descending order.(again you need some criteria like date).
    read the first entry. using read itab index 1

  • How to quickly fetch the records from an SQL recordset

    I'm using LW/CVI V7.1.1 and SQL Toolkit V2.06.
    When displaying the recordset from a SELECT statement I use the following construct:
      SQLhandle1 = DBActivateSQL(DBhandle, SELECTtext);
      DBBindCol() statements.......
      numRecs = DBNumberOfRecords(SQLhandle1);
      for (n=1; n<=numRecs; n++) {
        DBFetchNext(SQLhandle1);
        display record to the user...
      DBDeactivateSQL (SQLhandle1);
    This has always worked fine for me when using local databases. Now I am developing an app for a remote database, and the fetching of each selected record is proving to be an issue. It takes at best, 60msecs for my round-trip network access to fetch each record. If selecting very many records, the fetching can add up to a considerable time delay.
    My question is, how can I bind the entire recordset to my application variables, (or to a local table?) in a single request to the database? Does LW/CVI support such a method? Or perhaps someone knows an SQL method to help me?
    Thanks

    Hi Michael,
    Thanks for the help. This is what I was looking for. Not sure why I missed it!
    However, after trying it out, it doesn't seem to help. The statement:  DBGetVariantArray(SQLhandle, &array, &recs, &fields); seems to take the same amount of time to get the records as the individual DBFetchNext() statements. So if my SQL statement matches 100 records, the DBGetVariantArray() call will take 100*60msec to complete.
    Is there a DB attribute setting that needs changed?

  • How to know query fetched % of record till now

    Hi ,
    Please tell me hoe to know query fetched % of record till now
    suppose table having 20 lack record, it is taking time but i want to know
    how many % fetch is completed.
    Regards

    I dont't have access to but try to see:
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:1099233454171
    Regards
    Etbin

Maybe you are looking for