Application Development and Automation 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: 
Read only

problem when emailing smart forms

Former Member
0 Likes
387

Hi,

I am emailing smartform from report program. But I dont want print preview while executing it.I have done -


W_CTRLOP-NO_DIALOG = 'X'.

W_COMPOP-TDNOPREV = 'X'.

where W_CTRLOP is control parameters & W_COMPOP is output options.

How can I avoid that preview screen?

Thanks.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
370

hi

good

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

EXPORTING

formname = '<form name>'

IMPORTING

fm_name = fm_name

EXCEPTIONS

no_form = 1

no_function_module = 2

OTHERS = 3.

IF sy-subrc <> 0.

  • <error handling>

ENDIF.

CALL FUNCTION fm_name

EXPORTING

  • ARCHIVE_INDEX =

  • ARCHIVE_PARAMETERS =

  • CONTROL_PARAMETERS =

  • MAIL_APPL_OBJ =

  • MAIL_RECIPIENT =

  • MAIL_SENDER =

  • OUTPUT_OPTIONS =

  • USER_SETTINGS = 'X'

g_carrid = <variable>

g_connid = <variable>

g_fldate = <variable>

  • IMPORTING

  • DOCUMENT_OUTPUT_INFO =

  • JOB_OUTPUT_INFO =

  • JOB_OUTPUT_OPTIONS =

TABLES

gt_sbook = <internal table>

EXCEPTIONS

formatting_error = 1

internal_error = 2

send_error = 3

user_canceled = 4

OTHERS = 5.

IF sy-subrc <> 0.

  • <error handling>

ENDIF.

Look at SAP Smart Forms (BC-SRV-SCR)

thanks

mrutyun^

3 REPLIES 3
Read only

Former Member
0 Likes
370

Why have you set that? W_CTRLOP-preview = 'X'.

Have you tried to set this field to space?

Arne

Read only

0 Likes
370

Yes, I have also tried for it , but problem is still there.

Read only

Former Member
0 Likes
371

hi

good

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

EXPORTING

formname = '<form name>'

IMPORTING

fm_name = fm_name

EXCEPTIONS

no_form = 1

no_function_module = 2

OTHERS = 3.

IF sy-subrc <> 0.

  • <error handling>

ENDIF.

CALL FUNCTION fm_name

EXPORTING

  • ARCHIVE_INDEX =

  • ARCHIVE_PARAMETERS =

  • CONTROL_PARAMETERS =

  • MAIL_APPL_OBJ =

  • MAIL_RECIPIENT =

  • MAIL_SENDER =

  • OUTPUT_OPTIONS =

  • USER_SETTINGS = 'X'

g_carrid = <variable>

g_connid = <variable>

g_fldate = <variable>

  • IMPORTING

  • DOCUMENT_OUTPUT_INFO =

  • JOB_OUTPUT_INFO =

  • JOB_OUTPUT_OPTIONS =

TABLES

gt_sbook = <internal table>

EXCEPTIONS

formatting_error = 1

internal_error = 2

send_error = 3

user_canceled = 4

OTHERS = 5.

IF sy-subrc <> 0.

  • <error handling>

ENDIF.

Look at SAP Smart Forms (BC-SRV-SCR)

thanks

mrutyun^