SAP Transportation Management: Trigger PPF (Post Processing Framework) Action from Stand Alone Code

Post Processing Framework

1.0 Introduction

In SAP Transportation Management, we get many scenarios to trigger a PPF (Post Processing Framework) Action by stand alone code. Examples being; Trigger a PPF Action from a POWL (Personal Object Work list) or trigger a PPF action in TRQ (Booking Request) when a condition satisfies in TOR (Manifestation). So we need a mechanism to trigger the PPF action configured in a BO via stand alone code.

2.0 Technical Design

The following design is based on a requirement in a project where a PPF Action was triggered from a legacy system via a RFC enabled FM which is called on certain events in the system. So appropriate inputs were created considering the requirement. These inputs can be changed as per project needs.

Inputs to the FM.

a) Booking #
b) Application Name (Defaulted to ‘/SCMTMS/TRANSPORTATION ‘)
c) Context Name (Name of the Action)
d) Name of the Action Definition
e) Commit (Default = ‘X’)

SAP Transportation Management

The following code is written with the constraint in PPF frame work that the Schedule Condition BADI (EVAL_SCHEDCOND_PPF) will not be instantiated and hence it cannot be called as a part of frame work. So we have to do the necessary code for doing the schedule condition check and then if that passes we can call the FM to trigger the PPF. In this part of discussion we will talk about the trigger to a BADI implementation of EVAL_STARTCOND_PPF & EXEC_METHODCALL_PPF.


2.1 Code snippet (Where we configure EXEC_METHODCALL_PPF BADI as final method)

Step 1) Get an instance of PPF manager

Step 2) Create PPF context

Step 3) Execute the trigger

Commit is required to make the changes reflect in the output management tab. Please be cautious if you are writing the code in BOPF. As we need not write commit work in BOPF coding as the system commit will take care of it.

Also Read : SAP HANA from Space Level

For the complete code extract of the FM : Click Here

2.2 PPF Action for triggering Adobe / smart forms (Where we configure DOC_PERSONALIZE_BCS BADI as final method)

When we are dealing with triggering BADI Implementations for DOC_PERSONALIZE_BCS for printing forms we need to add following lines of code to set the Medium of PPF action for Printers and Number of copies before calling Step 3 to execute the call. You can have the printer & number of copies as variable input in your FM. In this example I have hard coded for easy understanding.

This the first post on SAP TM series. Please stay tuned for more posts related to Transportation Management. In the next post, I would show how to “Execute Actions or Function Modules in locked instances mode in SAP TM“.

If you want to get such practical tweaks and tricks straight to your inbox, please SUBSCRIBE. We respect your privacy and take protecting it seriously.

If you liked this post, please hit the share buttons at the left side of your screen.

Thank you very much for your time!!



Image source:


Please enter your comment!
Please enter your name here