09-09-2008 1:44 PM
Hi all,
when i call a function module using starting new task, it is failing with sy-subrc 3. can anyone guide me in this.
see the code :
DATA lv_taskname(7) TYPE c VALUE 'PEM_EXE'.
CALL FUNCTION 'PEM_SCHEDULE' STARTING NEW TASK lv_taskname
EXPORTING
iv_packid = gv_packid
iv_pebid = ls_alv_out-peb_id
EXCEPTIONS
invalid_state_request = 1
database_error = 2
OTHERS = 3.
Thanks in advance.
Best Regards,
Prashant
09-09-2008 1:59 PM
09-09-2008 2:00 PM
09-09-2008 2:03 PM
09-09-2008 2:04 PM
no, the function module is not remote enabled. it is executed locally
09-09-2008 2:41 PM
I think the function has to be remote enables. this is what the documentation says.
These additions are used to assign actual parameters to formal parameters of the function module and return values to exceptions that are not class-based. The additions have the same meaning as in the synchronous RFC with the exceptions that values with IMPORTING cannot be imported and that actual parameters specified by CHANGING can be transferred but cannot be imported.
Cheers
Amandeep
09-10-2008 7:20 AM
when i change the function module from normal to remote, it gives me a error that the "generic types are not allowed in RFC", but i have not given any generic type in the parameters.
see the signature of the function module.
*" IMPORTING
*" VALUE(IV_PACKID) TYPE CNVMBTPACK-PACKID
*" VALUE(IV_PEBID) TYPE CNVMBTPEB-PEB_ID
*" EXPORTING
*" VALUE(EV_ERROR_DETECTED) TYPE C
*" VALUE(EV_STOP) TYPE C
*" EXCEPTIONS
*" INVALID_STATE_REQUEST
*" DATABASE_ERROR
*" FORIEGN_LOCK
Can u please check it and find out the problem
Thanks,
Prasanth
09-10-2008 1:46 PM
Instead of Type C use Type CHAR1 etc. Give the variable a length.
Amandeep
09-10-2008 1:52 PM