Application Development 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: 

Calling a remote enabled function module which does not exist in caller sys

Former Member
0 Kudos

Hi,

I have a a system ABC from which I am trying call a rfc enabled fm(Test) present in system XYZ.

The fm(Test) does not exist in the system ABC so I am getting generation errors and dumps.

Is there a way for me to call these remote enabled function modules which does not exist in the caller system without the obvious errors etc.

Is there any special way.

Thanks

1 ACCEPTED SOLUTION

nirajgadre
Active Contributor
0 Kudos

Hi,

It is not required the RFC function module you are trying to call is present in the system from where you are calling this.

There are variours resaons for which you will get gereration error and dumps.

1. you need to call the RFC function module with paramater Destination. this DESTINATION is RFC destnation name which you will required to define in the SM59 transaction. if this is not correct whle calling the RFC , it might cause the dump.

2. Check the RFC function module in the Target system is remlote enabaled and in active state.

3. CHeck all the parameters you are passing to the RFC functrionmodules are of same data type .

8 REPLIES 8

nirajgadre
Active Contributor
0 Kudos

Hi,

It is not required the RFC function module you are trying to call is present in the system from where you are calling this.

There are variours resaons for which you will get gereration error and dumps.

1. you need to call the RFC function module with paramater Destination. this DESTINATION is RFC destnation name which you will required to define in the SM59 transaction. if this is not correct whle calling the RFC , it might cause the dump.

2. Check the RFC function module in the Target system is remlote enabaled and in active state.

3. CHeck all the parameters you are passing to the RFC functrionmodules are of same data type .

0 Kudos

Hi Niraj,

Is there a way to prevent the generation error that occurs when I do a syntax check.It always throws the syntax error fm doesnt exist. Due to my activation of code with syntax error I am unable to to set breakpoint in the code and debug. The system doesnt allow you to set breakpoint with code that was activated with syntax errors.

Thanks

0 Kudos

Hi,

How you are calling the Function module ?

What systax you are using for calling the function module ?

CALL FUNCTION 'NAme of function module' DESTINATION 'NAME OF RFC CONNECTION' .

0 Kudos

Hi,

please check this sample:

REPORT  zcallfm                                 .
                                                                        
DATA: xv_return TYPE sysubrc.
                                                                        
CALL FUNCTION 'DOESNOTEXIST'
DESTINATION   'NOWHERE'
EXPORTING     caller                = sy-sysid
IMPORTING     return                = xv_return
EXCEPTIONS    system_failure        = 1
              communication_failure = 2
              OTHERS                = 4.

It shouldn't throw any generation errors in your system!

Regards,

Klaus

former_member182485
Active Contributor
0 Kudos

Hi,

For RFC FM it is not required to be present in the calling system (ABC).

And it will not give any systex error if called properly.

If you are still facing the problem please provide the pice of code from where you are calling the RFC FM.

Regards

Bikas

Former Member
0 Kudos

If you are called in the correct syntax with CALL FUNCTION xxx WITH DESTINATION xyz, keep external break-point and check what is the issue while calling the remote function module.

Former Member
0 Kudos

Alternatively we can go for exception handling returned by RFC interface.

There are instances when exceptions are raised by RFC interface which are returned as messages like 'A' 'X' 'E'.

If we handle exception like we do in case of normal FM, dump error is avoided.

Exceptions like COMMUNICATION_FAILURE - > raised when RFC destination does not exists.

Exceptions like SYSTEM_FAILURE -> raised when RFC FM does not exists in the target system.

If any class based exceptions are raised by the RFC in the target system, that will translated and returned as SYSTEM_FAILURE.

BR

Ansumesh

Former Member
0 Kudos

This message was moderated.