on 05-02-2007 4:30 PM
Hi,
I have an RFC that calls an adobe form to display the pdf output back in a bsp page...the RFC fails at the call to the adobe form (next call after after getting the form name) ...while debugging it looks like within this call it is trying to call fpcomp_job_open and failing on the call check_job_open ...
The code in my RFC looks like this....
DATA:
gs_outputparams TYPE sfpoutputparams,
fn_name TYPE rs38l_fnam,
fp_docparams TYPE sfpdocparams,
fp_formoutput TYPE fpformoutput,
frm_result TYPE sfpjoboutput,
lv_form TYPE fpname.
DATA: l_pdf_xstring TYPE xstring,
l_pdf_len TYPE i.
lv_form = 'ZHR_ASSESSMENT_FORM'.
Start formrocessing - OPEN spool job to send to printer
gs_outputparams-getpdf = 'X'.
call function 'FP_JOB_OPEN'
changing
ie_outputparams = gs_outputparams
exceptions
others = 1.
IF sy-subrc <> 0.
*// RAISE FP Open Error.
exit.
ENDIF.
Get name of the generated function module for the form
CALL FUNCTION 'FP_FUNCTION_MODULE_NAME'
EXPORTING
i_name = lv_form
IMPORTING
e_funcname = fn_name.
IF sy-subrc <> 0.
*// RAISE FP Get Form Module Name Error.
exit.
ENDIF.
Call the Adobe Form
CALL FUNCTION fn_name
EXPORTING
/1bcdwb/docparams = fp_docparams
gv_appraisal_id = gv_appraisal_id
IMPORTING
/1bcdwb/formoutput = fp_formoutput
EXCEPTIONS
usage_error = 1
system_error = 2
internal_error = 3
others = 4.
IF sy-subrc <> 0.
*// RAISE Call Form Module Error.
perform f_build_message using 'E'
'ZEXT'
012
changing return.
exit.
ENDIF.
End from processing - Close spool job
CALL FUNCTION 'FP_JOB_CLOSE'
IMPORTING
e_result = frm_result
EXCEPTIONS
usage_error = 1
system_error = 2
internal_error = 3
OTHERS = 4.
IF sy-subrc <> 0.
*// RAISE FP Close Error.
exit.
ENDIF.
form = fp_formoutput-pdf.
Thanks,
Venkatesh
Please ignore this..I am posting a different question......
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
what is the solution for this problem? I have the same problem. I get sy-subrc = 1 after CALL FUNCTION 'FPCOMP_JOB_OPEN'.
If I look more in detail I see that "Perform check_job_open" is creating the problem:
FORM check_job_open.
IF fpstat-is_opened = c_true. (--> exactly here is the problem. This condition is true so the program is terminated.)
PERFORM reset_status.
MESSAGE ID 'FPRUNX' TYPE 'E' NUMBER '101' RAISING usage_error.
ENDIF.
fpstat-is_opened = c_true.
fpstat-is_started = c_false.
ENDFORM.
Does somebody know why my job is open and what is the solution to have the job closed at the beginning of my processing?
Thanks in advance.
I got the same problem (calling an RFC from old R/3 system to a new ABAP stack) just call an ABAP form with in the RFC
START FB
SUBMIT zzjc_uu_jopo_download WITH p_form = ic_fpname
WITH p_pdf_l = ic_directory_bestandsnaam
WITH p_pdf_s = ic_directory_bestandsnaam
WITH p_loc = 'X'.
and it did work
POINTS are wellcome
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.