on 09-14-2012 10:22 AM
Hi Guys,
I have program which generates SPOOL for printing but I do not want to print immediately. I tried setting control parameter and output paramets but nothing worked out. But when I unchecking Print output immediately in SU01 I am able to get desired SPOOL waiting to be printed. But I want this to happen without changes in SU01....Please Help
DATA :
fm_name TYPE rs38l_fnam,
it_vbak TYPE TABLE OF vbak.
*SELECT * FROM vbak into TABLE it_vbak
* WHERE vbeln GE '0100000004'
* AND vbeln LE '0100000010'.
DATA :
gs_control_parameters TYPE SSFCTRLOP,
gs_output_options TYPE SSFCOMPOP.
gs_output_options-TDIMMED = ' ' .
gs_control_parameters-no_dialog = 'X'.
gs_output_options-tdnewid = 'X'.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'ZCH_LABEL_ONE'
IMPORTING
FM_NAME = fm_name
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3.
CALL FUNCTION fm_name
EXPORTING
control_parameters = gs_control_parameters
output_options = gs_output_options
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5
.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi All,
Issue is resolved...
Solution (1) setting user_setting = ' '.............
Solution (2)Using BAPI_USER_CHANGE is also a good option......one can use it for other application also...
Send_ERROR was due to spool overflow.....I deleted the old spool requests......i got the new spools
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Chetan,
Yes, setting user_setting = ' ' will make the system to ignore the user default settings..as you are already making gs_output_options-TDIMMED = ' ' , it will not print immediately.
I was just wondering all these days watching you thread for what you have been still waiting for .
Regards,
SG.
Hi All,
I have been trying all your suggestions. Now a new problem has occured. SEND_ERROR = 3 is causing problem....
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hiii chetan ,
I have one idea for this problem which i had used for removing immediate print and again set
1) Before print i used - BAPI_USER_GET_DETAIL and get detail defaults by user name.
than set parameter
* defaults-spdb = 'G'. " Set Immediate
defaults-spdb = 'H'. " Reset Immediate
defaultsx-spdb = 'X'.
2) pass this default to BAPI_USER_CHANGE and Reset Immediate parameter as i show above.
after print - than again if you want to reset same
3) Use again - BAPI_USER_CHANGE .
Hi,
Rap this program with a dummy selection screen - that does nothing, then on the selection screen choose in menu program--->execute on back ground.
Once you run this job in the background and under properties of the printing settings (the first dialog box that pops up after asking to run job in background) and double click the print immediately and chose print to sap spool for now.
That should do the job,
Best,
Iftah
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.