cancel
Showing results for 
Search instead for 
Did you mean: 

WS to RFC Scenario:: One RFC As Req and Other as Response

Former Member
0 Kudos

Hi Experts,

I am dealing with a scenario, WS to RFC, where I have to Use the request of one RFC as the resonse of the other RFC.

WS--> Req Of RFC1

RFC2 as Resp of RFC1-->WS

Please suggest how it can be accomplished?

T & R

Sushama

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Sushama,

Hope u r doing well!!!

As the scenario is SOAP to RFC, When you are dealing with this scenario you have RFC (Bapi) req and responce as well

In the IR part

we need to configure two message mappings

1) Soap sender to bapi request

2) Bapi response to soap receiver

In the interface mapping we need to assign two mapping one is req mapping and res mapping in mapping program we can get a tab after assigning a bapi

In the ID part

Soap adapter as sender (with mandatory parameter of MI and namespace)

RFC adapter as receiver (If RFC is a receiver, no need of configration from SAP side)

Receiver determination

Interface determination

Sender agreement

Receiver agreement

Hope this might help you... Dear Experts. pls correct me if i'm wrong

Thanks

Rajshekar

Former Member
0 Kudos

Hi Rajshekar,

Its ok that req and response tabs are there in Interface mapping , but I have to map 2 differnt RFs i.e 2 diifernt interfaces.

Every RFC has response associated with it. I dont want that response , I have to incorporate another RFC as the response.

How this can be done?

Please suggest.

Regards,

Sushama

former_member200962
Active Contributor
0 Kudos

If you are using the RFC directly as a MI then you cannot avoid its response....if at all you want to have the response RFC2 in the mapping then you have to create a separate MI (IN Sync) and then have the corresponding request and response messages.

Former Member
0 Kudos

Hi Abhishek,

You mean that we have to create 2 IMs.

1.WS--> Req of One RFC1

Response of RFC1-->WS

2. WS--> Req of RFC2

Response of RFC2-->WS

Please confirm If I have interpreted it correctly?

Also, do we need 2 interface determinations then??

Please elaborate.

Thanks & Regards,

Sushama

former_member200962
Active Contributor
0 Kudos

I didnt say two IMs......create Inbound-Sync Message/ Service Interface for the SAP-end and include RFC1_Request as Request Message and RFC2_Respone as response message.....then define two MM accordingly.....WSReq_to_RFC1Req and RFC2Resp_to_WSResp ..... include these in the request and response sections of the same Interface Mapping.

Regards,

Abhishek.

Former Member
0 Kudos

Hi,

So we neednt create DT and MT for Req and Res of WS?

We are generating WS inside the XI for that reason I have created DT and MT separately for WS.

Then For SOAP Req and response we neednt create SI(Outbound Snchronous)?

Please suggest.

Thanks & Regards,

Sushama

former_member200962
Active Contributor
0 Kudos
Then For SOAP Req and response we neednt create SI(Outbound Snchronous)?

You got me completely wrong

You need to have Outbound-Synchronous SI from which you will create the WSDL and give it to the WS Application.

As of now you are including the RC directly in the Interface Mapping....so instead of this I am suggesting create a Inbound-Synchronous SI which will have request message from RFC1 and response message from RFC2.

Regards,

Abhishek.

Former Member
0 Kudos

Hi Abhishek,

Thanks, its working .

Regards,

Sushama

Former Member
0 Kudos

Hi Abhishek,

I am able to map now. But at runtime how the RFC will identif the Message interface??

Right now I am unable to test it since server is down. But, conceptuall, I have a doubt.

please suggest.

Thanks & Regards,

Sushama

former_member187339
Active Contributor
0 Kudos

Hi Sushama,

>>WS--> Req Of RFC1

This is straight forward and I guess you shoudl not have any problem with this..

>>RFC2 as Resp of RFC1-->WS

When you say RFC2 as response of RFC1, did you mean that that the actual response from RFC1 should have the same structure as RFC2 Response? If yes then this is not possible, as the signature of both RFCs are alreayd defined and cannot be changed on the runtime.. I will suggest you to make a proxy call to ECC and call RFC1 and then RFC2 so that you can get back the response of RFC2 back to PI and then to WS

Regards

Suraj

Former Member
0 Kudos

Hi Suraj,

Both the RFCs are having diiffernt structures.

we have to create WS by PI. For that I have created DT, MT, MI(which is Syn).

I have done MM. But, the problem is in IM. Selecting the Source(as Req DT for WS) and Target as (RFC1), I am gettting bydefault the Response of RFC1 rather than RFC2.

Do we need to create 2 separate asyn Soap MI, but then BPM would be required.

Cant we sort it out without BPm?

Please suggest,

Thanks & Regards,

Sushama

former_member187339
Active Contributor
0 Kudos

Hi Sushama,

>>I have done MM. But, the problem is in IM. Selecting the Source(as Req DT for WS) and Target as (RFC1), I am gettting bydefault the Response of RFC1 rather than RFC2.

MM you can do because all (RFC1, RFC1.response, RFC2, RFC2.response) are independent components. But when you create the IM, the problem will come.. You are giving input to RFC1 and so you will get a response from RFC1 only. Logically also this is correct, isn't.

Tell me how RFC2 can give a response for RFC1 request?? They are not connected in any way. But if you need this to happen, create a receiver proxy and call RFC1 one and then RFRC2 and then pass back RFC2 response. By doing this the Receiver ABAP proxy can take RFC1 request message and give back RFC2 response message

Regards

Suraj

Former Member
0 Kudos

Hi Suraj,

Please elaborate a bit. you mean I have to use Client proxy for the inbound interface?

We can use either of Java/ABAP proxy?

Client has suggested BPM also as one of the solution, but he wasn't sure whether this can be done.

Please suggest.

Thanks & Regards,

Sushama

former_member187339
Active Contributor
0 Kudos

Hi Sushama,

>>Please elaborate a bit. you mean I have to use Client proxy for the inbound interface? We can use either of Java/ABAP proxy?

Write an Inbound ABAP proxy, For that

1. Create a Synchronous Service Interface according to your naming convention

2. Give RFC1 as request message type for above service interface

3. Give RFC2.response as response message type for above service interface

>>Client has suggested BPM also as one of the solution, but he wasn't sure whether this can be done.

Still I feel BPM will not be useful in this situation ad RFC1 will not be able to invoke RFC2 and hence you cannot have a response from RFC2

Regards

Suraj

Former Member
0 Kudos

Hi ,

Can u please be more clear with your requirement.

What I understand is that U r getting a req from one WS and than passing that Req to a RFC as the req to RFC and getting the response back from RFC that need to passed to WS again..

If this is the scenario u need to make synchronous WS which have both req and response Message type.

Regards,

Navneet

Former Member
0 Kudos

Hi,

We have 2 differnt RFC for Request and Response. That is the problem.

How to take req of one RFC as Response of the of other one?

Please suggest.

T & R

Sushama

Former Member
0 Kudos

Hi,

Try to use BPM which can help you for this synch asynch bridge,

Thanks,

Tiny