Skip to Content

Requirement

Synchonous scenario where Sender system expects synchronous response message for it’s request but Receiver is SAP system and receiver interface is IDOC interface(asynchronous).

Prerequisite

Receiver SAP system in version 6.20 or higher(more in note 1487606).

Solution

First of all it’s i feel it important to say: NO WSDL IS REQUIRED. I’m saying this because I spent half a day looking for it and then I found out that it’s not necessary to have it.

Receiver system

Go to customizing client and run transaction SRTIDOC(or program SRT_REGISTER_SERVICE). Execute it with default variant IDOC_STANDARD. Confirm transport request and transport it into receiver client(for example customizing client could be 100 but receiver 200).

Check transaction SICF if service /sap/bc/srt/IDoc is up and running. Right-click on it and “Test service”. In browser you should see something like this:

image

 

If it’s working and you know appropriate system user(and password) receiver SAP system is ready.

PI

Create SOAP receiver communication channel and use it in your Receiver Agreement instead of IDOC channel. Target URL is the URL you can see in your browser after “Test Service”. Enable also “Configure User Authentication” option and fill in the receiver system user and password(for example PIAPPLUSER)

Set sender channel as synchronous(Best Effort).

Send test message via sender channel (if it’s SOAP then good test tool is SOAP UI)

In monitoring you will see response message from receiver system. If you get here, you have already won the jackpot. Next steps are just to finalize the complete interface:

Take response message from monitoring and create XSD based on it’s structure(for each IDOC type is different).

Create external definition and import the original IDOC xsd file.

Create external definition and import the IDOC response xsd created from the first response message.

Create new inbound synchronous message interface. Use external definition of original IDOC as inbound message and response IDOC definition as outbound message.

Update your interface mapping with new target interface(instead of original IDOC use this new synchronous interface).

Create additional mapping between IDOC response message and the outbound interface response message.

Summary

Advantages

Provides real technical response from the receiver system.

Avoid using of BPM, adapter modules, function modules on ECC side etc.

Possibility to send IDOC number back to sender(if its mapped into its response) – could be used in some extended E2E monitoring reports etc.

IDOC is posted to receiver SAP system standard way – it’s processed according to partner profile and results can be found in ta WE02.

Disadvantages

EDI_DC40 record is not created automatically by PI. It has to be created in mapping step which is not always feasible.

Additional service has to be running on receiver ECC system and TCP port has to be open. For landscape where PI and receiver SAP system are in one secure network it should be ok. Problem might be if they are not in the same network and some additional firewall rules has to be defined.

Some special settings/features of IDOC adapter are not available here (packaging etc.).

Additional info

When creating EDI_DC40 segment in mapping you’ll need to fill also SNDPOR element. You can use some existing tRFC port name but you can also create new one with type XML:

image

To report this post you need to login first.

15 Comments

You must be Logged on to comment or reply to a post.

  1. Bhavesh Kantilal
    Hello,

    Interesting concept.Couple of questions,

    1. Does the IDoc get posted into SAP and can the IDoc be monitored through regular IDoc processing means like we02?

    2. Is there a minimum version of SAP you need to be one?

    Regards,
    Bhavesh

    (0) 
    1. Martin Dejl Post author
      Hi,

      thanks. It’s my first article 🙂

      1. Yes. IDOC is posted into SAP exactly the same way as if it’s uploaded via tRFC or File port and it’s been processed standard way(according to partner profile).

      2. I guess that according to note 1487606 minimum version will be 6.20. It’s actually the only note I’ve found about it and it’s just about how to deactivate/disable it if it’s not in use to provide “higher security”.

      (0) 
    1. RAVIJEET DAS

      Hi Martin,

      I am trying to implement this approach and I went to the ECC system and we ran TCode SRTIDOC with default variant IDOC_STANDARD. Then as we check transaction SICF if service /sap/bc/srt/IDoc is up and running and when we right-click on it and “Test service”. our browser gives a blank white screen. Is there any other steps we need to carry out to activate this service.

      Best regards

      RJ

      (0) 
  2. Martin Sommer

    Hi Martin, your requirement is

    Synchonous scenario where Sender system expects synchronous response message

    What kind of sync response message do you receive from the IDoc SOAP service? Is it the response from the application (e.g. Material changed) or technical response that the IDoc has been received?

    Does it depend on the partner profile? If yes, what response do you get if you set partner profile to collect inbound IDocs?

    Thanks & best regards, Martin

    (0) 
    1. Martin Dejl Post author

      Hi Martin,

      sorry for a bit late reply. I wasn’t using this profile for some while… long story.

      To your question(s) – it’s only technical response from the service. It sends back the IDOC number in case the IDOC was successfully created in database on the receiver side but nothing more. I can imagine it used for kind of WS-RM implementation. Synchronous application responses are still not available since IDOC is still strictly asynchronous transfer method.

      I did not try to implement it with IDOC collecting but I guess it’ll behave the same way since collection just postpones processing but IDOC is always first saved/parked into receiver database.

      Martin

      (0) 
  3. diptee s

    Hello Martin,

    I am trying to send idocs to my ECC system using the Idoc over SOAP technique. When I try to test the sap/bc/srt/idoc service. I get a blank page and no error.

    Does that mean the service is running fine?

    Also I understand the XML port is needed only for outbound idocs, is this correct?

    Regards,

    Diptee

    (0) 
    1. Martin Dejl Post author

      Hi Diptee,

      I never had such behavior and it may have actually many reasons from ‘different patch level’ of your SAP system to network issue(depends how you access the systems etc.). I suggest you use SOAP UI and try to send simple request to the service URL if you can get some more details on what’s going on.

      The XML port is needed only for outbound, yes.

      Martin

      (0) 
  4. Geetha Pilli

    Hi Martin,

    I have a requirement which needs the Idoc number to be posted back to the Web-service call. I have followed your steps but I am stuck.

    Is there anyways I can contact you?

    Thanks,

    Geetha

    (0) 
    1. Martin Dejl Post author

      Hi Geetha,

      send me direct message with details, what have you tried to do and where you are stuck now, maybe I can help you.

      Regards,

      Martin

      (0) 

Leave a Reply