cancel
Showing results for 
Search instead for 
Did you mean: 

Suppress print dialog at form startup

Former Member
0 Kudos

Dear experts,

I have seen this question being asked a lot but no one has defined in a way that one could make a confident start to resolve this.

Keeping this code in mind , i am required that when i execute this driver prgram that executes given smartform 'ZSF_SALESGRN' .

Here i should not get the inital popup of print-dialog.

How can i modify/add this given code to achieve the same.

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

EXPORTING

formname = 'ZSF_SALESGRN'

  • VARIANT = ' '

  • DIRECT_CALL = ' '

IMPORTING

FM_NAME = FM_NAME

  • EXCEPTIONS

  • NO_FORM = 1

  • NO_FUNCTION_MODULE = 2

  • OTHERS = 3

.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

CALL FUNCTION FM_NAME

  • EXPORTING

  • ARCHIVE_INDEX =

  • ARCHIVE_INDEX_TAB =

  • ARCHIVE_PARAMETERS =

  • CONTROL_PARAMETERS =

  • MAIL_APPL_OBJ =

  • MAIL_RECIPIENT =

  • MAIL_SENDER =

  • OUTPUT_OPTIONS =

  • USER_SETTINGS = 'X'

  • IMPORTING

  • DOCUMENT_OUTPUT_INFO =

  • JOB_OUTPUT_INFO =

  • JOB_OUTPUT_OPTIONS =

TABLES

i_header = i_heading1

i_detail = i_lipsvbap

  • 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.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

In the structure CONTROL_PARAMETERS, you have field called NO_DIALOG. You have to check this field and pass this to the structure CONTROL_PARAMETERS.

Your question is

What is st_control_parameters variable .What is the data type ?

it of type SSFCTRLOP.

Your declaration should be

st_control_parameter type SSFCTRLOP.

Thanks,

Phani Diwakar.

Edited by: MVPhani Diwakar on Aug 4, 2008 12:02 PM

Former Member
0 Kudos

In case u do not have the printer settings maintained for teh user then u have to supply the printer name yourself..otherwise it will pop up again..U have to fill up these parametrs also

ST_OUTPUT_OPTIONS-TDDEST

ST_OUTPUT_OPTIONS-TDPRINTER

and make the USER_SETTINGS = space

st_control_parameter type SSFCTRLOP

Former Member
0 Kudos

What about other datatypes ?

Former Member
0 Kudos

st_control_parameter type SSFCTRLOP

SSFCTRLOP is a structure containing all the fileds

Answers (1)

Answers (1)

Former Member
0 Kudos

Well here is the solution...

For PRINTING DIRECTLY

ST_CONTROL_PARAMETERS-PREVIEW = ' '.

ST_CONTROL_PARAMETERS-NO_DIALOG = 'X'.

ST_OUTPUT_OPTIONS-TDIMMED = 'X'.

CALL FUNCTION v_fm_name

EXPORTING

ARCHIVE_INDEX =

ARCHIVE_INDEX_TAB =

ARCHIVE_PARAMETERS =

CONTROL_PARAMETERS = st_control_parameters

MAIL_APPL_OBJ =

MAIL_RECIPIENT =

MAIL_SENDER =

OUTPUT_OPTIONS = st_output_options

USER_SETTINGS = 'X'

IMPORTING

DOCUMENT_OUTPUT_INFO = st_document_output_info

JOB_OUTPUT_INFO = st_job_output_info

JOB_OUTPUT_OPTIONS = st_job_output_options

TABLES

IS_LABELS = IS_LABELS

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.

ELSE.

Former Member
0 Kudos

What is st_control_parameters variable .What is the data type ?