cancel
Showing results for 
Search instead for 
Did you mean: 

Executing Spool request from OData service

surya_jangareddy
Explorer
0 Kudos

Hi All,

I am using the function module RSPO_OUTPUT_SPOOL_REQUEST in my custom RFC and it is executing fine and getting output immediately. If i call the same RFC from ODATA service then FM RSPO_OUTPUT_SPOOL_REQUEST is executing but no printout is coming.

I observed in FM while debugging, we have one system function CALL 'RSPOAEPJ'. It is executing and getting printout when i call it from se37 level. But if i calling the same from odata service, then CALL 'RSPOAEPJ' is executing but not getting printout and not return any errors.

Please help me to resolve this issue.

Is there any setting required in SPAD if i am accessing the spool from external service like (OData , HTTP...)


Regards,

Surya J.

Sandra_Rossi
Active Contributor

All parameters of CALL 'RSPOAEPJ' are the same in both cases? (especially DEST ; I guess that the user is different, and the one for RFC doesn't have a default printer (transaction code SU01 or SU3)

Sandra_Rossi
Active Contributor
0 Kudos
  1. Make sure that the call of RSPO_OUTPUT_SPOOL_REQUEST does not return any exception.
  2. If the call of RSPO_OUTPUT_SPOOL_REQUEST is followed by a ROLLBACK WORK instead of a COMMIT WORK, the output request won't be generated.
  3. Are you sure that the output request is not generated? Look at the transaction code SP01, select the spool request and display its output requests (F5 at keyboard).

Accepted Solutions (0)

Answers (5)

Answers (5)

Sandra_Rossi
Active Contributor
0 Kudos

RSPO_OUTPUT_SPOOL_REQUEST takes the given spool request number and generates an output request. You can see then in SP01 transaction code.

As you said that the output request is successfully generated also in the OData context, the question turns to be an issue with the printing.

In SP01, look at the print status at the right of the output request, and take action accordingly. Search the forum if you have any doubt about the meaning of the status and which action is to be taken.

surya_jangareddy
Explorer
0 Kudos

Hi Sandra,

Output request is creating but not getting printout, and not showing any error in log file also. is any settings required in SPAD when executing the spool from RFC

Sandra_Rossi
Active Contributor
0 Kudos

Please use the COMMENT button. ANSWER is only to propose a solution. If it's too late, you still have an option to convert your answer into a comment.

surya_jangareddy
Explorer
0 Kudos

Hi Simone,

I debugged the FM RSPO_OUTPUT_SPOOL_REQUEST. Inside this FM, we have one system call CALL 'RSPOAEPJ'. It is executing and getting printout when i call it from se37 level. But if i calling the same from odata service, then CALL 'RSPOAEPJ' is executing but not getting printout and return value of SY-SUBRC = 0.

surya_jangareddy
Explorer
0 Kudos

Hi Sandra Rossi,

Please find the attached screenshot , which i am passing the parameters to call 'RSPOAEPJ' in both cases.

Sandra_Rossi
Active Contributor
0 Kudos

Please use the COMMENT button. ANSWER is only to propose a solution.

SimoneMilesi
Active Contributor
0 Kudos

Did you try to follow in debug what's happening?

surya_jangareddy
Explorer
0 Kudos

HI Sandra Rossi,

Thank you for quick response.

All parameters are same in both cases. And i have default parameter in SU01 as 'SD03'. In both cases i am using my userid only.

Sandra_Rossi
Active Contributor
0 Kudos

Please use the COMMENT button. ANSWER is only to propose a solution.