on 04-21-2009 6:20 AM
Hi All.
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. "
Diagnosis
You tried to process a new document by calling function module
SSFCOMP_PROCESS_DOCUMENT, but no output request is open.
System response
The system issues an error message.
Procedure
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'
exceptions
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.
endif.
Please help.
Rgds,
Madhuri
Hi Madhuri,
Give proper inputs for no_oprn and no_close in control_parameters while calling last record in loop at the print preview option.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
1) Use below parameters of structure SSFCTRLOP
NO_OPEN, NO_CLOSE: These two flags prevent the print request from being closed after accepting the output of the Smart Form and allows you to include all other form output into this print request. The value should be like the following:
1st call:
NO_OPEN = SPACE.
NO_CLOSE = 'X'.
nth call:
NO_OPEN = 'X'.
NO_CLOSE = 'X'.
last call:
NO_OPEN = 'X'.
NO_CLOSE = SPACE
2.SSFCOMPOP: Structure for the output option.
TDNEWID: A flag indicating whether a new request is created.
4) Define one data wa_print_control referencing the structure SSFCTRLOP, and define another data variable wa_output_option referencing the structure SSFCOMPOP in the top include file of this report.
5) Clear the above two work areas before the print loop happens on the internal table that contains the selected invoice headers.
6) Initialize these two work areas with the values which would not change during the print loop as the following code fragment:
wa_print_control-no_dialog = ' '. u201DShow print setting dialog
wa_print_control-preview = 'X'. u201DEnable print preview
wa_output_option-TDNEWID = 'X'. u201CNew spool request.
7) In the loop at the internal table which holds the selected invoice headers, set blank value to of the field wa_print_control-NO_OPEN and set u2018Xu2019 to the field wa_print_control-NO_CLOSE for the first loop at the AT FIRST event because it will be the first call to the function module of the smartform. The code is bellow:
print_control-no_open = ' '.
print_control-no_close = 'X'.
8) Set blank value to the field wa_print_control-NO_CLOSE to close the spool request for the last loop at the AT LAST event.
wa_print_control-NO_CLOSE = u2018 u2018
9) Call the function module generated by the Form Design by passing the print control work area and output area.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.