Add Custom Forms in TM + PPF
This blog is about the post processing framework PPF. You will learn:
-what the different vocabulary used in the ppf context mean
-how you can add a custom pdf form to the TM (Transportation Management) freight order document. For example, you want to print an additional document from the road freight order that is not there in standard.
PPF Customizing Path
To reach the ppf customizing, you can use the following path:
For TM, you choose the application /SCMTMS/TRANSPORTATION:
Then, you choose the button “define action profile & actions. the action profile has all actions (formerly output types) that shall be related to a given freight order. an action can be a form, a message or a follow-up action.
You come to the detail screen. In this case, we have deleted all standard actions and replaced tthem with custom actions. Alternatively, you can also de-activate them. Each new action starts with Z.
When you select one action and choose processing types, you come to the following screen where you can define the type of follow-up. In case of PDF forms, it is external communication. in the below screen, you must assign the form. it has to be created in SFP beforehand.
This screen shows other alternatives such as “Method call” where you can assign a method (program that is executed by the ppf action). You can also trigger an alert (mail to business partner) or an XML. But, be are aware that these ppf actions are called at the first save and new saves. So, performance has to be considered. You can use schedule conditions to check whether the ppf shall be called. But, even the check of this condition is done more often then a status change that you may use to trigger something. For the forms, it is ok, you can trigger the form from the cockpit print button.
To call the custom form, you also need to change the output agent in the following path:
Form call in Method
Then, you can change the method “personalize_doc_by_abap” which can you can find here (SE24):
in the method, you can use the following coding to call the custom action: The class starting with ZCL can be used to select the data required.
To make this work, you have to define the following attributes:
Assignment to FO type
Then, you have to assign the action profile to the FO type in the following path:
Scroll down in your FO type and assign the profile as follows:
Test the new Form
Now, you can go to the fiori tile “create freight order” and create a new freight order. The action profile will be read and you can go in change mode and to the tab “Output Management”. Use button “Generate” and “Actions including condition checks”. The system will generate the actions in the unprocessed actions.
now, you can use the glasses to display the form as follows:
The form is displayed as follows (I have cleared all data for confidentiality reasons).
PPF has a lot more features. But, I thought I make a blog with the basics.
In this blog post, you have learned how to create a custom action profile, how to assign actions to it and how to assign your adobe Form to it. Now, you should be able to do the customizing that is required to add a new pdf form into the road freight order in transportation management.
you can refer to the following links for further content about PPF
To see further of my content