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

RFC : CALL_FUNCTION_SYNTAX_ERROR

former_member185511
Active Participant
0 Likes
685

Hi everyone,

I am having a problem during receiving the results related to a RFC call from one system(X10) to other system(Y10).

When i just run RFC with ;

CALL FUNCTION 'RFC_FUNC1' DESTINATION 'Y10'.


Everything works fine, however when i try to run this one in parallel mode and trigger, i can see calculations are correct but system gives error on that line


RECEIVE RESULTS FROM FUNCTION 'RFC_FUNC1'

This line raises an error with the following detail;

    Function module "RFC_FUNC1'" has been called as an asynchronous RFC with

     reply.

    The reply was programmed inconsistently to the call however, meaning

    that class-based exceptions were to be used in position one but not in

    the other.

    Error in the ABAP application program.

    The current ABAP program "RFC_FUNC1'" had to be interrupted because

     it contains

    a statement that cannot be executed.

Later i created an another function module in my system X10 just to trigger RFC_FUNC1 in system Y10. Now i changed my logic just to trigger RFC_FUNC2 in my system X10. (RFC_FUNC1 is triggered inside the FUNC2 ) I can see results are received from the RFC_FUNC1 but still i get same error when i run


RECEIVE RESULTS FROM FUNCTION 'RFC_FUNC2'.

What can be the problem ? First time i got error like this.

1 ACCEPTED SOLUTION
Read only

former_member185511
Active Participant
0 Likes
635

Ok i fixed like this;  (just to remind, my program is running on system X10 with a parallel logic)

1) Creata a RFC_FUNC2 in X10

2) Call RFC_FUNC1 which exists in Y10 from X10 by using RFC_FUNC2

3)Catch system failure exceptions in RFC_FUNC2 by using EXCEPTIONS parameters (result of FUNC1  in Y10 )

4)Return exceptions coming from FUNC1 by EXPORTING parameter from X10.

3 REPLIES 3
Read only

former_member192467
Active Participant
0 Likes
635

Hi,

If exceptions are present in the FM, try adding the "EXCEPTIONS except1 = rc1 ... exceptn = rcn" addition also.

Regards,

Renjith Michael

Read only

0 Likes
635

I am just using standard exceptions like system failure and comm failure. I also tried removing exceptions same problem. i tried try-catch also same problem. alternate is i will control the flow by using some customization tables but i want to do in proper way.

Below function is working if i don't use parallel logic with just CALL Function statement.

RECEIVE RESULTS FROM FUNCTION 'RFC_FUNC1'
     IMPORTING
       et_log                = lt_log
     EXCEPTIONS
       system_failure        = 1
       communication_failure = 2.

Read only

former_member185511
Active Participant
0 Likes
636

Ok i fixed like this;  (just to remind, my program is running on system X10 with a parallel logic)

1) Creata a RFC_FUNC2 in X10

2) Call RFC_FUNC1 which exists in Y10 from X10 by using RFC_FUNC2

3)Catch system failure exceptions in RFC_FUNC2 by using EXCEPTIONS parameters (result of FUNC1  in Y10 )

4)Return exceptions coming from FUNC1 by EXPORTING parameter from X10.