Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to skip the PRINT screen?

Former Member
0 Kudos
152

Hi All,

I have a report, which calls the Smartform.

When I execute my report, the PRINT screen will appear, where i press the PRINT button, and then the form gets printed.

My requirement.

I dont want this PRINT screen to appear. When i execute the report, the form must get printed, skipping the PRINT screen.

Is there a way to do that?

Thanks

Krishna Kishor Kammaje

2 REPLIES 2

jayanthi_jayaraman
Active Contributor
0 Kudos
75

Hi,

See the blocked code.

DATA: w_ctrlop TYPE ssfctrlop,

w_compop TYPE ssfcompop,

w_return TYPE ssfcrescl,

  • Variables declarations

v_form_name TYPE rs38l_fnam.

call function 'SSF_FUNCTION_MODULE_NAME'

exporting

formname = 'ZZZ_TEST2'

importing

fm_name = v_form_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.

<b>w_ctrlop-getotf = 'X'.

w_ctrlop-no_dialog = 'X'.

w_compop-tdnoprev = 'X'.</b>

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.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF.

If your problem is solved,kindly reward points and close the thread.Otherwise,get back.

Former Member
0 Kudos
75

Hi~

You need to set parameters for it.

DATA: gs_control_parameters   TYPE ssfctrlop,
      gs_output_options       TYPE ssfcompop.
DATA : g_user.                   "User setting 

  g_user = 'X'.
  <b>gs_control_parameters-no_dialog = 'X'</b>.
  gs_control_parameters-preview = ' '.

I wish I could help you

Regards

Kyung Woo