How to create and test a custom PPF Action

PPF Action is a tool for the generic execution of functions and processes. Help in triggering actions like Print, email fax, and labels.

It also triggers automatic subsequent documents and workflow.

PPF Purpose:

  • Printing
  • Communication with other systems like SAP ERP or GTS
  • Sending XI messages
  • Asynchronous updates between business objects within SAP EWM
  • Execution of loosely coupled actions into the business process with the goal of having a separate application log
  • Generic option to enable customer extensions of SAP EWM processes, especially for asynchronous processes, printing and workflow

The below example is done for Warehouse Order related PPFs, but the same process applies to all other PPFs.

Navigate to the associated config in SPRO

PPF1.png

Select the relevant Action Profile

PPF2.png

Select the Action Definition you want to copy.

PPF3.png

Give your PPF Action a name. It must not be the same as the one you’ve copied else it will be difficult to identify when you maintain the PPF Condition shown later in this document.

PPF4.png

Copy all the associated entries

PPF5.png

Save your changes

Make sure your action is not marked as “Inactive”

PPF6.png

Select the Action Definition and then select the Processing Type

PPF7.png

If you need to use custom logic to influence the result of the PPF action e.g. different information on a label, then you need to define a custom method as shown below. Select the “Create” option. Note: You will need an ABAP developer key to do this.

PPF8.png

Create a new BAdi Filter

PPF30.png

Name the custom implementation

PPF10.png

Provide the implementation short-text and then add a custom filter as shown below.

PPF11.png

Activate the implementation.

PPF12.png

Go back to the PPF Action by pressing F3 and now select your custom filter.

PPF13.png

Save the change

PPF15.png

Now you need to create the PPF Condition. This is where giving your PPF Action a unique name instead of copying the standard name will come into play.

Show the technical names and then select the associated Action Profile

PPF14.png

Create a new entry as shown below and select your PPF Action

PPF16.png

Compare the Schedule Condition and Start Condition of the standard PPF Action you used when creating when creating the custom entry and then maintain the same entries on the custom action as shown below

PPF17.png

If you want to be able to manually create the PPF action e.g. via the Warehouse Monitor, then you need to add a 2nd entry as shown below.

PPF18.png

Make sure that the 2nd entry as the “Default Settings…” unchecked as shown below. No Schedule or Start Conditions are required in this instance.

PPF19.png 

You may need to create condition records for the custom PPF Action. Tcode – /SCWM/PRWO6

Specify the maintenance group

To create a new entry, select the field shown below and specify the condition type. Maintain the required entries. Here you will specify the custom action definition and associated form. The result is that the custom action definition will be determined when the maintain conditions are true.

PPF20.png

A practical tip to debug the custom method: PPF Actions are called asynchronously to the object that creates them and this makes it difficult to debug. In order to easily debug you should change the processing time of the PPF action to be done using a report. This means that the action is created, but not triggered to execute.

PPF21.png

To execute the PPF you need to use T-Code SPPFP

Specify the relevant entries shown below to display the entries.

PPF22.png

On execution, Select the relevant entry and then execute. The code should now stop in your custom method if you have added a breakpoint.

REF: https://cloudbook.co.in/blog/sap-ewm-custom-ppf/

 

 

 

 

 

Bottom menu module

SAP is registered trademark of SAP AG.
EWMWIKI.COM is not affiliated to SAP AG or any of its subsidiaries.