on 03-03-2015 7:04 PM
Dear All,
I'm getting a "SYSTEM ERROR" when I'm calling the below function module in a Workflow BO Method.
CALL FUNCTION wa_funcnm
EXPORTING
/1bcdwb/docparams = fp_docparams
invoice = invoice
IMPORTING
/1bcdwb/formoutput = fp_formoutput
EXCEPTIONS
usage_error = 1
system_error = 2
internal_error = 3
OTHERS = 4.
The aim is to generate the PDF and store it in DMS. Please let me know, if I'm going wrong somewhere. Any kind of inputs would be sincerely appreciated.
Regards,
Tushar.
Hi Tushar
You need to the following parameters when calling FM. Background WF process cannot handle dailog.
fp_outputparams-nodialog = 'X'.
fp_outputparams-getpdf = 'X'.
Refer to Thread below
CALL FUNCTION 'FP_FUNCTION_MODULE_NAME'
EXPORTING
i_name = l_formname
IMPORTING
e_funcname = l_fm_name.
* E_INTERFACE_TYPE =
fp_outputparams-nodialog = 'X'.
fp_outputparams-getpdf = 'X'.
CALL FUNCTION 'FP_JOB_OPEN'
CHANGING
ie_outputparams = fp_outputparams
EXCEPTIONS
cancel = 1
usage_error = 2
system_error = 3
internal_error = 4
OTHERS = 5.
IF sy-subrc <> 0.
CASE sy-subrc.
WHEN OTHERS.
ENDCASE. " CASE sy-subrc
ENDIF.
fp_docparams-langu = 'X'.
fp_docparams-country = 'US'.
fp_docparams-fillable = 'X'.
CALL FUNCTION l_fm_name
EXPORTING
/1bcdwb/docparams = fp_docparams
emp_info = fs_per_info
IMPORTING
/1BCDWB/FORMOUTPUT = FP_FORMOUTPUT
EXCEPTIONS
usage_error = 1
system_error = 2
internal_error = 3
OTHERS = 4.
IF sy-subrc <> 0.
CASE sy-subrc.
WHEN OTHERS.
ENDCASE. " CASE sy-subrc
ENDIF. " IF sy-subrc <> 0
CALL FUNCTION 'FP_JOB_CLOSE'
* IMPORTING
* E_RESULT = result
EXCEPTIONS
usage_error = 1
system_error = 2
internal_error = 3
OTHERS = 4
.
IF sy-subrc <> 0.
CASE sy-subrc.
WHEN OTHERS.
ENDCASE. " CASE sy-subrc
ENDIF. " IF sy-subrc <> 0.
- ENDFORM. " GET_FUNCTION_MODULE
*&---------------------------------------------------------------------*
*& Form CONVERT_PDF_BINARY
*&---------------------------------------------------------------------
FORM CONVERT_PDF_BINARY .
CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
EXPORTING
BUFFER = FP_FORMOUTPUT-pdf
* APPEND_TO_TABLE = ' '
* IMPORTING
* OUTPUT_LENGTH =
TABLES
BINARY_TAB = t_att_content_hex .
- ENDFORM. " CONVERT_PDF_BINARY
Regards
Sandy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Does it work outside of Workflow?
If so, be absolutely sure that you are passing the same parameters. If you are, then check that WF-BATCH has SAP_ALL and SAP_NEW.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
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.