on 09-26-2022 2:58 PM
DATA : LV_NAME TYPE RS38L_FNAM.
PARAMETERS: p_ebeln TYPE ekko-ebeln OBLIGATORY.
PARAMETERS: rd1 RADIOBUTTON GROUP r1 DEFAULT 'X',
rd2 RADIOBUTTON GROUP r1.
at SELECTION-SCREEN .
if rd1 = 'X'.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'Z_PUR_SF'
* VARIANT = ' '
* DIRECT_CALL = ' '
IMPORTING
FM_NAME = LV_NAME
* EXCEPTIONS
* NO_FORM = 1
* NO_FUNCTION_MODULE = 2
* OTHERS = 3
.
IF sy-subrc <> 0.
* Implement suitable error handling here
ENDIF.
IF LV_NAME IS NOT INITIAL.
CALL FUNCTION LV_NAME "'/1BCDWB/SF00000315'
EXPORTING
* ARCHIVE_INDEX =
* ARCHIVE_INDEX_TAB =
* ARCHIVE_PARAMETERS =
* CONTROL_PARAMETERS =
* MAIL_APPL_OBJ =
* MAIL_RECIPIENT =
* MAIL_SENDER =
* OUTPUT_OPTIONS =
* USER_SETTINGS = 'X'
in_ebeln = p_ebeln
* IMPORTING
* DOCUMENT_OUTPUT_INFO =
* JOB_OUTPUT_INFO =
* JOB_OUTPUT_OPTIONS =
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5
.
IF sy-subrc <> 0.
* Implement suitable error handling here
ENDIF.
ENDIF.
ELSEIF RD2 = 'X'.
ENDIF.
If you would like to print Smartforms in first radiobutton, and download in second button, you could check the blog : https://blogs.sap.com/2013/05/30/sending-mail-using-oo-2-smartforms/
look example : Send the Smartform in PDF attachment with a text message
* Set the parameters of the forms.
CLEAR : is_control_param, is_composer_param.
MOVE : ‘X’ TO is_control_param–no_dialog ,
‘ ‘ TO is_control_param–preview ,
‘X’ TO is_control_param–getotf ,
sy–langu TO is_control_param–langu ,
‘PRINTER’ TO is_control_param–device ,
‘X’ TO is_composer_param–tdnoprint ,
‘X’ TO is_composer_param–tdnoprev ,
‘X’ TO is_composer_param–tdfinal.
* Call the Smartforms
CALL FUNCTION w_funcname
EXPORTING
control_parameters = is_control_param
output_options = is_composer_param
user_settings = ‘ ‘
IMPORTING
job_output_info = is_job_info
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.