on 03-23-2011 8:53 PM
Hey, Adobe form Gurus,
I created an Adobe form and I can printed it correctly from an ABAP program.
But when I copied the codes from ABAP program and made a remote function module, I got USAGE_ERROR after the CALL FUNCTION I_FUNCNAME.
Again, if I copied the codes from function module back to another ABAP program, it worked.
Is something I missed?
Thank s in advance!
Fisher Li
Ok. I found out that in the call
CALL FUNCTION XYZ
EXPORTING
/1BCDWB/DOCPARAMS = FP_DOCPARAMS
IM_START_DATE = I_BEGDA
IM_END_DATE = I_ENDDA
IMPORTING
/1BCDWB/FORMOUTPUT = LS_FORMOUTPUT
EXCEPTIONS
USAGE_ERROR = 1
SYSTEM_ERROR = 2
INTERNAL_ERROR = 3.
there is one check below and it caused the problem.
IF sy-cprog = 'RS_TESTFRAME_CALL'.
CALL FUNCTION 'FP_CREATE_COMPOSER_INPUT'
IMPORTING
outpar = %outpar.
CALL FUNCTION 'FPCOMP_JOB_OPEN'
CHANGING
ie_outpar = %outpar
EXCEPTIONS
usage_error = 1
system_error = 2
internal_error = 3
OTHERS = 4.
%fpcomp_error.
ENDIF
All I have to do is hardcode the sy-cprog to be my function module name before
the function call and the problem was resolved.
sy-cprog = Z_my_function_module_name.
CALL FUNCTION XYZ
EXPORTING
/1BCDWB/DOCPARAMS = FP_DOCPARAMS
IM_START_DATE = I_BEGDA
IM_END_DATE = I_ENDDA
IMPORTING
/1BCDWB/FORMOUTPUT = LS_FORMOUTPUT
EXCEPTIONS
USAGE_ERROR = 1
SYSTEM_ERROR = 2
INTERNAL_ERROR = 3.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.