cancel
Showing results for 
Search instead for 
Did you mean: 

Receive XML data over HTTPs and send response

david_tuohy2
Participant
0 Kudos

Hi there,

I have a requirement to receive XML data from an external system over HTTPs into ECC, to create sales orders. A success/fail/error response should then be sent back.

We do not have XI/PI module in place, and SOAP/WSDL approach is not an option.

There seems to be some other options for data exchange, such as SAP Business Connector, ICF, BSP with XML, SAP Gateway etc.

I’m trying to determine the most appropriate – can anyone give some advice please on what would be a good, relatively lightweight approach, that incorporates some error logging, monitoring options?

If taking the ICF approach, that would basically mean writing a HTTP handler to receive the XML? Is it possible for the external source to PUSH XML to the url that is generated in ICF?

Any major points to watch out for, or concerns with such approaches?

Thanks in advance,

David

Accepted Solutions (1)

Accepted Solutions (1)

kammaje_cis
Active Contributor
0 Kudos

Yeah, ICF is the lightweight approach. Yes, you need to write a handler for it and provide it in SICF. You may use ICF log for monitoring purpose.

HTTP is a request->response framework, and hence there is no 'Push' possible.

One other modern approach would be to use 'Web Sockets' using 'ABAP Push Channels'. This would allow you to 'Push' as well.

Ulrich_Schmidt
Product and Topic Expert
Product and Topic Expert
0 Kudos

Why is there no 'Push' possible via HTTP? I would say that an HTTP POST with an XML document in the request body, is precisely a 'Push'...?!

Answers (1)

Answers (1)

Ulrich_Schmidt
Product and Topic Expert
Product and Topic Expert
0 Kudos

As Krishna already pointed out, using ICF and writing an HTTP handler that receives and processes the data, would be one possible lightweight approach for this scenario. However, it has one small disadvantage: it requires to open a port to the ECC system in the firewall, if the external system is outside your firewall (e.g. an external business partner).

An alternative solution, which is also lightweight, would be to install a Business Connector (e.g. in the DMZ). If there is already an existing function module or IDoc type for processing the data in the ECC system, then this is very easy and does not require any ABAP coding: SAP BC can generate templates for the special RFC or IDoc XML format. The business partner would use this XML format and make an HTTP POST against the RFC:InboundProcess (or ALE:InboundProcess) of the SAP BC, the SAP BC automatically converts the XML to RFC data (or IDoc data) and calls the corresponding function module (or IDoc) in the ECC system. The ECC system then returns an error/success message to the SAP BC via the RFC call, which the SAP BC converts to an XML error document and returns to the external system in the HTTP response.

So this would require no coding, only a little bit of configuration to set up the correct routing. And the ECC system does not need to be exposed to the internet. (Only a port on the SAP BC needs to be opened on the firewall. And by using "Reverse Invoke", a special feature of SAP BC, even that can be avoided.)

If the external sender includes a 24-digit Transaction ID (TID) in the HTTP request (via a special HTTP header "x-tid" which is recognized by the SAP BC), then the call to the ECC will be made via tRFC and the execution status of each transaction will be logged in the SAP BC. The status of each TID can then be monitored across all three systems: the external sending system (if it keeps a record of the TIDs it sent), the SAP BC and the backend system (ECC).

More details on this can be found in the documentation:
SAP Business Connector in Detail
in particular the "SAP Adapter Guide".

david_tuohy2
Participant
0 Kudos

Hi Ulrich - great, thank you for the info!