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

OOABAP RFC

Former Member
0 Likes
598

Hello,

How do i call a Class Instance of another SAP system.

I use to do with RFC enabled FM giving a the System destination name.

How can achive this with OOABAP, I am created a CLass with various methods taht would fecth data.

Now i want to call teh Methods in o5ther sap system from my native system, due our landscape design.

Regds,

Ö

1 ACCEPTED SOLUTION
Read only

athavanraja
Active Contributor
0 Likes
544

you cannot direcly call a method of a class from other system (like RFC)

the only way to achieve is to write a RFC function module in the target system to call calss method in that system and call this RFC from source system.

Regards

Raja

Hello,

How do i call a Class Instance of another SAP system.

I use to do with RFC enabled FM giving a the System destination name.

How can achive this with OOABAP, I am created a CLass with various methods taht would fecth data.

Now i want to call teh Methods in o5ther sap system from my native system, due our landscape design.

Regds,

Ö

3 REPLIES 3
Read only

athavanraja
Active Contributor
0 Likes
545

you cannot direcly call a method of a class from other system (like RFC)

the only way to achieve is to write a RFC function module in the target system to call calss method in that system and call this RFC from source system.

Regards

Raja

Read only

Former Member
0 Likes
544

Hi,

You unfortunately dont have option of RFC enabling in class methods.

U can however use a function module in remote system as a wrapper to call the method of the class and then call the function module.

I guess the reason for this is that the system doesnt know the class structure and its methods at compile time.

u would have to give remote destination when instantiating.

Something like

Data object type ref to zcl_tans destination <remote_system>.

This aint possible in OO ABAP.

Regards,

Tanveer.

<b>Please mark helpful answers.</b>

Read only

0 Likes
544

Sad , I dint want to wrap in FM , whole idea was to do away with FM.

Thank you.

Ö