
"fill ls_general_data for adobe import str
TRY.
CALL FUNCTION 'FP_FUNCTION_MODULE_NAME'
EXPORTING
i_name = 'zadobe'
IMPORTING
e_funcname = lv_formname.
CATCH cx_fp_api_repository.
CATCH cx_fp_api_usage.
CATCH cx_fp_api_internal.
ENDTRY.
"it is important to give the getpdf variable abap_true
"to get rawstring inside the pdf
ls_output_param-getpdf = abap_true.
ls_output_param-dest = COND #(
WHEN ls_defaults-spld IS NOT INITIAL
THEN ls_defaults-spld
ELSE 'LP01' ).
CALL FUNCTION 'FP_JOB_OPEN'
CHANGING
ie_outputparams = ls_output_param
EXCEPTIONS
cancel = 1
usage_error = 2
system_error = 3
internal_error = 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.
CALL FUNCTION lv_formname
EXPORTING
/1bcdwb/docparams = ls_doc_param
is_general = ls_general_data
IMPORTING
/1bcdwb/formoutput = ls_formoutput
EXCEPTIONS
usage_error = 1
system_error = 2
internal_error = 3
OTHERS = 4.
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 'FP_JOB_CLOSE'
IMPORTING
e_result = ls_result
EXCEPTIONS
usage_error = 1
system_error = 2
internal_error = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
"to change er_stream varriable.
ls_stream-value = ls_formoutput-pdf.
ls_stream-mime_type = 'application/pdf'.
copy_data_to_ref(
EXPORTING
is_data = ls_stream
CHANGING
cr_data = er_stream ).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
9 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 | |
4 | |
3 |