cancel
Showing results for 
Search instead for 
Did you mean: 

Publish Message for External System

akitts
Explorer
0 Kudos

Hi All,

Please excuse my ignorance but is it possible to integrate workflow objects (change docs/events/task) as messages for an external system subscriber?

For example - as business partners are created in ECC, a subscribing external system receives notification message. 

  

View Entire Topic
StephaneBailleu
Active Contributor

Hi 

I don't think that event can be send to an external system as event.

However, in SWE2 you can manage a receiver as a function module and then code something to be sent externally.

Change document can trigger an event but are not part of the workflow, but you could trigger an event that would catch the document change and capture it then code it to be sent externally.

Task would not directly be send to an external system but via function module could be called by an external system via RFC (for instance) check the SAP_WAPI* function module (Workflow API) 

The external system would like to receive which kind of message ? Email ? JSON ?


You would have to build something but everything is possible 
Cheers

 

Ulrich_Schmidt
Product and Topic Expert
Product and Topic Expert
0 Kudos

sbl is right: if you can trigger an event that calls your own piece of ABAP code, then your code can forward any kind of message to an external system using either RFC or HTTP.

If the external system cannot receive RFC or HTTP, then you could just as an example use a middleware that generates a PDF message and sends it as an Email attachment etc. As I am familiar with SAP Business Connector, let me give you an example of how this would work using the SAP BC. (But of course you could as well build your own receiver based on NW RFC Library, JCo or NCo.)

  1. A business partner gets created in ECC
  2. This triggers an event which is forwarded to your own function module Z_NOTIFY_EXTERNAL, which you have registered via SWE2.
  3. In the ABAP code of Z_NOTIFY_EXTERNAL you take the necessary information from the event and make a
    CALL FUNCTION 'Z_RECEIVE_NOTIFICATION' DESTINATION 'SAP_BC'
         EXPORTING ...
  4. The function module Z_RECEIVE_NOTIFICATION can be empty. It just serves to define the necessary importing parameters for transporting the required data. The RFC call is then sent to the SAP BC (which listens on an RFC destination defined in SM59).
  5. The SAP BC takes the data from that RFC call, converts it into the format that the external system would like to receive, and then sends it to the external system via any network protocol of your choice. (Standard protocols like HTTP, FTP, Email, JDBC, EDI flatfile are available in the SAP BC out-of-the-box, but other protocols can also be added easily.)

If you would like to try out something like this in a prototype, you should provide more details as to how the external system communicates and what kind of data format the external system needs. Then I can provide more tips and documentation, on how this could be achieved.