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: 

Cannot catch RFC exception

Former Member
0 Kudos

Hi all,

I am running a standard transaction between ECC and BW.

One standard function module doesn't return the expected results
and I can't change the coding to catch a SYSTEM_FAILURE or COMMUNICATION_FAILURE.

Here is what happens in details: the coding that causes issue is in

class CL_UA_FORMULA_PDCE, method GET_CO_AREA_CURRENCY, line 51.

CALL FUNCTION 'RSSEM_CHA_VALUES_GET'

DESTINATION ld_rfcdest

EXPORTING

i_chanm      = cd_iobj_co_area

i_read_attr  = abap_true

TABLES

ith_selopt   = lt_selopt

eth_chavl    = lt_chavl

EXCEPTIONS

unknown_iobj = 1

OTHERS       = 2.

With values:

  • ld_rfcdest = BICLNT100
  • cd_iobj_co_area = 0CO_AREA
  • lt_selopt = 1 line with 0CO_AREA I EQ 1000
  • lt_chavl is empty

When run the transaction in ECC, I receive exception 2 (others).

When I run the RFC call in SE37 in ECC, I receive the expected values, no exception.

When I run the function module in SE37 in BI and with the RFC user in the debugger, I receive the expected values, no exception.

I believe there is a communication or authorization issue, which could be caught with

EXCEPTIONS

SYSTEM_FAILURE        = 1  MESSAGE L_V_RFC_MESS

COMMUNICATION_FAILURE = 2  MESSAGE L_V_RFC_MESS

But since this is standard coding, I can’t change it.

I tried to run an RFC trace, but the content is useless.

I tried the System Debugging, but it won't jump into the BW system.

Is there a better basis transaction to see what happens between the 2 machines?

Any other idea?


Regards,


Julien

3 REPLIES 3

former_member191434
Participant
0 Kudos

Hi Julien,

I think there might be some Basis security issues due to which the system is not the way it supposed to be perform

Yes you can find that what happened between 2 system - Please go through the following link I think you will get your solution

Show RFC Workload Statistic to build authorizations for authorization object S_RFC - Code Gallery - ...

And another link

Best Practice - How to analyze and secure RFC connections - Security and Identity Management - SCN W...

Thanks & regards

Saifur Rahaman

Former Member
0 Kudos

Firstly, if the RFC is working fine in SE37 but not in transaction, it could be due to conversion exits not running on exported values.

Running RFC in SE37 does it automatically, so no issue there. But for e.g., to run it through a program u need to make sure the values being exported are in SAP internal format, which could be done using conv. exit.

Check if something is missed there, possibility is least as its standard SAP, but still check.

Secondly, you can debug the RFC using following 2 approaches.

Approach 1 -

  1. Make the RFC user a Dialog user for time being in BI. (Generally RFC users are system/service)
  2. Go to BI system, login with your User ID.
  3. Go to debugger settings from SE38 menus and put the RFC user id there.
  4. Put external break-point inside the RFC FM, where you want to debug from.
  5. Run the transaction in ECC. It would then stop at your break-point.

Approach 2 -

  1. Create a new RFC Destination, say BICLNT100X, in SM59 of ECC.
  2. Don't put a user name/password.
  3. Just click on Logon Screen checkbox. This will show up logon screen while running RFC, and you can enter your user name/password to debug the RFC in BI. But before that, perform the following steps.
  4. Change the user id in debugger settings in BI back to your user.
  5. Put external break-point inside the RFC FM, where you want to debug from.
  6. Also, put a session break-point in ECC at the CALL FUNCTION statement of RFC.
  7. Run the transaction. Once it stops at CALL FUNCTION statement, change the RFC Dest name to BICLNT100X in the destination name variable. Execute
  8. It will open BI Logon screen in a new session. Enter you user/pass and once you press enter, it will stop at the external break-point.

Hope it helps.

Cheers!

raymond_giuseppi
Active Contributor
0 Kudos

Lanch a system trace (ST01) in ECC (in the target system), check box "Authorization check", then call the FM via RFC from BW (from the source system) system, then back to ECC, stop trace and "Aanlysis" the trace to get any aithorization problem

Hint: If those are your first calls with this function , check authorization object S_RFC for allowed function groups (type FUGR)

Regards,
Raymond