Hi All
I tried executing one rfc with remote destination 'sapcms' in a few ways but all of them failed.
First I tried :
CALL FUNCTION 'SCMS_CLTFC_FILE_GET'
EXPORTING
USAGE = 'AL'
KEY = lv_key
FILENAME = lv_filename
EXCEPTIONS
FAILED = 1
OTHERS = 2
This function calls a function inside with destination, but it failed on pinging the destination.
Second I tried Service Call:
wd_this->execute_scms_cltfc_file_get(
filename = lv_filename
key = lv_key
usage = 'AL'
).
The method looks like:
DATA CMS_DESTINATION TYPE RFCDES-RFCDEST
VALUE 'SAPCMS'.
the invocation - errors are always fatal !!!
CALL FUNCTION 'SCMS_CLTFC_FILE_GET'
DESTINATION CMS_DESTINATION
EXPORTING
usage = usage
key = key
filename = filename
EXCEPTIONS
failed = 1.
error handling
CASE sy-subrc.
WHEN 1.
RAISE EXCEPTION TYPE cx_wd_no_handler
EXPORTING
textid = cx_wd_no_handler=>kind_old
old_exception = `FAILED`.
ENDCASE.
But I get the exception.
Third I tried writing a program and submit it with parameters:
SUBMIT zcms_copy AND RETURN WITH p_key = lv_key WITH p_file = lv_filename.
But then I get an error : The RFC destination SAPCMS can no longer be contacted:
If I run this program from se80 it works fine.
Any Idea ???
Thanks
Nitsan
.