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: 

how to download data from spool to excel file

Former Member
0 Kudos

Hi,

I have requirement like....i need to download data from spool to excel file.

Please let me know the process how to download...

<removed by moderator>

<removed by moderator>

Thanks,

Khasimsa

Moderator message: please (re)search yourself before asking, do not assign priorities, do not offer re-ward

locked by: Thomas Zloch on Sep 8, 2010 1:18 PM

4 REPLIES 4

Former Member
0 Kudos

Hi

Use the function module: RSPO_RETURN_ABAP_SPOOLJOB, to read the data from spool.

Just u need pass the spool number to this,in tables u will get the spool data,store it one internal table.

Now use the Function Module : GUI_DOWNLOAD to download in excel by passing above internal table data.

Regards,

Raghu.

Former Member
0 Kudos

Hi try this way..



*FM called that returns the Spool Request Number data into and internal table
  CALL FUNCTION 'RSPO_RETURN_ABAP_SPOOLJOB'
    EXPORTING
      rqident              = p_spool                     "Spool Request Number
      first_line           = 1
    TABLES
      buffer               = it_spool_xls                            "Internal table that will have the Spool Request No data
    EXCEPTIONS
      no_such_job          = 1
      not_abap_list        = 2
      job_contains_no_data = 3
      selection_empty      = 4
      no_permission        = 5
      can_not_access       = 6
      read_error           = 7
      OTHERS               = 8.

*To convert the spool data into excel format
  CALL FUNCTION 'SO_RAW_TO_RTF'
    TABLES
      objcont_old = it_spool_xls               "Internal table having spool data
      objcont_new = it_xls_spool.           "Int table having Excel format data converted from Spool data


"call GUI down Load by passing  it_xls_spool 

Prabhudas

Former Member
0 Kudos

Hello ,

Thanks for the helpful answer.

I need one mone info.

i have sublitted the job using the below statement.

SUBMIT rcnpd000

USING SELECTION-SET 'JIM_C'

USING SELECTION-SETS OF PROGRAM 'RCNPD000'

VIA JOB l_jobname

NUMBER l_jobcount

TO SAP-SPOOL WITHOUT SPOOL DYNPRO

SPOOL PARAMETERS ls_params

AND RETURN.

How to get the spool number from the above statement.

0 Kudos

Hi

You can check the spool number in table TSP01.

check below thread it can be of help to you.

Regards

Abhii