12-12-2012 1:05 PM
Dear All,
We have a requirement of disbaling PDF! command on print preview screen. Can we do this through ABAP or through user authorization level.
Thanks in advance.
Murthy.
12-13-2012 5:37 AM
Hiii,
Their is one solution that comes in my mind which i have tested is - Create Implicit Enhancement in PBO of program SAPLSTXBC include LSTXBCFOP and put your condition or authorization object inside it if your condition meet than show PDF preview otherwise leave to screen.
See below screenshot .
Note : SAPLSTXBC - this is common program which is responsible for PDF preview when you are in print preview of any SF so for avoiding effect of this check on other tcode except your please apply tcode check or other possible conditions
12-12-2012 1:15 PM
Hi Murthy,
You mean to prevent printing over PDF output devices? I think there's nothing you can do through ABAP, at most output devices itself (not really sure what could be done from auth perspective), don't forget LOCL printing to PDF also.
Edgar
12-12-2012 1:43 PM
Hi Murthy,
you want "Suppressing the dialog box for print preview " or
don't want PDF output ? please clear what u want ,
i mean is it Z program attachwith some smartfor/script ?
if you want "Suppressing the dialog box for print preview " then find below sample code .
data : w_cparam TYPE ssfctrlop .
w_cparam-no_dialog = 'X'.
w_cparam-preview = space. " Suppressing the dialog box for print preview
w_cparam-getotf = 'X'.
* Printer name to be used is provided in the export parameter
* OUTPUT_OPTIONS
w_outoptions-tddest = 'LP01'.
CALL FUNCTION w_fmodule
EXPORTING
* ARCHIVE_INDEX =
* ARCHIVE_INDEX_TAB =
* ARCHIVE_PARAMETERS =
control_parameters = w_cparam
* MAIL_APPL_OBJ =
* MAIL_RECIPIENT =
* MAIL_SENDER =
output_options = w_outoptions
* USER_SETTINGS = 'X'
IMPORTING
* DOCUMENT_OUTPUT_INFO =
job_output_info = t_otf_from_fm
* JOB_OUTPUT_OPTIONS =
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5
.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
Regard's
Smruti
12-13-2012 3:47 AM
Hi Nagasaki and Ranjan,
Thanks for your response.
If we execute PDF! command on command field at print preview it converts the layout to PDF automatically ( If form is implemented using Smartf Forms).
I want to disbale this feature through ABAP/ through User Authorizations.
Please respond if you have a solution.
Thanks & Regards,
Murthy
12-12-2012 3:19 PM
Hi,
I also need help on this...
Can anybody HELP!!!!
Regards,
Lynette
12-13-2012 5:37 AM
Hiii,
Their is one solution that comes in my mind which i have tested is - Create Implicit Enhancement in PBO of program SAPLSTXBC include LSTXBCFOP and put your condition or authorization object inside it if your condition meet than show PDF preview otherwise leave to screen.
See below screenshot .
Note : SAPLSTXBC - this is common program which is responsible for PDF preview when you are in print preview of any SF so for avoiding effect of this check on other tcode except your please apply tcode check or other possible conditions
12-13-2012 6:34 AM
Hi Ashish,
Thanks for the effort.
We thought it can be achieved through Smart forms settings / authorizations level. How ever we tried the solution suggested by you.
It is working fine. Thanks alot.
12-13-2012 7:52 AM
If you look for an authorization check, start a trace with ST01 for authorization check, display such a spool and execute function PDF!, then stop trace and look at the performed authorization checks.
Regards,
Raymond
06-29-2015 3:47 PM