Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

how to disable print popup and print option in smartform

Dear friends,

when i execute my smartform driver program i get popup for prin and print priview, i want to disable that popup screen and when i get print preview i want to disable print option from there also. can you please suggest me how to do it?

Former Member
Former Member replied

Hi,

Try this

DATA: T_SSFCTRLOP TYPE SSFCTRLOP. "FOR SMART FORMS

DATA: LS_OUTPUT_OPTIONS TYPE SSFCOMPOP.

DATA: FNAME TYPE RS38L_FNAM.

DATA: L_DEVTYPE TYPE RSPOPTYPE.

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

EXPORTING

FORMNAME = 'YTEST'

IMPORTING

FM_NAME = FNAME

EXCEPTIONS

NO_FORM = 1

NO_FUNCTION_MODULE = 2

OTHERS = 3.

T_SSFCTRLOP-NO_DIALOG = 'X'.

T_SSFCTRLOP-GETOTF = 'X'.

T_SSFCTRLOP-LANGU = 'E'.

CALL FUNCTION 'SSF_GET_DEVICE_TYPE'

EXPORTING

I_LANGUAGE = 'E'

IMPORTING

E_DEVTYPE = L_DEVTYPE

EXCEPTIONS

NO_LANGUAGE = 1

LANGUAGE_NOT_INSTALLED = 2

NO_DEVTYPE_FOUND = 3

SYSTEM_ERROR = 4

OTHERS = 5.

LS_OUTPUT_OPTIONS-TDPRINTER = L_DEVTYPE.

CALL FUNCTION FNAME

EXPORTING

CONTROL_PARAMETERS = T_SSFCTRLOP

OUTPUT_OPTIONS = LS_OUTPUT_OPTIONS

USER_SETTINGS = SPACE

IMPORTING

JOB_OUTPUT_INFO = OUTPUT_INFO

EXCEPTIONS

FORMATTING_ERROR = 1

INTERNAL_ERROR = 2

SEND_ERROR = 3

USER_CANCELED = 4

OTHERS = 5.

regards,

Shweta

1 View this answer in context
Not what you were looking for? View more on this topic or Ask a question