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 do not return any value

Former Member
0 Likes
3,679

Hi All,

I have an RFC written in one R/3 system(call center R/3) and i am calling this RFC in the ERP system.

If i try to run the RFC locally in the call center system ,it runs correctly and returns me proper values.

But when i try to call it from other R/3 system(ERP) the RFC does not return value.(both cases i am passing same parameters).

Also , RFC parameters are defined with pass by value option.

I am not able to trace why this behaviour,can anyone pin point what could be the possible cause of error.

Thanks in advance,

Swati

Hi All,

I have an RFC written in one R/3 system(call center R/3) and i am calling this RFC in the ERP system.

If i try to run the RFC locally in the call center system ,it runs correctly and returns me proper values.

But when i try to call it from other R/3 system(ERP) the RFC does not return value.(both cases i am passing same parameters).

Also , RFC parameters are defined with pass by value option.

I am not able to trace why this behaviour,can anyone pin point what could be the possible cause of error.

Thanks in advance,

Swati

14 REPLIES 14
Read only

Former Member
0 Likes
2,077

From SAP Help:

There are two restrictions on writing remote functions that are to be called transactionally:

Transactional calls cannot return parameter values. As a result, the interface for these functions should not specify any EXPORT parameters.

Functions that run transactionally may not perform call-backs: the caller's context does not necessarily still exist when the call-back is relayed back to the original system.

To read & understand more :

http://help.sap.com/saphelp_46c/helpdata/en/22/042518488911d189490000e829fbbd/frameset.htm

Mathews

Read only

former_member156446
Active Contributor
0 Likes
2,077

Hi make sure you are using the correct destination.. when you are calling the RFC...

call function RFC_%^(*&( 
  destination lv_des..."make sure lv_des is having the correct value

Read only

Former Member
0 Likes
2,077

Hi,

Are you sure that RFC destination setup is correct. You can test the RFC destination too.

Read only

Former Member
0 Likes
2,077

Hi Swati,

From ERP system try to ping the system where RFC is written.

1) Go to SM59

2) Select the RFC which connects to particular system

3) Do Test Connection (Success verifies System can be reached successfully)

4) Auth Test (Sucess verifies the User name and password is correct)

Please check if this is the Issue.

Regards

Shital

Read only

Former Member
0 Likes
2,077

Take a look in transaction ST22 on the ERP side. The user under who's authority the connection is running might not have authority for your function group yet, in which case a dump will be written for RFC_NO_AUTHORITY which will tell you what it needs (to be added to the role of the RFC user in the ERP system).

If your FM makes additional application checks, the user will need that authority as well (or the correct authority to use it correctly).

Take a look at how a BAPI RETURNS messages back to the calling program to tell it what was successfull and what was not + the reason, for the calling program to react to or raise the messages.

Cheers,

Julius

Read only

Former Member
0 Likes
2,077

hi,

It does not return any value means u din assign the logical system i think...assign the logical system and pass the system id to tat.....actually wat kind of error u r getting...could u elaborate..

Read only

0 Likes
2,077

No ,there i snot RFC connection problem ,i have checked it from SM59.

Neither do i get any dump or error of no authorization.In fact the sy-subrc after the RFC call is 0.

St22 do not have any trace for the same.

my RCC call is something like this,

IF dest <> ' '.

CALL FUNCTION 'Z_GET_CIC061' DESTINATION dest

EXPORTING

p_comp = itab_cic-company

p_asc_code = itab_cic-customer

p_wbill_no = itab_cic-bill_no

IMPORTING

e_tr_no = tr_no

e_model_code = model_code

e_data_origin = data_origin

EXCEPTIONS

communication_failure = 1

system_failure = 2.

ELSE.

MESSAGE i000 WITH 'RFC Destination is empty!'.

EXIT.

ENDIF.

Can anyone please suggest whats wrong in the above code.

Also what is transaction RFC call?is it related to what i am using in the above code of mine.

Thanks in advance,

Swati

Read only

0 Likes
2,077

Hi,

Call the FM in background task and check if it works

CALL FUNCTION 'Z_GET_CIC061' 
     IN BACKGROUND TASK 
     DESTINATION DEST

Read only

0 Likes
2,077

The point is the system do not navigate to the RFC in the other system in debug mode if i press F5.

I have the break point at both the systems.

I cannot use IN BACKGROUND TASK as i have importing parameters in my RFC call.

Read only

0 Likes
2,077

Hi,

Check your FM in SM58, it lists the failed RFCs, also the error messages.

Read only

0 Likes
2,077

My RFC is not lsited in SM58 ,does it means it was not executed?

How should i solve this matter ?

Read only

Former Member
0 Likes
2,077

go to SM59 and under logon&security tab., check if the user and pwd or correct.

also, when u press F5 after coming to the statement:

CALL FUNCTION 'Z_GET_CIC061' DESTINATION dest

is it going to the system where the FM is actually present. Or jus keep a breakpoint in the system where the FM is actually there and debug if its going to tat point.

Read only

Former Member
0 Likes
2,077

if its not going to that point on F5, then u need to check if the user in logon&security tab is correct.

or u jus create a test RFC in SM59 and call this at the Destination.

Read only

0 Likes
2,077

Thanks a lot everyone for the valuable inputs .The problem is solved.

It was due to wrong logon user.