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

Similar Messages

  • How can I remove a person's face from a photo and then replace the spot with a person's face from another photo?

    How can I remove a person's face from a photo and then replace the spot with a person's face from another photo?

    In Editor, go to the expert tab.
    Open picture B, the one you wish to select the "replacement" face from to add to another picture.
    Use one of the selection tools, e.g. selection brush, lasso tool, to select the face. You will see an outline ("marching ants") once the selection is complete
    Go to Edit menu>copy to copy the selection to the clipboard
    Open picture A, then go to Edit>paste
    Use the move tool to position the face from picture B to cover the face on A
    In the layers palette you should see picture A as the background layer, and face B on a separate layer

  • How do I change desktop folder/safari pictures to registered business icons, I have tried almost every how to  on-line but none are worki?  I have treing. First how do I get the icon I need from the website and then what?

    How do I change Mac desktop folder/safari pictures to registered business icons? I have tried almost everythin but none are working.  First how do I capture the business icon from the website, then what?

    OK, well to start with, you must have the icon file in the correct format. You need to end up with an .icns file. One of the how-to articles should tell you how to do this - iConvert will also do it.
    If it is in the correct format, when you click the icon file to highlight it, and click cmd-i, you will see the Get Info window - at the top left, you should see a mini version of the icon. If you do NOT see that icon correctly, the file is not the correct format. So this will not work for a jpg or png file, for example.
    Once you have this window open, go to the thumbnail, click it to highlight it blue, and click cmd-C to copy.
    Go to your Safari app from the Applications folder (not from the dock), again click cmd-i to open its Get Info window, and again click its icon to highlight it blue. Now click cmd-V to paste. You will be asked for your admin password to authenticate. The icon should now become the one you've pasted in.
    You may need to log out and back in for the effect to show on the application file itself.
    You might also want to look into Candybar if you plan on doing a lot of icon customization.
    Matt

  • HT204053 My wife and I have an iphone each using one apple id. How do we stop items being deleted from one phone and then find it has been deleted from the other?

    My wife and I have an iphone each using one apple id. How do we stop phone contacts being deleted from one phone and then find it has been deleted from the other?
    Also this works when one of us downloads an app it appears on the other iphone

    You need to use separate iCloud accounts. This will mean that you can both have your own separate contracts and calendars and put an end to them being deleted by each other.
    Whether or not you have a separate iTunes account, is up to you. If you have a separate iTunes accounts you will not be able to access the music, books, apps that have been purchased by the other. This may be exactly what you want, but it also means that you both may end up purchasing the same item.

  • I purchased songs from Itunes store and I would like to record a CD to my parents with specific songs but when introduce the cd a message appears that the songs are not in MP3 format, how could I convert them?

    I purchased songs from Itunes store and I would like to record a CD to my parents with specific songs but when introduce the cd a message appears that the songs are not in MP3 format, how could I convert them?

    Hello
    In itunes...preferences you can change the setting to import songs instead of mp4  to mp3. Afer changing this setting, right click to the songs and than you are able to convert to mp3. ths's it

  • How do I create a 1d array that takes a single calculation and insert the result into the first row and then the next calculation the next time the loop passes that point and puts the results in thsecond row and so on until the loop is exited.

    The attached file is work inprogress, with some dummy data sp that I can test it out without having to connect to equipment.
    The second tab is the one that I am having the problem with. the output array from the replace element appears to be starting at the index position of 1 rather than 0 but that is ok it is still show that the new data is placed in incrementing element locations. However the main array that I am trying to build that is suppose to take each new calculation and place it in the next index(row) does not ap
    pear to be working or at least I am not getting any indication on the inidcator.
    Basically what I am attempting to do is is gather some pulses from adevice for a minute, place the results for a calculation, so that it displays then do the same again the next minute, but put these result in the next row and so on until the specifiied time has expired and the loop exits. I need to have all results displayed and keep building the array(display until, the end of the test)Eventually I will have to include a min max section that displays the min and max values calculated, but that should be easy with the min max function.Actually I thought this should have been easy but, I gues I can not see the forest through the trees. Can any one help to slear this up for me.
    Attachments:
    regulation_tester_7_loops.vi ‏244 KB

    I didn't really have time to dig in and understand your program in depth,
    but I have a few tips for you that might things a bit easier:
    - You use local variables excessively which really complicates things. Try
    not to use them and it will make your life easier.
    - If you flowchart the design (very similar to a dataflow diagram, keep in
    mind!) you want to gather data, calculate a value from that data, store the
    calculation in an array, and loop while the time is in a certain range. So
    theres really not much need for a sequence as long as you get rid of the
    local variables (sequences also complicate things)
    - You loop again if timepassed+1 is still less than some constant. Rather
    than messing with locals it seems so much easier to use a shiftregister (if
    absolutely necessary) or in this case base it upon the number of iterations
    of the loop. In this case it looks like "time passed" is the same thing as
    the number of loop iterations, but I didn't check closely. There's an i
    terminal in your whileloop to read for the number of iterations.
    - After having simplified your design by eliminating unnecessary sequence
    and local variables, you should be able to draw out the labview diagram.
    Don't try to use the "insert into array" vis since theres no need. Each
    iteration of your loop calculates a number which goes into the next position
    of the array right? Pass your result outside the loop, and enable indexing
    on the terminal so Labview automatically generates the array for you. If
    your calculation is a function of previous data, then use a shift register
    to keep previous values around.
    I wish you luck. Post again if you have any questions. Without a more
    detailed understanding of your task at hand it's kind of hard to post actual
    code suggestions for you.
    -joey
    "nelsons" wrote in message
    news:[email protected]...
    > how do I create a 1d array that takes a single calculation and insert
    > the result into the first row and then the next calculation the next
    > time the loop passes that point and puts the results in thsecond row
    > and so on until the loop is exited.
    >
    > The attached file is work inprogress, with some dummy data sp that I
    > can test it out without having to connect to equipment.
    > The second tab is the one that I am having the problem with. the
    > output array from the replace element appears to be starting at the
    > index position of 1 rather than 0 but that is ok it is still show that
    > the new data is placed in incrementing element locations. However the
    > main array that I am trying to build that is suppose to take each new
    > calculation and place it in the next index(row) does not appear to be
    > working or at least I am not getting any indication on the inidcator.
    >
    > Basically what I am attempting to do is is gather some pulses from
    > adevice for a minute, place the results for a calculation, so that it
    > displays then do the same again the next minute, but put these result
    > in the next row and so on until the specifiied time has expired and
    > the loop exits. I need to have all results displayed and keep building
    > the array(display until, the end of the test)Eventually I will have to
    > include a min max section that displays the min and max values
    > calculated, but that should be easy with the min max function.Actually
    > I thought this should have been easy but, I gues I can not see the
    > forest through the trees. Can any one help to slear this up for me.

  • How to download 'all photos at a time' from shared stream?

    I have a photo stream shared album (with 120 pictures) on icloud.  This is shared from iPhone.  I opened the link on my mac/windows in the browser.  Now, how to download 'all photos at a time' from shared stream?  I don't want to download each photo at a time.  There are 100s of photos to download.  I can't open one photo at a time and keep downloading them separately.  There should be a way to download all photos from a shared stream.  Please let me know how you are dealing with this?

    1.you need create a dba user in your database
    2.you can run the script as command
    eg. use PL/sql developer ->new command window->open script-> run.

  • When playing my i-tunes library through my hi-fi via Airport Express, how can I get i-tunes to play a single album and then stop, without continuing on through my entire library. It's a problem that doesn't occur when I'm listening through my i-pod.

    When playing my i-tunes library through my hi-fi via Airport Express, how can I get i-Tunes to play a single album and then stop, without continuing on through my entire library? It's a problem that doesn't occur when listening on my i-pod.

    Hey everyone in Apple world!
    I figured out how to fix the flashing yellow screen problem that I've been having on my MBP!  Yessssss!!!
    I found this super handy website with the golden answer: http://support.apple.com/kb/HT1379
    I followed the instructions on this page and here's what I did:
    Resetting NVRAM / PRAM
    Shut down your Mac.
    Locate the following keys on the keyboard: Command (⌘), Option, P, and R. You will need to hold these keys down simultaneously in step 4.
    Turn on the computer.
    Press and hold the Command-Option-P-R keys before the gray screen appears.
    Hold the keys down until the computer restarts and you hear the startup sound for the second time.
    Release the keys.
    I went through the 6 steps above twice, just to make sure I got rid of whatever stuff was holding up my bootup process.  Since I did that, my MBP boots up just like normal.  No flashing yellow screen anymore!!   
    (Note that I arrived at this solution when I first saw this page: http://support.apple.com/kb/TS2570?viewlocale=en_US)
    Let me know if this works for you!
    Elaine

  • How can I get my iPad to play just one song from my playlist and then stop automatically?

    I am a music teacher and I use the iPod on my iPad to play songs in class.  I have a long playlist of songs to choose from in each class, and I want to play just one song at a time.  I want to be able to start one song from my playlist and then walk away from my iPad and have it stop automatically when that song is over.  (I know how to make it repeat the same song over and over, but tha'ts not what I need.  I also know how to push "pause," but I don't want to have to walk away from the children to do it.) How can I make it play one song from a playlist at a time?

    I don't believe that there is a way to do that except, perhaps, creating a separate Playlist for each song.
    Suggestions for features to Apple at: http://www.apple.com/feedback/ipad.html

  • How long does it take to get approval from iTunes Connect and how do I find out if they are working on it?

    How long does it take to get approval from iTunes Connect and how do I find out if they are even working on it? I'm not really sure if my application was even delivered - from the links in IBA. Any suggestions how one might push the right buttons at Apple?
    Also went around in a big circle trying to get beyond the confusion of not having the right Apple ID when I've had it a long time. Confusion abounds and learning this forum also takes a new degree of patience. Humbling to say the least :-)
    Anyone been there done that?

    [email protected]
    [email protected]
    …support phone number call +1 (877) 206-2092.
    Global Phone Support
    We have expanded English-language publisher phone support. To make contacting the iBookstore support even easier, new local phone numbers are now available for Australia, France, Germany, Italy, Netherlands, Spain, and the U.K. Support is available Monday to Friday, from 7 a.m. to 5 p.m. (PT).
    Country
    Phone Number
    Australia
    1300 307 504
    Note that this is a low tariff number.
    France
    0805 540 117
    Germany
    0800 664 5307
    Italy
    800 915 902
    Netherlands
    0800 0201 578
    Spain
    900 812 687
    U.K.
    0800 975 0615
    U.S.
    +1 (877) 206-2092
    Toll-free from U.S. and Canada.

  • My time capsule was working and then I added another Macbook pro. TC stopped appearing in Airport Utilities. I have tried resetting TC, I have turned if off and held reset button with pen for 10 secs. I just cannot work out what else to do?

    My time capsule was working and then I added another Macbook pro. TC stopped appearing in Airport Utilities. I have tried resetting TC, I have turned if off and held reset button with pen for >10 secs. I just cannot work out what else to do? I have turned router off and on. Amber light is flashing.

    The ethernet says self assigned IP 169.254.67.6
    Then the ethernet is not getting an IP from the TC.. there is no connection.
    I am not sure where you mean when you say the green LED should be on. Do you mean the TC?
    Thanks
    In order to help troubleshoot ethernet connections all routers use connectivity leds.. even APPLE.. it has one big LED on the front.. and 4 tiny leds beside each ethernet port. That light has to come on for ethernet to be active.. if you plug an ethernet cable into the port and the light doesn't come on.. then there is no connection.. either the other end isn't plugged in.. or the cable is bad.. or the ethernet port is bad.. something is wrong.
    To get access to the TC you need this led to be green.. is it?
    If it is green and the WAN is also green.. then I want you to unplug the WAN connection.. the blue wire in the picture.. the port slightly separated from the 3 LAN port.. computer plugged just into LAN port.. no airport turned on.. and press the reset again for 10sec until front led flashes rapidly.. then try and bring up the airport utility again.. assuming the ethernet led is green.
    How old and what model is the TC?
    The A number from the rubber mat will tell us the model.

  • Bought Garageband for iPad1 and it worked like a dream. Then I upgraded my system to 4.3 and now Garageband doesn't work. How come? When I try to start it just flickers and then goes back to show the symbol for the app.

    Bought Garageband for iPad1 and it worked like a dream. Then I upgraded my system to 4.3.5 and now Garageband doesn't work. How come? When I try to start it just flickers and then goes back to show the symbol for the app.

    I understood what you were saying. You did type 4.3.5 in your post. Several other things to try.
    Close all open apps like I described above. Just tap the home button first so that you will be able to access all of your apps. Close every single one and then restart again.
    You can also delete the app and download it again. As long as you use the same Apple ID and password there is no charge to download it again. Tap and hold down on the GarageBand app icon until it wiggles. Then tap the X to delete it. Download it again.
    Reset the iPad. Hold down on the sleep and home buttons at the same time until the Apple logo appears on the screen. It takes about 10-15 seconds. Ignore the red slider shut off bar. When the Apple logo appears you can let go of the buttons and the iPad will reboot.
    The final thing to try is to download another app - any free app. Sometimes that seems to reset something on the iPad. You can always delete the free app if you don't want it.

  • How come sometimes my iPod Touch gets stuck updating an app and then just deletes it?

    How come sometimes my iPod Touch gets stuck updating an app and then just deletes it instead?
    The update bar on the app gets stuck on empty and then the next time I sync the app gets deleted.
    It is really annoying to lose all my data when updating an app, and it has happend more than once!
    Any idea why it does this? I am scared to update my favorite apps for fear that they could be deleted.
    -Sam

    I never had an app being deleted.  You can always udate the app on the computer and then sync.

  • How can I create an csv/excel file using pl/sql and then sending that file

    How can I create an csv/excel file using pl/sql and then sending that file to a clients site using pl/sql?
    I know how to create the csv/excel file but I can't figure out how I would get it to the clients site.

    968776 wrote:
    How can I create an csv/excel file using pl/sql and then sending that file to a clients site using pl/sql?
    I know how to create the csv/excel file but I can't figure out how I would get it to the clients site.You are trying to do it at a wrong place..
    Whay do you want database (pl/sql) code to do these things?
    Anyhow, you may be interested in :
    {message:id=9360007}
    {message:id=9984244}

  • How do I remove an incorrect apple ID from an iPad and replace it with the correct one?

    How can I remove an incorrect Apple ID from my ipad and replace it with the correct one?

    Hello Shy guy,
    You can try this:
    1. Go to the iTunes Store or App Store
    2. Scroll down, there you will see Apple ID: "your email" (below Redeem and Send Gift)
    3. Tap on that button
    4. Tap on Sign Out
    Now you should be able to use another Apple ID.
    Cedric

Maybe you are looking for