TRY .
*If we have same name for Smartform and adobe form then we can assign importing parameter else it will have exact adobe form created in SFP t-code.
DATA(lv_adobe_form) = ip_smart_form.
CALL FUNCTION 'FP_FUNCTION_MODULE_NAME'
EXPORTING
i_name = lv_adobe_form
IMPORTING
e_funcname = lv_adobe_fm_name.
CATCH cx_fp_api_repository
cx_fp_api_usage
cx_fp_api_internal.
IF sy-subrc <> 0.
* add an error message to processing protocol
MESSAGE i015(sppf_media) WITH lv_adobe_form INTO lv_dummy.
CALL METHOD cl_log_ppf=>add_message
EXPORTING
ip_problemclass = '1'
ip_handle = ip_application_log.
RETURN.
ENDIF.
ENDTRY.
*-----------fill archive parameters for archive link -------------------
IF is_output_options-tdarmod = '2'
OR is_output_options-tdarmod = '3'.
* archive_index_tab
ASSIGN ct_archive_index_tab[ 1 ] TO FIELD-SYMBOL(<fs_archive_index>).
IF sy-subrc EQ 0 AND <fs_archive_index> IS ASSIGNED.
* just fill the id of actual BOR object
<fs_archive_index>-object_id = lv_bea_guid.
IF <fs_archive_index>-object_id IS INITIAL.
DELETE ct_archive_index_tab INDEX 1.
ENDIF.
ENDIF.
ENDIF.
*-----------language of smart form--------------------------------------
* determin here the language of the smart form
DATA(ls_control_parameters) = is_control_parameters.
ls_control_parameters-langu = lv_sf_langu.
DATA(ls_output_options) = is_output_options.
IF NOT ls_printer_profile_data IS INITIAL.
ls_output_options = CORRESPONDING #( ls_printer_profile_data ).
ENDIF.
* Logic for all the required exporting parameters (Here bdh, bdi, bdh_cond, bdi_cond : related to CRM billing) will be filled up as per business functionality.
CALL FUNCTION lv_adobe_fm_name
EXPORTING
archive_index = is_archive_index
archive_index_tab = ct_archive_index_tab
archive_parameters = is_archive_parameters
control_parameters = ls_control_parameters
mail_appl_obj = is_mail_appl_obj
mail_recipient = is_mail_recipient
mail_sender = is_mail_sender
output_options = ls_output_options
user_settings = ip_user_settings
bdh = <s_bdh>
bdi = <t_bdi>
bdh_cond = lt_bdh_cond
bdi_cond = lt_bdi_cond
IMPORTING
document_output_info = es_document_output_info
job_output_info = es_job_output_info
job_output_options = es_job_output_options
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
IF sy-subrc <> 0.
* add an error message to processing protocol
CASE sy-subrc.
WHEN 1.
MESSAGE e016(sppf_media) INTO lv_dummy.
WHEN 2.
MESSAGE e017(sppf_media) WITH lv_adobe_fm_name INTO lv_dummy.
WHEN 3.
MESSAGE e018(sppf_media) WITH lv_adobe_fm_name INTO lv_dummy.
ENDCASE.
CALL METHOD cl_log_ppf=>add_message
EXPORTING
ip_problemclass = '1'
ip_handle = ip_application_log.
ENDIF.
* get error table
CALL FUNCTION 'SSF_READ_ERRORS'
IMPORTING
errortab = et_error_tab.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
10 | |
7 | |
5 | |
5 | |
4 | |
4 | |
4 | |
4 | |
3 | |
3 |