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: 

Downloading 108 spool files: Any FM?

Former Member
0 Kudos

Hello,

Need your help with downloading 108 spool files.

I have scheduled 108 jobs and now I have to download data of all these 108 spools into excel files (from various PRD systems).

One way is I go to System -> List -> Save -> Local File.

However I don't want to use this.

Neither I have option to create program in SE38, as I don't have access to same.

Please advice if theree is any standard program or function module which can help me in this.

Will be very thankful.

Regards,

Surpreet Singh Bal

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

Use the function module

RSPO_DOWNLOAD_SPOOLJOB

In this you can mention the RFC destinations as well...

Hope this helps you

Regards,

Siddarth

5 REPLIES 5

Former Member
0 Kudos

Hi,

Use the function module

RSPO_DOWNLOAD_SPOOLJOB

In this you can mention the RFC destinations as well...

Hope this helps you

Regards,

Siddarth

0 Kudos

Hello Siddharth,

Yes this can be helpful as I don't have access to use SE37 in PRD however I can use it in DEV box.

Can you please help me understand, what need to be filled in FNAME and ID.

Thanks for your help.

Regards,

Surpreet

0 Kudos

http://www.sapfans.com/forums/viewtopic.php?f=13&t=316295

form download_selected tables lsporq type sp01r_tview
                       changing rs_selfield type slis_selfield.

  data: rqnum like sy-tabix,
        filename like rlgrap-filename,
        dw_rc type sy-subrc.      

  perform get_selected3 tables lsporq
                        using ' ' rs_selfield changing rqnum.
  if rqnum > 0.
    loop at lsporq where selected = 'X'.
      filename(3) = lsporq-sys.
      filename+3(10) = lsporq-rqid_char.
      filename+13(4) = '.TXT'.
      move-corresponding lsporq  to tsp01sys.
      call function 'RSPO_CHECK_OUTRQ_PERMISSION'
        exporting
          spoolreq = tsp01sys
          access   = 'DOWN'
        exceptions
          others   = 1.
      if sy-subrc <> 0.
        out_message ti.
*       MESSAGE i059 WITH tsp01sys-rqident tsp01sys-sys.
      else.
        gprog = 'RSPO_DOWNLOAD_SPOOLJOB'.
        if lsporq-sys = sy-sysid.
          call function 'RSPO_DOWNLOAD_SPOOLJOB'
            exporting
              id     = lsporq-rqident
              fname  = filename
            exceptions
              others = 1.
        else.
          call function 'RSPO_DOWNLOAD_SPOOLJOB'
            destination lsporq-sys
            exporting
              id                    = lsporq-rqident
              fname                 = filename
            exceptions
              communication_failure = 102  message msg_text
              system_failure        = 103  message msg_text
              others                = 1.
        endif.
        dw_rc = sy-subrc.         
        out_rfc_message lsporq-sys ti.
      endif.
    endloop.
    if dw_rc = 0.              
      message s028.
    endif.                      
  endif.
endform.                    "DOWNLOAD_SELECTED

0 Kudos

Hi,

Sure,

fname is the target filename where it has to download and with what name

ID is the spool ID number

From spool ID it downloads to filename given

Regards,

Siddarth

former_member156446
Active Contributor
0 Kudos

RSTXPDFT5 - GUI download of a spool request