Skip to Content
author's profile photo Former Member
Former Member

Multiple responses to single request

I receive a single HTTP request, map this to an RFC and make a call to SAP. Straight forward so far but my problem is that the structure of the XML I send back to the 'requestor' will depend on the response from SAP.

For example, the following is sent if my call to SAP returns data

<SUCCESSRESPONSE>

<CUSTOMERDETAIL>

<ACCOUNTNO>123456</ACCOUNTNO>

<NAME>MR SMITH</NAME>

</CUSTOMERDETAIL>

<CUSTOMERDETAIL>

<ACCOUNTNO>654321</ACCOUNTNO>

<NAME>MR JONES</NAME>

</CUSTOMERDETAIL>

</SUCCESSRESPONSE>

If SAP fails to locate any data

<FAILRESPONSE>

<ERROR>No customers located</ERROR>

</FAILRESPONSE>

Obviously everything starts with a message interface but it appears you can only have one 'input' message.

Thanks in advance.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on Jan 29, 2008 at 10:29 AM

    Ofcourse One Message Interface would have One Message (if the Interface is Synchronous, it would have req. and resp. messages). However you can create a Message type such that some node in the Message type can have multiple Occurances.

    And then While doing Message Mapping from RFC response to this Message you can create multiple occurances of the Node..

    Please elaborate on the Scenario further to help you find the resolution.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Jeet,

      Thank you. Your answer got me most of the way to solving the problem. As you state it's all about the message mapping. I've created a datatype with two nodes. One created if I get the data I need from SAP and the other created if I don't. Although I'm using a single message interface I'm returning different structures.

      Thanks

  • author's profile photo Former Member
    Former Member
    Posted on Jan 29, 2008 at 10:43 AM

    Hi Robert,

    your requirement is just like HTTP(SYNC)-RFC(SYNC).

    both HTTP message interface and RFC shold be synchronous.

    you have to do two message mappings followed by one message mapping.

    regards

    mahesh.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.