
CALL FUNCTION 'FP_JOB_OPEN'
CHANGING
ie_outputparams = lv_fp_outputparams
EXCEPTIONS
cancel = 1
usage_error = 2
system_error = 3
internal_error = 4
OTHERS = 5.
IF sy-subrc <> 0.
ENDIF.
CALL FUNCTION 'FP_FUNCTION_MODULE_NAME' "& Form Processing Generation
EXPORTING
i_name = ' ' "&Adobe form name
IMPORTING
e_funcname = lv_fm_name.
IF sy-subrc <> 0.
ENDIF.
ELSE.
CALL FUNCTION lv_fm_name
EXPORTING
/1bcdwb/docparams = lv_fp_docparams
gw_ers = gw_ers
IMPORTING
/1bcdwb/formoutput = lv_fp_formoutput
EXCEPTIONS
usage_error = 1
system_error = 2
internal_error = 3.
IF sy-subrc <> 0.
ENDIF.
CALL FUNCTION 'FP_JOB_CLOSE'
* IMPORTING
* e_result =
EXCEPTIONS
usage_error = 1
system_error = 2
internal_error = 3
OTHERS = 4.
IF sy-subrc <> 0.
ENDIF.
CALL FUNCTION 'POPUP_TO_CONFIRM'
EXPORTING
text_question = text_question
display_cancel_button = ' '
IMPORTING
answer = answer
EXCEPTIONS
text_not_found = 1
OTHERS = 2.
CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
EXPORTING
buffer = lv_fp_formoutput-pdf
TABLES
binary_tab = data_tab.
CALL METHOD cl_gui_frontend_services=>gui_download
EXPORTING
filename = filename1
filetype = 'BIN'
CHANGING
data_tab = data_tab
EXCEPTIONS
file_write_error = 1
no_batch = 2
gui_refuse_filetransfer = 3
invalid_type = 4
no_authority = 5
unknown_error = 6
header_not_allowed = 7
separator_not_allowed = 8
filesize_not_allowed = 9
header_too_long = 10
dp_error_create = 11
dp_error_send = 12
dp_error_write = 13
unknown_dp_error = 14
access_denied = 15
dp_out_of_memory = 16
disk_full = 17
dp_timeout = 18
file_not_found = 19
dataprovider_exception = 20
control_flush_error = 21
not_supported_by_gui = 22
error_no_gui = 23
OTHERS = 24.
IF sy-subrc <> 0.
ENDIF.
CALL METHOD cl_gui_frontend_services=>execute
EXPORTING
document = filename
EXCEPTIONS
cntl_error = 1
error_no_gui = 2
bad_parameter = 3
file_not_found = 4
path_not_found = 5
file_extension_unknown = 6
error_execute_failed = 7
synchronous_failed = 8
not_supported_by_gui = 9
others = 10
.
IF sy-subrc <> 0.
* Implement suitable error handling here
ENDIF.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
3 | |
2 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |