Sending Notifications Using WF Upon Modifying a Purchase Order (MM)

Sending Notifications Using WF Upon Modifying a Purchase Order (MM) post thumbnail image

Hello everyone! Welcome once again to the EBAL IT blog. Today, we bring you a topic that we know will interest many of you working in the SAP MM (Material Management) area. We’re going to talk about how to implement a workflow to send automatic emails when a purchase order is modified. Yes, you read that right: automatic!

Why You Need a Workflow in SAP MM?

Before we dive into the technical details, let me tell you why a workflow is so essential in the management of purchase orders. Imagine you’re in a business environment where numerous transactions are managed every day. Manual updating and communication with different departments can be a mess and, let’s be honest, quite tedious. This is where the workflow comes into play: to make our lives much easier.

Let’s get to work 😉

Searching for the Business Object

The first thing we will do is search among all that SAP has for a Business Object that suits the task we need, in this case, one that triggers an event when a purchase order already created is modified.

1. Go to the transaction ME23N

And here we see the Business Object for use

And we verify if it has an event that suits our needs

Let’s go to transaction SWO1

We enter the Business Object obtained in the previous step and click on display

And we see that there is an event when the PO changes

Note: We can use the same process described in this article for any other event shown, such as when creating a PO or when it is completed.

Creation of WF

Now let’s get down to business, we proceed to create the WF flow.

We execute the transaction PFTC

We create a new Workflow Model

And we set the restrictions

We assign the event from the previously found Object

And we indicate that it is for input and output so that we can later retrieve the information when sending the email.

 

Now we see a new container called PO (as we have named in “Element”) and we save

En este punto nos pedirá orden.

Now that we have assigned the Business Object to the task, we are going to activate the trigger when modifications are made to a PO.

if we click on the matchcode of the event field, we see all the options that we observed when analyzing the object through SWO1, as shown below

Now we assign the data flow, so we can use the values in the WF

 

And we activate the event, so that it takes effect

At this point, it will ask for a custom order, we choose the one that interests us, and we see that it has been activated

Now we have completed all the preparations, so that when we modify a PO and save it, an event is triggered. Now we need to specify which operation we will perform, in our case, sending an email

 

By clicking on the Workflow Builder button, the WF editor appears

In the task, we right-click and select create, and all the possible options appear (we will make future videos with other functionalities)

We choose to send an email

 

We indicate that the recipient is an email, the email to send, and the subject and body.

In our case, we want to indicate the PO number in the subject, for this, we click on the icon and choose the PO number

And the field appears between &&, we do the same process in the body to get the user who initiates the process and the supplier code

And we save, upon activation it asks for the name of the task and the order where to save it

And now we have the WF created

Now let’s test it.

Modifying a PO

We go to transaction ME22N and change the brief text and save

Now we see the WF

We see that we have a WF entry assigned to this order

If we look at the step, we see that it is our email and the data matches, as we had indicated in the WF email

Now let’s go to SOST to view the email directly

And we see that there is an email, and if we enter, it matches the email seen in the WF previously

 

 

And Done!

And that’s how easy it is to configure a workflow in SAP MM to send automatic emails when a purchase order is modified. With just a few clicks, you can automate a process that would otherwise require a lot of time and effort.

Remember what I mentioned, instead of sending an email, you can create a WF to perform the task you need 😉

I hope you found this post useful. Don’t hesitate to leave your comments and questions, and we’ll be happy to help. Until next time, SAP comrades.

Greetings from the EBAL IT team! 🤓👋

 

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post