Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

selection few pages of spool output

Former Member
0 Kudos

Hi,

I am sending spool request related output to a file using the function module RSPO_RETURN_ABAP_SPOOLJOB.

is there any function module to select only some portion of this buffer/output?

for example: the total output contains 5000 pages.

but I want to select only 1500 pages -> transfer to file

again select from 1501 page to 3000 pages -> transfer to file.

this is bacause, in production system the number of pages will be millions, which is causing overflow error.

Please help me

1 ACCEPTED SOLUTION

naimesh_patel
Active Contributor
0 Kudos

There are parameters which can accepts the lines to be read from the Spool. You can set the first line and the Last line to be read from the Spool. E.g you have a page with 65 lines and you want to read 100 pages at a time, last line would be 6500.


Like:
CALL FUNCTION 'RSPO_RETURN_ABAP_SPOOLJOB'
  EXPORTING
    rqident                    = spool
   FIRST_LINE                 = 1
   LAST_LINE                  = 6500

Regards,

Naimesh Patel

6 REPLIES 6

naimesh_patel
Active Contributor
0 Kudos

There are parameters which can accepts the lines to be read from the Spool. You can set the first line and the Last line to be read from the Spool. E.g you have a page with 65 lines and you want to read 100 pages at a time, last line would be 6500.


Like:
CALL FUNCTION 'RSPO_RETURN_ABAP_SPOOLJOB'
  EXPORTING
    rqident                    = spool
   FIRST_LINE                 = 1
   LAST_LINE                  = 6500

Regards,

Naimesh Patel

0 Kudos

Hi,

But here I dont know the total output file size/total number of lines in my spool output.

is there any solution for this?

0 Kudos

Hello,

You could try using fm RSPO_GET_PAGES_SPOOLJOB to get the number

of pages in your spool request.

Regards

Greg Kern

0 Kudos

the requirement is retireve output of the selected pages from the spool output buffer.

plz help me

0 Kudos

Hello,

My thought was that you could use the FM suggested by Naimesh (RSPO_RETURN_ABAP_SPOOLJOB) after you have determined the number of pages in your spool list using the FM that I have mentioned(RSPO_GET_PAGES_SPOOLJOB).

I assume that you know the number of lines in each page of the spool list.

So, if you want pages 10 - 15 and your page size is 65 then you could call

RSPO_RETURN_ABAP_SPOOLJOB with first_line = 650 and

last_line = 975.

Hope this helps a bit.

Regards

Greg Kern

Former Member
0 Kudos

thanks