cancel
Showing results for 
Search instead for 
Did you mean: 

How to design & configure HTTP to RFC scenario?

Former Member
0 Kudos

Hi All,

I am working out an HTTP to RFC scenario. The XML data will be posted on SAP PI link which is as below.

http://IPaddress:****/sap/xi/adapter_plain?namespace=http%3A//XYZ/SME&interface=MI_SME_REQ_OU_ASY&service=BS_SME&party=&agency=&scheme=&QOS=EO&sap-user=USER&sap-password=PASS123&sap-client=**&sap-language=EN

If the 3rd party system wants to push the data in the above URL link only instead of XML data like below.

http://IPaddress:****/sap/xi/adapter_plain?namespace=http%3A//XYZ/SME&interface=MI_SME_REQ_OU_ASY&service=BS_SME&party=&agency=&scheme=&QOS=EO&sap-user=USER&sap-password=PASS123&sap-client=**&sap-language=EN&UID=M0001&PHNO1=123&RESP1=0&PHNO2=234&RESP2=1&PHNO3=123&RESP3=0

Is it possible to achieve this interface?

How shall I design & configure this interface without an XML data? How to do mapping? What will be at source message end to map with RFC target message?

Regards,

Amit Patil

Accepted Solutions (1)

Accepted Solutions (1)

markangelo_dihiansan
Active Contributor
0 Kudos

Hello,

I am working out an HTTP to RFC scenario. The XML data will be posted on SAP PI link which is as below.

http://IPaddress:****/sap/xi/adapter_plain?namespace=http%3A//XYZ/SME&interface=MI_SME_REQ_OU_ASY&service=BS_SME&party=&agency=&scheme=&QOS=EO&sap-user=USER&sap-password=PASS123&sap-client=**&sap-language=EN

You can refer to the steps posted by the user above.

If the 3rd party system wants to push the data in the above URL link only instead of XML data like below.

http://IPaddress:****/sap/xi/adapter_plain?namespace=http%3A//XYZ/SME&interface=MI_SME_REQ_OU_ASY&service=BS_SME&party=&agency=&scheme=&QOS=EO&sap-user=USER&sap-password=PASS123&sap-client=**&sap-language=EN&UID=M0001&PHNO1=123&RESP1=0&PHNO2=234&RESP2=1&PHNO3=123&RESP3=0

Based on your scenario, you will not be sending the HTTP Body because the details are in the URL. In the HTTP Sender Adapter, under Message Protocol, it says XI Payload in HTTP Body, which means an HTTP Body is needed otherwise it will not work.

Hope this helps,

Mark

Former Member
0 Kudos

Hi All,

If the data from 3rd party system wont come in XML format and they want to push it onto a URL link, then how to proceed with this scenario(HTTP to RFC)?

What about the mapping(at source message end)? How to configure the scenario?

Thanks,

Amit Patil

markangelo_dihiansan
Active Contributor
0 Kudos

Hello,

If the data from 3rd party system wont come in XML format and they want to push it onto a URL link, then how to proceed with this scenario(HTTP to RFC)?

By pushing into a URL link, you mean the data is in the URL? If it is without an HTTP Body, the scenario will not work.

Or if you mean the data is not XML but will be in a HTTP Body, then you can use Java Mapping to parse it and then map to output. The source structure will be dictated by you of course.

Hope this helps,

Mark

Edited by: Mark Dihiansan on Dec 5, 2011 11:04 AM

Former Member
0 Kudos

Hi All,

Thanks Mark.

The 2nd option you are saying is the actual case - the data is not XML but will be in a HTTP Body, then you can use Java Mapping to parse it and then map to output. The source structure will be dictated by you of course.

But how to proceed in this case, if seven parameters will be pushed?

What will be at source message end? How to map it with target RFC message?

How to configure the sender HTTP adapter?

Please guide me in this since I'm working out this scenario for the 1st time.

Full points will be awarded.

Thanks,

Amit Patil

markangelo_dihiansan
Active Contributor
0 Kudos

Hello,

But how to proceed in this case, if seven parameters will be pushed?

Use Java Mapping to read the inputstream, here is a sample code in sdn wiki. https://wiki.sdn.sap.com/wiki/display/XI/SampleJAVAMappingcodeusingPI7.1+API

Be sure to remove 4,6, 7 and two lines regarding dynamic config (DynamicConfiguration and conf.put) since you do not need them.

What will be at source message end?

After reading the inputstream, build your outputstream to look similarly like this.


<RootMessage>
 <Param1>value1</Param1>
 <Param2>value2</Param2>
 <Param3>value3</Param3>
 <Param4>value4</Param4>
 <Param5>value5</Param5>
 <Param6>value6</Param6>
 <Param7>value7</Param7>
</RootMessage>

You can use substring to retrieve the values from the inputstream. You can replace the names of the RootMessage and the Param1..7 into something understandable by support.

How to map it with target RFC message?

You can build your datatype to look like the XML above and then map it to RFC using normal message mapping. In your operation mapping, be sure that in the request mapping you use Java Mapping first and then the graphical mapping as the second mapping.

How to configure the sender HTTP adapter?

HTTP Sender is not required. Just ask the third party to POST to the URL you provided.

Full points will be awarded.

Do not promise points. Marking the thread as answered is enough

Hope this helps,

Mark

Answers (1)

Answers (1)

Former Member
0 Kudos