cancel
Showing results for 
Search instead for 
Did you mean: 

Debugging RFC Calls

Former Member
0 Kudos

I was going thru the Blog

/people/michal.krawczyk2/blog/2006/01/17/xi-debugging-rfc-calls-from-the-xi-not-possible-who-said-that-

I am not understanding what Michal is trying to say? Would some one explain me please.

I understand that when we are talking to an RFC and error occurs how XI is going to handle.

Thanks

Accepted Solutions (0)

Answers (1)

Answers (1)

MichalKrawczyk
Active Contributor
0 Kudos

hi,

it shows a way on how to debug a RFC

(during development tests)

this way you can see the actual call from the XI

that the XI makes to the R3

and you see the real values

there's no other way to debug it

scenario

you send to the R3 (with RFc adapter) an RFC call

the RFC call gets executed but it does not

do you you need (but you believe that the fields

are correctly fielled) so what you you do then?

you need to stop the RFC call (from the XI)

but on the r3... and that the way:)

once you stop the call you can restart it

and start the debugging - this is standard ABAP

from now on

Regards,

michal

-


<a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

MichalKrawczyk
Active Contributor
0 Kudos

hi,

other approaches:

you can make an endless loop in the rfc and

then go into this loop

(have a look at comments in my weblog about debugging)

or you can invoke a message:

but my approach seems to be very easy and

you can all fields in your rfc call (in the debugging)

Regards,

michal

-


<a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

Former Member
0 Kudos

Thanks Michal.

Just I have listed what I have understood, please correct me. (I got confused with your naming conventions)

1) Existing RFC : RFC-OLD (XI calls RFC_OLD)

2) Copy : RFC-OLD_Copy

3) : Delete the function code in RFC-OLD

4) : RFC-OLD Calls RFC-OLD_Copy

DATA: queue_name like TRFCQOUT-QNAME.

*****************************

*setting the queue name

*****************************

queue_name = 'DEBUG_QUEUE'.

call function 'TRFC_SET_QUEUE_NAME'

exporting

qname = queue_name

exceptions

invalid_queue_name = 1

others = 2.

if sy-subrc <> 0.

endif.

****************************************************

*call the new function in the background *and passing all the parameters from the old RFC! *so we'll be able to debug the RFC with correct *parameters

****************************************************

CALL FUNCTION 'RFC-OLD_Copy'

in background task

destination 'NONE'

as separate unit

TABLES

TABLESAMPLE = TABLESAMPLE.

***************************************

*remember about the commit work

***************************************

Commit Work.

Endfunction.

Former Member
0 Kudos

Michal, could you please help me. Thanks

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

it looks ok

you can test

Regards,

michal

Former Member
0 Kudos

I appreciate your help Michal.

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

No problem hope it will work

Regards,

michal

Former Member
0 Kudos

Hello Michal,

I want to debug RFC function in ERP from XI and am planning to use your technique of copying the rfc function and stop the queue. But I am not clear where do I need to stop the queue in XI or ERP system ?

Could you please let me know so that I can debug RFC from XI.