cancel
Showing results for 
Search instead for 
Did you mean: 

Issue regarding the program running in background......URGENT URGENT

Former Member
0 Kudos

Dear All,

When I am running the program in background the spool request I am taking from SY-SPONO to one of the variable and then that variable passing to function module RSPO_RETURN_SPOOLJOB, but the program giving error is that

"Error in RSPO_RETURN_SPOOLJOB, Spool 0" or "Spool Request 0 does not exits ".

So please give the suitable answer for that.

So I want to know that , when program runs in a background can spool request number is available in SY-SPONO .

Regards,

Vikram

Accepted Solutions (0)

Answers (6)

Answers (6)

0 Kudos

Please tell how you solved the issue. I am facing the issue trying to use the FM in a program to email spool contents via a link. I am getting the correct Spool Id from sy-spono and using it in the program to 1) convert to INT4 and 2) use as the email subject.

Thank you,

Kurt

Former Member
0 Kudos

Problem is solved.....

Thank you very much.......

former_member223537
Active Contributor
0 Kudos

HI Vikram,

You can refer table TSP01 for the spool no.

Pass the spool name along with date time details & you should be able to get the latest spool

Best regards,

Prashant

Former Member
0 Kudos

By submitting to background job, then you can use SY-SPONO. But there is a draw back - if you are submistitng this from a program, the SY-SPONO is available only inside the submitted program, it get refreshed outiside it. so you will have to capture it & use it.

Former Member
0 Kudos

Hi Vikram

As you probably know, sy-spono is empty and this is why the error is occurring. Why not use

CALL FUNCTION 'RSPO_FIND_SPOOL_REQUESTS'

EXPORTING

RQOWNER = SY-UNAME

AUTHORITY = SPOOL_AUTHORITY

TABLES

SPOOLREQUESTS = SPOOL_LIST

EXCEPTIONS

NO_PERMISSION = 1.

To get the spool numbers and then pass into RSPO_RETURN_SPOOLJOB.

Regards

Gareth

Former Member
0 Kudos

HI GARETH,

When I use the function module 'RSPO_FIND_SPOOL_REQUESTS'

I am getting the spool requests in table SPOOL_LIST , but I am not able to differentiate the current request from that one.

So please guide for that one.

Regards,

Vikram

Former Member
0 Kudos

Hi Vikram,

2 possibilities could be used:

1. Assign a name to the current spool request at the start of the run; or,

2. sort spool_list by RQCRETIME descending which will put the current job as index 1 in spool_list.

Regards

Gareth

Former Member
0 Kudos

Hi

If you run the report in background, the system will generate a spool.

I think it will not handle the spool generated during the background job.

regards

Shiva