cancel
Showing results for 
Search instead for 
Did you mean: 

Webservice -> RFC

Former Member
0 Kudos

Hello,

I would like to establish a web service that is able to call the RFC BAPI_DOCUMENT_CREATE2 and send back the created DIS number. How have to look the integration process like?

I created a file->rfc->file process with a integration process like :

Receiver : async (from source file)

Sender : synchronous (to rfc and back)

Sender : async (to destination file)

But how to for the Webservice -> RFC process? Like this:

receiver : synchronous (from web service and back)

sender : synchronous (to rfc and back)

Is this correct? Or must the receiver be asynchronous?

If so, do I have to include an additional sender step at the end??

Thanks

chris

Accepted Solutions (1)

Accepted Solutions (1)

udo_martens
Active Contributor
0 Kudos

Hi Christian,

>>>But how to for the Webservice -> RFC process? Like this:

receiver : synchronous (from web service and back)

sender : synchronous (to rfc and back)

No, just the other way around. WebClient is the sender, RFC the receiver.

>>>>>Or must the receiver be asynchronous?

No, both are synchronous.

>>>>If so, do I have to include an additional sender step at the end??

You dont need BPM for that.

Regards,

Udo

Former Member
0 Kudos

Hey Udo,

thanks for your reply. But you mean the

other way around for the Interfaces, right?!

Of course web service is outbound, but in BPM

it would be a receive step, right??

If both steps are synchronous, I need a stateful

message handling. For this I need a BPM, didn't I?

When would I need BPM? For example, if one parameter

of the BAPI would be filled with a constant value?

thanks

Former Member
0 Kudos

Hi Christian,

In your scenario you'll be using the SOAP adapter as the sender and RFC as your receiver. You dont need to use the BPM as SOAP adapter is synchronous.

When would I need BPM? For example, if one parameter

of the BAPI would be filled with a constant value?<i></i>

If am correct in understanding, you need to decide something on the basis of some field...This you can handle in the receiver determination.

Cheers

JK

udo_martens
Active Contributor
0 Kudos

Hi,

i agree 100%. No need for BPM, it would just be a performance risc. Everything is synchronous. This is a often implemented Standard: WebClient <-> XI <-> R/3. XI provides a WebService which is using a RFC.

Regards,

Udo

Former Member
0 Kudos

Hi,

thanks for your answer. I just tried this without a BPM, but failed. But I think I know my error. I have only one Message-Interface, but I need two:

1) Outbound, Synchronous

Output: Input_Data (from webservice)

Input : Bapi input

2) Inbound, sync

Input : Bapi.response

Output: Output_data (to webservice)

is this right???

Do I need two flows in directory or only one because of the synchronous interfaces??

thx

Former Member
0 Kudos

Once again a inventory:

Design:

========

Data-Types:

DT_Input

DT_Output

Message-Types:

MT_Input - takes information from webservice

MT_output- repsonse from bapi to webservice

message-interface

MI_RFC_CALL_SYNC_OUT - outbound for webservice

do I need a second one here?

Message-Mapping

Webservice_to_RFC - maps infos from MT_input message to bapi

RFC_to_Webservice - maps bapi.response to MT_output

Interface-Mapping

IM_Webservice_RFC - maps request and response

RFC:

BAPI_DOCUMENT_CREATE2 - imported BAPI

Config:

========

communication channel

Send_SOAP - input for soap messages

receiver_RFC - for connection with SAP

Do I forget anything? With this I got a checked

flag, but no document is created.

Could it be that the original BAPI only runs test mode

and I need a wrapper to execute it?????

thanks

Former Member
0 Kudos

Hi Christian,

No you dont need two flows in Integration Directory. Coz the SOAP can act as the sender and receiver and whatever your sender is sending is mapped to your RFC request and is coming back in the response...

Cheers

JK

Former Member
0 Kudos

Hi ,

<i>do I need a second one here?</i>

No...You need not to create message interfaces for BAPI or IDoc without BPM scenarios

You required Only one flow ..(Webservices to RFC)

In Communication channel you need to select BestEffort option.

Thanks,

sekhar

Former Member
0 Kudos

It works I had only problems with the mapping.

XI returns following SOAP Message:

<SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">

<SOAP:Header/>

<SOAP:Body>

<ns:MT_RFC_Return xmlns:ns="http://www.johndoe.de/RFC">

<TYPE/>

<ID/>

<NUMBER>000</NUMBER>

<MESSAGE/>

<MESSAGE_V1/>

<MESSAGE_V2/>

<MESSAGE_V3/>

<MESSAGE_V4>0000000000000000000075675</MESSAGE_V4>

</ns:MT_RFC_Return>

</SOAP:Body>

</SOAP:Envelope>

So it seems he created a document, but I think I have to commit it, because it doesn't appear in SAP system yet.

Is there a possibility to commit it????

I think it's the Bapi: BAPI_TRANSACTION_COMMIT, but how to call???

thanks

Message was edited by: Christian Riekenberg

Former Member
0 Kudos

Hi,

<i>I think it's the Bapi: BAPI_TRANSACTION_COMMIT, but how to call???</i>

we have a option in RFC Adapter for committing your BAPI(commit handling for sinngle BAPI calls)..this will work if your SP>12..

or else you have to write a wrapper BAPI which can call both the bapis(your original BAPI and BAPI_TRANSACTION_COMMIT)...if you below the SP 12

Thanks,sekhar

Former Member
0 Kudos

All right, I found "Send Confirm Transaction" in advanced mode, but itis already checked. But he ignore me :-((((

Our SP is:

sap.com/SAP-JEECOR 6.40 SP15

sap.com/SAP-JEE 6.40 SP15

An idea, why he didn't commit?? Or where I can look

if he try to commit????

thanks

Former Member
0 Kudos

Hi ,

Its not the option...."Send Confirm Transaction"

the option is...commit handling for sinngle BAPI calls

check it in your RFC adapter..

sekhar

Former Member
0 Kudos

So it seems, that my service pack is too low,

because I couldn't see the checkbox you mentioned.

I don't understand the version system of XI so

where can I find the component I have to check for the right service pack???

thanks

Message was edited by: Christian Riekenberg

Former Member
0 Kudos

Hi,

Go to IR/ID Menu- > help->Information

and also...

Logon to XI->System menu>status->SAP system data tab(choose the icon there)

Thanks,sekhar

Former Member
0 Kudos

Directory says SP12. So the checkbox isn't included yet.

But I did a wrapper BAPI that calls the orginal BAPI

and the commit.

Thanks for your help

regards

chris

kimmo_sirpoma
Participant
0 Kudos

Before making an interface using RFC-adapter to backend SAP application, please consider that elsewhere in this SDN forum there are recommendations that instead of XI's RFC-adapter the ABAP-proxy technology should be used. They say it's also SAP's recommendation.

And existing RFC-enabled function module can be wrapped with ABAP-proxy.

br: Kimmo

Answers (0)