how to check if the spool req is open or close and close the req or open it
I have developed a program in which user can have option of print preview the outputs (all prints in one print request) , then save the outputs in one pdf, then send them through fax/email
But problem is that when I run each option, the spool requests get generated properly. But when I do print preview and then save as pdf is gives error message that
"No output request open. Document processing not possible. "
You tried to process a new document by calling function module
SSFCOMP_PROCESS_DOCUMENT, but no output request is open.
The system issues an error message.
Check the sequence in which you call the function modules SSFCOMP_OPEN
and SSFCOMP_CLOSE. This is probably an internal error. Contact the SAP
hotline and report the problem.
in the code of print preview I have called the FM:
call function 'SSFCOMP_CLOSE'
ERROR = 1
others = 2.
if SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
Give proper inputs for no_oprn and no_close in control_parameters while calling last record in loop at the print preview option.