on 12-10-2009 3:39 PM
Hi!
In order to solve another problem I have, I need to find a solution to the following issue:
I need that when the user clicks on "Preview Print" at the print options of a SapScript, the system creates a spool order.
I'm getting a spool order only when the user PRINTs the form, not when the PRINT PREVIEW is selected.
There is a way to make the system to create a spool order, no matter if the user is printing or viewing the form???
Thanks in advance!
Bettina
Hi Bettina,
To achieve this before calling smartforms function module, declare below data.
data: gst_control_parameters type ssfctrlop,
gst_output_options type ssfcompop,
gt_job_output_info type ssfcrescl,
gt_output_options type ssfcresop.
Now before calling the generated smartforms function module pass below parameters
gst_control_parameters-no_dialog = 'X'.
gst_control_parameters-getotf = 'X'.
gst_control_parameters-preview = 'X'.
Finally pass the parameter as below
control_parameters = gst_control_parameters
output_options = gst_output_options
job_output_info = gt_job_output_info
job_output_options = gt_output_options
Regards
Abhii
Edited by: Abhii on Dec 10, 2009 4:48 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
I think u need to run your print twice if the user presses preview option.
So your code should be like:
CLEAR: ITCPO, ITCPP.
DO.
CALL FUNCTION OPEN_FORM
EXPORTING
OPTIONS = ITCPO
IMPORTING
RESULT = ITCPP.
* All code it needs to print the document and at the last
IF ITCPP-TDPREVIEW = 'X'.
* Here it needs to fill the structure ITCPO to be transfered to parameter OPTION
ELSE.
EXIT.
ENDIF.
ENDDO.
In the second run u need to fill the structure ITCPO in order to create the spool
Max
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.