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 use parameters in smartform genrated function module

Former Member
0 Kudos

i executed smartform one functional module is genrated '/1BCDWB/SF00000002'

now the problem is that i want to send output of this smartform through email

now how to use ' MAIL_RECIPIENT ' and ' MAIL_SENDER ' to send smartform output through email .

please check following module which generated by smartform.

plz suggest me .

CALL FUNCTION '/1BCDWB/SF00000002'

  • 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

ITAB_PA0001 = ITAB_PA0001

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

3 REPLIES 3

Former Member
0 Kudos

Former Member
0 Kudos

Hi

You can do it while passing these parameters in the CONTROL_PARAMETERS.

data: ls_CONTROL_PARAMETERS type SSFCTRLOP.

ls_CONTROL_PARAMETERS-DEVICE = 'LOCL'.

ls_CONTROL_PARAMETERS-NO_DIALOG = 'X'.

ls_CONTROL_PARAMETERS-PREVIEW = ' '.

Pass this ls_CONTROL_PARAMETERS to the importing parameter of the FM .

CALL FUNCTION LF_FM_NAME

EXPORTING

CONTROL_PARAMETERS = LS_CONTROL_PARAM

.................

In addition to this, you might also want to set the print immediately field on the same structure to 'X'.

Generally you leave the device field empty, the user master record default printer will be used

Former Member
0 Kudos

thankx