Friday, May 22, 2015

Subscribing to changes in business transactions e.g. Sales Order changes

You may have a need to be proactively notified whenever a particular business object is changed. E.g. If I own a particular Sales Order and I want to ensure that I am immediately made aware of any changes to it then I can do the following to "subscribe" to the sales order changes:

Initial Settings

Using transaction SU3 make sure that you have your default parameter for SD_SWU_ACTIVE = 'X' as shown below. This will enable the Generic Object Services (GOS) button to appear on your sales order transactions.

Subscribing to Sales Order changes

In transaction VA02 you can select the GOS object menu My Objects -> Subscribe / Cancel Object as shown below.
You are now subscribed to any changes to that particular Sales Order as shown below.

How does it work?

Use transaction SWETYPV, as shown below, to see that the Object BUS2032 (Sales Order) and event CHANGED is linked to receiver "SUBSCRIBE". This is standard SAP functionality and should not have to be configured (although it may need to activated).

After making a change to a subscribed sales order you can technically review the event that was triggered using transaction SWELS. In the diagram shown below you can see how the CHANGED event was triggered for BUS2032 for receiver SUBSCRIBE.

What then? How / where do I see the changes?

Each change is delivered to your workflow mail inbox. Use transaction SBWP to review any changes. See the diagram below for a screenshot of what the standard output looks like.
Note: You could also program a custom workflow to process these changes in a more custom way. You would simply code your workflow and use SWETYPV to link the launching of your workflow to the CHANGED event for BUS2032 and receiver SUBSCRIBE.

No comments:

Post a Comment