cancel
Showing results for 
Search instead for 
Did you mean: 

No Dialog for print preview

sushant_singh
Participant
0 Kudos

Hi ,

I am sending a smartform output as a attachment in email using FM SO_NEW_DOCUMENT_ATT_SEND_API1. I don't want the dialog screen

for print options to appear while executing the print program.

How can i remove it.

Thanks ,

Sushant

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

hi,

make ITCPO-TDNOPRINT = 'X' .or. ' '.

pass this structure to the options parameters in your function module.

sushant_singh
Participant
0 Kudos

FYI The parameter control_parameters-GETOTF = 'X'. is must for the requirement.

Sushant.

Former Member
0 Kudos

hello sushanth...

Iam here mentioned only the variable for the Dailog u have asked.. i know about that..

W_CTRLOP-GETOTF = 'X'.

W_CTRLOP-NO_DIALOG = 'X'.

W_COMPOP-TDNOPREV = 'X'.

sushant_singh
Participant
0 Kudos

Hi Prabhu ,

Which FM are you talking about ?

Please can you send the parameters which I would require to

fill to rectify the issue .

Thanks.

sushant_singh
Participant
0 Kudos

Hi Naresh ,

I am using the same parameters , but the screen is still appearing .

The parameters I am using are:

control_parameters-GETOTF = 'X'.

control_parameters-no_dialog = 'X'.

output_options-TDNOPREV = 'X'.

The smartform FM , I am using is :

CALL FUNCTION '/1BCDWB/SF00000410'

EXPORTING

  • ARCHIVE_INDEX =

  • ARCHIVE_INDEX_TAB =

  • ARCHIVE_PARAMETERS =

CONTROL_PARAMETERS = control_parameters

  • MAIL_APPL_OBJ =

  • MAIL_RECIPIENT =

  • MAIL_SENDER =

OUTPUT_OPTIONS = output_options

USER_SETTINGS = 'X'

ZCHECK_HEADER = ZCHECK_HEADER

ZCHECK_GENERAL = ZCHECK_GENERAL

  • ZFORM_TYPE = 'c'

IMPORTING

  • DOCUMENT_OUTPUT_INFO =

JOB_OUTPUT_INFO = job_out_info

  • JOB_OUTPUT_OPTIONS =

TABLES

ZCHECK_DETAIL_REM = ZCHECK_DETAIL_REM

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.

Former Member
0 Kudos

hello Sushanth,

it should work...

even i used the same paramters in soany programs...

these are the varaible u ahve passed for other program...

Once check in the debugginmode whethere this value is populating in the control parameters... r u callin the smartform in any other part of the porgram

  st_control_parameters-device     = c_printer. "Output device
 st_control_parameters-no_dialog  = c_x.       "SAP Smart Forms: General Indicator

  st_output_options-tdtitle        = text-011.  "Free goods credit notes'
  st_output_options-tdnewid        = c_x.       "create new spool dataset
*  ST_OUTPUT_OPTIONS-TDCOPIES       = C_N_1.     "one copy Commented by SM0001
  st_output_options-tddest         = p_prntr.   "name of printer
  st_output_options-tdnoprev       = space.     "no preview
  st_output_options-tdcover        = space.     "no cover page
  st_output_options-tddataset      = p_prntr.   "dataset name
  st_output_options-tdsuffix2      = space.     "name of report variant
*  ST_OUTPUT_OPTIONS-TDIMMED        = C_Y.       "print immediately? Commented by SM0001
  st_output_options-tddelete       = space.     "do not delete after print

*****************Insert by SM0001 on 17/10/2006
  IF p_tmod = c_2.
    st_output_options-tdarmod        = c_3.
  ELSEIF p_tmod = c_1.
    st_output_options-tdcopies       = c_n_1.     "one copy
    st_output_options-tdimmed        = c_y.       "print immediately?
  ELSEIF p_tmod = c_3.
    st_output_options-tdarmod        = c_3.
    st_output_options-tdcopies       = c_n_1.     "one copy
    st_output_options-tdimmed        = c_y.       "print immediately?
  ENDIF.

sushant_singh
Participant
0 Kudos

Hi Naresh,

Please write explicitly which parameters I would have to use .

Thanks .

Former Member
0 Kudos

hi

u r using the correct parameters only.. wht i am asking u is r u calling the smartform somewhere else or only once...!!!

 st_control_parameters-device     = c_printer. "Output device
 st_control_parameters-no_dialog  = c_x.       "SAP Smart Forms: General Indicator
 st_control_parameters-GETOTF = 'X'.

 st_output_options-tdnoprev       = space.     "no preview

Former Member
0 Kudos

Hi Sushant,

Here is the way you should suppress the print preview dialog of smartform

data: ctrl_param type ssfctrlop,

fm_name type rs38l_fnam.

<b>ctrl_param-no_dialog = 'X'.</b>

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

EXPORTING

formname = gv_form

  • 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

<b>control_parameters = ctrl_param</b>

*output_options = out_option

<b>user_settings = space</b>

tables

itab = itab[]

exceptions

.

.

.

This will work.

Regards,

SP.

Former Member
0 Kudos

HI

W_CTRLOP-NO_DIALOG = 'X'.  "COTROLE PARAMETERS
CALL FUNCTION V_FORM_NAME
  EXPORTING
    CONTROL_PARAMETERS = W_CTRLOP
    OUTPUT_OPTIONS     = W_COMPOP
    USER_SETTINGS      = 'X'
  IMPORTING
    JOB_OUTPUT_INFO    = W_RETURN
  EXCEPTIONS
    FORMATTING_ERROR   = 1
    INTERNAL_ERROR     = 2
    SEND_ERROR         = 3
    USER_CANCELED      = 4
    OTHERS             = 5.

Former Member
0 Kudos

check field called No print preview in options of that FM

ITCPO.

Regards

prabhu