导读:
DATA: ctrl_param TYPE ssfctrlop,
out_option TYPE ssfcompop,
fm_name TYPE rs38l_fnam.
ctrl_param-preview = 'X'.
out_option-tddest = 'LP01'. " in your case it is LOCL
ctrl_param-no_dialog = 'X'.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'Z_TESTJSW'
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
control_parameters = ctrl_param
output_options = out_option
user_settings = space
* TABLES
* itab = itab[]
EXCEPTIONS
OTHERS = 1.
DATA: ctrl_param TYPE ssfctrlop,
out_option TYPE ssfcompop,
fm_name TYPE rs38l_fnam.
ctrl_param-preview = 'X'.
out_option-tddest = 'LP01'. " in your case it is LOCL
ctrl_param-no_dialog = 'X'.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'Z_TESTJSW'
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
control_parameters = ctrl_param
output_options = out_option
user_settings = space
* TABLES
* itab = itab[]
EXCEPTIONS
OTHERS = 1.
本文介绍了一种在 ABAP 环境中调用 SAP Function Module 的方法,展示了如何设置控制参数、输出选项,并处理可能出现的异常情况。
2773

被折叠的 条评论
为什么被折叠?



