Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Accessing a class remotely

Former Member
0 Likes
1,726

Hi,

I have created a class with 2 static methods and I want to access this class remotely.

In a function module, for example, when we choose "REMOTE-ENABLED MODULE" it is possible to access this function module remotely from another server.

I want to do the same but I need to use my class. I want to access that class from another server.

Is it possible?

Thanks a lot.

Edited by: Jorge Castro on Jun 17, 2009 3:26 PM

1 ACCEPTED SOLUTION
Read only

naimesh_patel
Active Contributor
0 Likes
1,254

I guess there is not a direct way to call the Static methods remotely.

You can wrap this methods into one Remote Enabled Function Module and call this RFC FM to access this static method of the class.

Like:

Create a ZRFC_FM as an RFC FM.


FUNCTION ZRFC_FM.

  CALL METHOD ZCL_TEST_CLASS=>STATIC_METHOD.

ENDFUNCTION.

5 REPLIES 5
Read only

Sm1tje
Active Contributor
0 Likes
1,254

No, not yet. But it should only be a matter of time (I guess) before this option is available.

Read only

naimesh_patel
Active Contributor
0 Likes
1,255

I guess there is not a direct way to call the Static methods remotely.

You can wrap this methods into one Remote Enabled Function Module and call this RFC FM to access this static method of the class.

Like:

Create a ZRFC_FM as an RFC FM.


FUNCTION ZRFC_FM.

  CALL METHOD ZCL_TEST_CLASS=>STATIC_METHOD.

ENDFUNCTION.

Read only

Former Member
0 Likes
1,254

With classes, it is possible only if you create a web service for it. Refer Building web services with ABAP section in [this|https://www.sdn.sap.com/irj/sdn/webservices?rid=/webcontent/uuid/83b7ec4d-0a01-0010-03a9-e5a3b42522b8] [original link is broken];web page.

Best regards,

Advait

Read only

0 Likes
1,254

Web Service for the Class?

I don't see the option when I try to create a Web Service using the Web Service Creation Wizard. I have only 4 options: FM, FG, BO, XI Message Interface. I am on ECC 5.0

Regards,

Naimesh Patel

Read only

Former Member
0 Likes
1,254

Thanks for helping.