cancel
Showing results for 
Search instead for 
Did you mean: 

How to Catch Return Code(RFC) in XI

Former Member
0 Kudos

Hi

Can any help me out,

I have a scenario , which is posting the data into SAPR/3 through RFC and alternately I would like to catch the exceptions . I need to catch return code in my scenrio, which will be show successfully posted or not as E or U.

My RFC returning the error codes like E, S, and U..so these error codes i need to catch and update into my DATABASE.

This is scenrio , i need to do very urgent manner..please let me know, should i use schronous or fault message types?

please give me logical steps for how to do this?

If it sync messae type, please tell me what is the output message type and input message type..

thank you,

Regards..rambarki!

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

For posting the data into SAP R/3 you might have imported a Remote enabled Function Module into your Integration repository. So if you put the "return" parameter as the export value of your Function Module, then it will automatically send the reply to XI from there you can catch it.

You need to create a message mapping between the datatype that you want to create at response and the imported "RFC.Response".

Former Member
0 Kudos

Hi Raju

Thanks for reply..and should i take synchronous or fault message for holding RFC.Response message type?

Regards

Rambarki

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

>>>and should i take synchronous or fault message

it depends

if your RFC executes very quiclky you can use sync RFC

but it the RFC exectution takes more then 30 seconds

you should consider using async RFC with correlation

and BMP to get the RFC return code (so you'd call one rfc from XI that would call another RFC to send data to the XI at the end of it's execution)

so at first you need to check the longest execution time of your RFC and then decide

Regards,

michal

Former Member
0 Kudos

Hi Michal

Thank you verymuch, if you dont mind can you elaborate sync RFC with correlation?..then how can i call one RFC to another RFC, should i write code in RFC itself for calling RFC to RFC?

Small confusition..plese calrify me, any blogs or help for this, it would be more help for me.

Regards..Rambarki!

Former Member
0 Kudos

Hi Rambarki

I was trying for the same scenario. Where Iam sending a file to R/3 using RFC in which I have both import and export parameters.

So first I took the sender as synchronous . Then my RFC takes the data from the file gives it to R/3 and gets the return code to XI automatically becaiuse of the export parameters. Then Iam mapping this to the datatype I have created (whose messagetype is the input messagetype in synchronous interface).

The result of this is that the file is sent to R/3 through the import parameters and the return code comes back to R/3 with export parameters and this is mapped to the messagetype which creates a xml document with corresponding fields.

But now Iam stuck to create a file with that xml document. I can see the xml message in SXMB_MONI and message monitoring doesn't show any errors. Ihave created a communication channel for creating a new file with that xml message but it is not creating.

Hope this will help you to some extent and also if you solve my problem please let me know.

Former Member
0 Kudos

Thanks Raju,

Let me know one doubt.. r u created two datatypes for sending the request and receiving the response? or the same datatype using for both purposes?

because in my scenario...JDBC is the sender and RFC is the receiver..and again JDBC will receive RFC.Response ..so in this scenrio should i use two datatypes or one datatype?...one is selecing the data and other one is insert the RFC.Response code in table.

Note: here i'm using same table for sending and receiving the data to RFC, but both fields are only different.

and how many communication channels using for ur scenrio..probably i might use similar kind of measurements like u...

I'll let u know once my problem is solved..

Regards..Rambarki

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

1. you can use syn (if the RFC executes fast) without correlation

2. you should use asyn RFC with correlation

if your RFC executes very slowly

>>>should i write code in RFC itself for calling RFC to RFC?

yes that's how you do it

BTW

correlations:

/people/sravya.talanki2/blog/2005/08/24/do-you-like-to-understand-147correlation148-in-xi

Regards,

michal

Former Member
0 Kudos

Hi

I solved my problem using BPM. I got a blog which had the similar scenario. And I think it will be useful to you.

And in your scenario you have to create two different datatypes because the structure of sender and receiver datatypes will be different in JDBC. Create two message types and five message interfaces as mentioned in the Blog.

This blog will definitely solve your problem.

/people/arpit.seth/blog/2005/06/27/rfc-scenario-using-bpm--starter-kit

regards,

Raju

Former Member
0 Kudos

Hi

I'm struck with message not picking the RFC, response payload showing successfull and inbound message showing 'Recorded' and Receiver Grouping shows recroded for Processing'..it means about to process messages?

RFC working fine entered data through SAP gui, but through JDBC using XI .. getting problem.

please let me know any body have idea about/

Regards...Rambari

Former Member
0 Kudos

Hi,

could you elaborate ur problem.

i hope u r doing jdbc<-->RFC synch commn and u want to insert the return code from RFC to be inserted into table....

Are you able to see the return message(response) from RFC in MONI?

Regards,

Sudharshan.

Former Member
0 Kudos

Are you using BPM?

Also check whether your mapping is successful by copying the payload from SXMB_MONI and test it in IR.

Also ensure that you have imported the RFC correctly.

Please let us know whether you are using BPM.

regards,

Raju

Former Member
0 Kudos

Hi

yeah i'm using BPM and i have imported RFC successfully...the same xml pay load tested into IR..its working fine...and the same data i have posted in tables in R/3 successfully.. I didn't understand where i have done mistake?

now I'm trying to checking w'ther it is posting the data into RFC ,after that i can catch the response..

Auctully mu scenrio is ..From JDBC ...> RFC

(Response)RFC- JDBC

but it not posting the data..

let me know other arears to test this data?

and using adapter monitor only way to check adapter ?

But my RFC channel showing green..but its not showing any

processed data..!

Regards..Ramabrki

Former Member
0 Kudos

Hi ..

Can you let me know ...why my RFC adapter not processing the data? ..message is going upto message interface level..!

even the same data i test in enter RFCs..its working fine..and I try test this SXMB_MONI payload in testconfigurator in IB..but here i'm getting error in Interfacemapping:

Interface Mapping RFC working fine...!

Auctul my scenrio now is JDBC>RFC>JDBC

Still I need to catch return parameteres..

Regards..rambarki

Former Member
0 Kudos

Hi Ramabarki,

>>using adapter monitor only way to check adapter ?

You can monitor messages on the Adapter Engine in Runtime Workbench..

Go to RWB->Message Monitoring->Choose 'Adapter Engine'-> Display

>>Interface Mapping <Not found>

Activate your changelists and refresh cache..

Also check in your configuration if the name namespace and SWCV are correct for the selected interfaces.

Regards

Anand

Former Member
0 Kudos

Hi,

Check the interfaces that are configured for that particular interface mapping are being used .Also as Anand has told try refreshing the cache.sometimes even if u activate ur change list for BPM in Repository it wont get reflected in Directory if cache is not refreshed.

Regards,

Sudharshan

Former Member
0 Kudos

Hi Umashankar,

Since you are using BPM, are you making the Interface Mapping between Abstract interfaces????????????....Just make sure of that because your error shows interface Mapping not found.Tnhis might be the reason.

Cheers,

Rashmi

Former Member
0 Kudos

Hi Rambarki

I have a similar scenario without using BPM. i.e., JDBC->XI->RFC. If you could send your mailId I can send you a document on that. You just implement BPM for that. And my scenario is just inserting into R/3 but not getting the response from R/3. Hope that may help you.

regards,

Raju

Former Member
0 Kudos

Hi Rambarki,

Just for your information I'll tell you what all you have to develop to complete this scenario.

<b>1></b> Two datatypes. one for the Request(data coming from JDBC Sender) and one for the Response(data going through JDBC Receiver).

<b>2></b> Two corresponding Messagetypes.

<b>3></b> Five Message Interfaces.

i) OutBound/Async with Request.

ii) Abstract/Async with Request.

iii) Abstract/Sync with Request and Response.

iv) Abstract/Async with Response.

v) InBound/Async with Response.

<b>4></b> Message Mapping

i) Message Mapping between the Request and imported RFC.

ii) Mapping between RFC.Response and Response.

<b>5></b> Single Interface Mapping with Source as Abstract/Sync interface and target as RFC with two mapping programs corresponding to Request and Response.

<b>6></b> Integration Process

i) Create container element for request and response interfaces.

ii) Receive step(Asynchronous), Send step(Synchronous), Send step(Asynchronous).

Receiver Determinations

i) JDBC --> Integration Process (imported from IR)(OutBInterface: OutBound/Async, InBnterface: Abs/Async)

ii) Integration Process --> R/3 (OutBInterface: Abs/Sync, InBInterface: RFC with mapping program)

iii) Integration Process --> JDBC. (OutBInterface: Abs/Async, InBInterface: InBound/Async).

Hope this works for you.

Former Member
0 Kudos

Hi..

Thaks for sending your valuble inpus..but still same problem exist...i tried all the ways...no use..!

Auctully i have Sync and Asnc scenrios...I'm using BPM for Sync scenrios and now i'm testing Async scenrios...so i'm struck in posting the data into RFC..once it is done , then i can go for catch the return response..so the first stage only struck me..for posting the data..

RFC_HISTORY- OK: 2006-01-11 18:54:14 PST: Message processed for interface FI0003_RFC_MI

Previous error i displayed is Async scenrio ...adapter monitor showing that message..auctully it suppose to disply message processed successfully..i haven't find that kind message..

thinking is ..meesage going upto this level..

but my audit log showing message successfully processed..

any way let me check and test one more time...

Thank You verymmuch...!

Regards..rambarki!

Answers (1)

Answers (1)

STALANKI
Active Contributor
0 Kudos

Michael is very much right.You can use sync RFC in CCBPM if executes fast otherwise it is going to be a bottle neck in performance when lot of messages comes in.

Former Member
0 Kudos

Hi..

Thanku very much for your suggestions, i'm trying to do synchronous communication..

will let u know if any problem comes...

Regards..rambarki.