cancel
Showing results for 
Search instead for 
Did you mean: 

Call from JCO fails for "SDOK_PHIO_GET_URL_FOR_GET" Function Module

Former Member
0 Kudos

Hello,

I have a java program that call some BAPIs using JCO package.

I create JCO.function, pass the input parameters and call the excute method on function and use the output. it works properly for many BAPIs such as BAPI_DOCUMENT_GETDETAIL2 , SDOK_PHIOS_FILE_PROPERTIES_GET and so on.

But for the module "SDOK_PHIO_GET_URL_FOR_GET" I get the following JCO exception:

com.sap.mw.jco.JCO$Exception: (104) RFC_ERROR_SYSTEM_FAILURE: The function module "SDOK_PHIO_GET_URL_FOR_GET" cannot be used for 'remote' calls.

Is there any restriction on certain BAPIs to be called from JCO?

How can I know in advance that it is not accessible from JCO (e.g. certain Function Groups)?

is there any way to make it accessible to JCO?

Thnaks a lot

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hi.

"SDOK_PHIO_GET_URL_FOR_GET" is not and RFC (Is not a BAPI).

Goto SE37 and display attributes of "SDOK_PHIO_GET_URL_FOR_GET". In Processing Type is Normal Funtion Module.

Only the processing type <b>Remote-Enabled Module</b> can be call from JAVA

Use "<b>SDOK_PHIO_GET_URL_FOR_GET_RFC</b>".

Answers (2)

Answers (2)

Former Member
0 Kudos

Thanks for the replies,

the alternative RFC that Juda mentioned, did the trick.

Former Member
0 Kudos

Hi,

As has already been said, to be able to call a function module from an external system it needs to have the parameter RFC enabled set.

It looks like Juda has identified a different function module yuo can use instead but often this isn't the case. The best thing to do if you have to call a module that isn't RFC enabled is to get an ABAP developer to create a custom function module that is RFC enabled and just acts as a wrapper around the actual module you wish to call. So the custom version has the same interface as the standard one and all it does is accept the parameters from the calling system and passes them straight to the standard module yuo wish to call.

Hope this helps,

Gareth.