100% found this document useful (3 votes)
5K views48 pages

TM PPF-Output Management

TM PPF Cookbook

Uploaded by

Sumit Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (3 votes)
5K views48 pages

TM PPF-Output Management

TM PPF Cookbook

Uploaded by

Sumit Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 48

SAP TM 8.

0
Consulting Session
Output Management in
SAP Transportation Management

OP Suite Transportation Logistics


December 2010

© SAP 2010 All rights reserved. / Page 1


Contents

1. Purpose

2. Overview

3. Solution Configuration
1. Post Processing Framework Configuration
2. Output Management Configuration and Setup
3. Output Management UI Configuration
4. BO/UI Enhancements to Integrate Output Management

4. Business Determination Rules


1. Action Profile Determination
2. Printer Determination
3. Partner and Language Determination
4. Generating Actions
5. Executing Actions

5. Output Execution from Business Object

6. Appendix

© SAP 2010 All rights reserved. / Page 2


Purpose

 Enable different types of output


 External communication (such as printouts, faxes, and e-mails with a document preview
option), alerts for certain business events, workflow items, A2A/B2B communication, BI
data upload, trigger events to SAP Event Management systems
 Simple configuration of:
 Print forms

 Business decisions for scheduling and executing output

 Data extraction to print forms


 Output of business documents with the following capabilities:
 Automated, rule-based dispatching of outbound communication in response to certain
business events such as order creation, tendering request release, and so on

 Preview of output in user interface scenarios

 Archive output dispatched in relation to business documents

 Store actual print files (PDF or other) in the archive system for bookkeeping and subsequent
references

 Mass output from a worklist

© SAP 2010 All rights reserved. / Page 3


Overview

 Output management adapter (developed in the SAP_BS_FND layer): enables output for a given BO
node developed in the BOPF environment

 Output management (SAP_BS_FND_ 702) uses the Post Processing Framework (PPF), which
enables:
 The PPF to be connected at the level of individual BO nodes
 The PPF action profiles to be set up on a BO node-specific basis and specified as critical or non-critical

TM 8.0 based on BS_FND 7.02


BO Model PPF

PPF Application
Service Consumer – (/SCMTMS/TRANSP_MGMT)

Web Dynpro UI Business Object


1

1
BOPF Framework – * *
Consuming BOs 1 * PPF Action Profile
Node
(Context Definition)

PPF Adapter for Output 1 1


Management (Suite Foundation) * * 0..1 PPF Schedule
Cond
Action PPF Action Definition 1
(Trigger Type)
0..1
NetWeaver 1
PPF Start cond
One or More PPF Action
profiles can be assigned
*
to any Business Object
Node Instance PPF Processing Type

© SAP 2010 All rights reserved. / Page 4


Post Processing Framework

Output can be triggered by the PPF either manually from the UI or automatically in
the back end depending on the document-specific schedule conditions.

© SAP 2010 All rights reserved. / Page 5


Post Processing Framework
BAdI Interfaces
BAdI Name Implementation Name Filter Value SCMTMS- Description
Specific
EVAL_SCHEDCOND_P /BOFU/PPF_STD_EV_SCH /BOFU/EVAL_SCHEDULE_CO Evaluates the business
PF NDITION determination rules used to select
the actions that are to be
generated
EVAL_STARTCOND_PP /BOFU/PPF_STD_EV_STA /BOFU/EVAL_START_CONDIT Evaluates the business checks to
F ION determine when the generated
output is to be dispatched
COMPLETE_PROC_PP /SCMTMS/COMPLPROCPPF Action Profile; Action Yes (see the For processing completion
F (/SCMTMS/*) note below)
PRINTER_DETERM_PP /SCMTMS/PPF_STD_PRNT Action (/SCMTMS/*) Yes (see the Determines the printer used to
F note below) print the action
EXEC_METHODCALL_P /BOFU/PPF_STD_METHOD /BOFU/PPF_STANDARD Executes actions with the Method
PF Call processing type
GET_PARTN_ROLES_P /SCMTMS/PPF_PARTN_RL PPF Application; Profile Yes; this is Retrieves the possible partner
PF checked once functions of the application
during PPF
configuration
and is,
therefore, a
separate
implementation
DOC_PERSONALIZE_B /BOFU/PPF_STD_DOCBCS /BOFU/PPF_STANDARD Retrieves data from the business
CS object and customizes the
document
ALERT_EXIT_LOCAL_P /BOFU/PPF_STD_ALERT Action Profile, Action Yes (see the Reads application data for an
PF (/SCMTMS/*) note below) alert
Note: For customer-specific implementations of the BAdIs with filter values other than /SCMTMS/*, the method implementation must contain the code
present in the corresponding standard implementation (the call to the BAdI facade and, therefore, the call to the agent class). For more information
about the BAdI facade and agent class, see the “Output Management Callback Mechanism” slide.

© SAP 2010 All rights reserved. / Page 6


Post Processing Framework
Configure the PPF Adapter for Output Management

© SAP 2010 All rights reserved. / Page 7


Post Processing Framework
Define Action Profiles and Actions

Transaction: SPPFCADM
Application: /SCMTMS/TRANSPORTATION

© SAP 2010 All rights reserved. / Page 8


Post Processing Framework
Action Profile

© SAP 2010 All rights reserved. / Page 9


Post Processing Framework
Define Action Definition

© SAP 2010 All rights reserved. / Page 10


Post Processing Framework
Define Action Definition: Important Settings
 Processing Time
 Processing when saving document – processing can be started once the document has been
posted.
 Processing using selection report – actions are initially scheduled only and processing is not
started until later using a selection report or by a user in the document.
 Immediate processing – processing can be started immediately when an action is scheduled.
 Schedule Automatically – If you select this indicator, the actions are automatically activated for
processing as soon as the schedule conditions are met. If the indicator is not selected, the person
responsible must manually activate the actions in the application document for processing.
 Changeable in Dialog – If you do not select this indicator, actions within this action definition
cannot be changed manually after automatic determination.
 Executable in Dialog – If you do not select this indicator, actions within this action definition can
only be executed automatically, either immediately after scheduling or later using a selection report.
 Partner-Dependent – Partners are determined for partner-dependent actions. The specified partner
function is compared to the function of the document partner and an action is generated only if the
partner functions match. If you select the Partner-Dependent indicator, you must enter a partner
function.
 Partner Function – The rights and responsibilities of each partner in a business transaction. The
relevant partner roles for an application can be communicated to the PPF by implementing the BAdI
GET_PARTN_ROLES_PPF.

© SAP 2010 All rights reserved. / Page 11


Post Processing Framework
Define Action Profile, Action Definition, and
Processing Type

© SAP 2010 All rights reserved. / Page 12


Post Processing Framework
Condition Configuration

Before PPF actions can be triggered, you must configure the conditions.

© SAP 2010 All rights reserved. / Page 13


Post Processing Framework
Condition Configuration: Overview

Action definitions must be maintained with their individual configuration settings.

© SAP 2010 All rights reserved. / Page 14


Post Processing Framework
Condition Configuration: Processing Details 1
Processing details are transferred from the action definition and can be modified.

© SAP 2010 All rights reserved. / Page 15


Post Processing Framework
Condition Configuration: Processing Details 2
You can specify the (e-mail or fax) recipients for external communication.

© SAP 2010 All rights reserved. / Page 16


Post Processing Framework
Condition Configuration: Processing Details 3
You must specify a valid printer in the PPF conditions so that actions can be printed.

 If the Printer Determinat. indicator is selected, the printer is determined in the following order:

 Implementation of BAdI PRINTER_DETERM_PPF

 Printer setting in the condition configuration

 Printer setting in the user profile

 A standard implementation is available with the filter value /SCMTMS/* for the BAdI
PRINTER_DETERM_PPF, and so the Printer Determinat. Indicator is selected automatically.

 For customer-specific BAdI implementations, make sure that the indicator is selected for the action
definitions.

© SAP 2010 All rights reserved. / Page 17


Post Processing Framework
Condition Configuration: Schedule Conditions

 The schedule condition determines whether an action is to be scheduled for processing. An


action is only generated if the schedule condition is met.
 The filter value is specified in the Schedule Condition field. The standard value
/BOFU/EVAL_SCHEDULE_CONDITION ensures that the method in the agent class is
invoked.

© SAP 2010 All rights reserved. / Page 18


Post Processing Framework
Condition Configuration: Start Conditions

 The start condition is checked before an action is executed. The action is only executed if
the start condition has been fulfilled.
 The filter value is specified in the Start Condition field. The standard value
/BOFU/EVAL_START_CONDITION ensures that the method in the agent class is invoked.

© SAP 2010 All rights reserved. / Page 19


Post Processing Framework
Application Log

You can view PPF messages in the application log (transaction SLG1).

© SAP 2010 All rights reserved. / Page 20


Post Processing Framework
Application Log
Type of Log Log Display Control Parameter

Output Management UI list of messages /BOFU/TRACE


Adapter Log displayed
PPF Determination Log Not displayed on the UI; PPF_PROTOCOL_SAVE
Use transaction SLG1 to
view the log
PPF Processing Log Displayed in the message Always enabled
log on the output
management UI

© SAP 2010 All rights reserved. / Page 21


Output Management Adapter
Navigation Path

© SAP 2010 All rights reserved. / Page 22


Output Management Configuration and Setup

Assign the output agent and agent class at BO node level.

© SAP 2010 All rights reserved. / Page 23


Output Management Configuration and Setup
Assign Action Profile to BO Node

Assign the action profile to the BO node.

© SAP 2010 All rights reserved. / Page 24


Output Management Configuration and Setup

 The application layer uses the output management adapter to communicate with
the PPF layer in order to execute outputs.

 In order to execute the output, the PPF requires application-specific information


and provides various exits (BAdIs) for this information.

 The consuming application has to implement the exits so that application data can
be transferred to the PPF.

 All of the relevant action-level exits (PPF exits) are hard-wired (that is,
permanently connected) to the corresponding methods in the agent class
specified in the Customizing settings for the output management adapter.

 This facilitates the implementation process for the customer.

© SAP 2010 All rights reserved. / Page 25


Output Management Configuration and Setup
Redefining the Agent Class

 The agent class provides the PPF with the application data relevant for executing outputs.

 Standard class /BOFU/CL_PPF_SERV_FOR_BO must be extended by the application and


the relevant methods redefined.

 The methods enable the logic to be implemented by either ABAP or BRFplus.

© SAP 2010 All rights reserved. / Page 26


Output Management Callback Mechanism

PPF Exits

PRINTER_DETERM_PPF
PPF
PPF
Exits EVAL_SCHEDCOND_PPF

...

BAdI Facade Class


Aggregation
Methods:
Standard BAdI
Implementations IF_EX_ALERT_EXIT_LOCAL_PPF~GET_ALERT_DATA

IF_EX_EVAL_STARTCOND_PPF~EVALUATE_START_CONDITION


Output Agent for BO Node Customizing

Agent Class

Methods

/BOFU/IF_PPF_SERV_FOR_BO~DETERMINE_PRINTER

/BOFU/IF_PPF_SERV_FOR_BO~CAN_SCHEDULE_ACTION

© SAP 2010 All rights reserved. / Page 27


Output Management UI Configuration

The output management user has to perform certain steps to display the output management UI
as a tab page on the main user interface:
1. Create a cross-BO association with the output management BO in BOPF.
2. To configure the output management UI for the consuming application:
a) Call transaction SE84.
b) Choose Web Dynpro → Application Configurations.
c) In the Application Configuration field, enter the application configuration of the consuming BO.
d) Choose Execute.
e) Select the name of your application configuration and choose Display.
f) Choose Start Configurator. A Web Dynpro launches.
g) Choose Change and then Go to Component Configuration.
h) On the Component Configuration screen, choose Add UIBB.
i) Specify the attributes for the user-interface building block (UIBB).
j) Return to the Component Configuration screen and choose Add Wire.
k) Specify the wire attributes for the wire between the consuming application UI and the output
management UI.

© SAP 2010 All rights reserved. / Page 28


BO/UI Enhancements to Integrate Output
Management
Associations:
 /BOFU/CL_C_PPFOC_ROOT_XBO_NI  node-level association. This enables the node-
level output content
 /BOFU/CL_C_PPFOC_ROOT_XBO_RI  root-level association. If you have root-level
association, all of the node-level output content is aggregated and displayed at root level.

© SAP 2010 All rights reserved. / Page 29


Business Determination Rules
Action Profile Determination

 Multiple action profiles can be assigned to a business object node in the


Customizing settings for the output management adapter.

 Multiple action profiles can also be configured in the application layer.

 However, the precise action profiles that are relevant to the scenario must be
communicated to the PPF. For example, it is possible to have separate action
profiles depending on the mode of transport. For a freight order with the mode of
transport Road, the specific action profile must be communicated to the PPF.

 Callback method GET_PROFILES () in the agent class must be redefined so that


the correct action profiles are returned to the PPF.

© SAP 2010 All rights reserved. / Page 32


Business Determination Rules
Printer Determination

 There are multiple ways of determining the printer for external communication
outputs in output management.

 The printer is determined in the following sequence:


 Printer determination BAdI result
 Static printer configuration in the condition Customizing for the PPF
 User profile setting

 Printer determination BAdI:


 Implementing the BAdI PRINTER_DETERM_PPF by redefining the
DETERMINE_PRINTER method of the agent class
 The DETERMINE_PRINTER () method of the agent class is invoked only if the filter value
is specified as /SCMTMS/*.

© SAP 2010 All rights reserved. / Page 33


Business Determination Rules
Partner and Language Determination

 For partner-dependent actions, the partner role is specified in the Customizing


settings for the PPF action. In order to determine the business partner and the
details for the partner role specified for the business document, you must redefine
callback method GET_DOCUMENT_PARTNERS () of the agent class.

 In order to execute an action (external communication) in a language other than


the default language, you must redefine method
GET_LANGUAGE_FOR_EXT_COMM () of the agent class.

© SAP 2010 All rights reserved. / Page 34


Business Determination Rules
Generating Actions

 The PPF executes outputs in two steps:


 Action generation (scheduling)
 Action execution

 Before actions are generated, the consuming application can apply business
checks and rules to determine the relevant actions for which output can be
triggered for a scenario.

 This is achieved by the schedule conditions exit provided by the PPF.

 Filter value /BOFU/EVAL_SCHEDULE_CONDITION must be set in the condition


configuration in the Customizing settings for the PPF.

 Callback method CAN_SCHEDULE_ACTION () must be redefined for the agent


class.

© SAP 2010 All rights reserved. / Page 35


Business Determination Rules
Executing Actions

 Once actions have been generated but before they are executed, the consuming
application can apply business checks and rules to determine which of the
generated actions can be executed.

 This is achieved by the start conditions exit provided by the PPF.

 Filter value /BOFU/EVAL_START_CONDITION must be set in the condition


configuration in the Customizing settings for the PPF.

 Callback method CAN_START_ACTION () must be redefined for the agent class.

© SAP 2010 All rights reserved. / Page 36


Output Execution from Business Object

 Output management UI features

 Manual output from the UI


 Immediate print
 Scheduled outputs

 Automated output

 Mass output

© SAP 2010 All rights reserved. / Page 37


Output Execution from Business Object
UI Features
The following features are managed on the UI:

 Relevant actions for a business document

 Action details for selected actions

 Message log

 Archive link and log display for processed actions

 Document preview for unprocessed actions

 E-mail text

 Generation, activation, or deactivation of actions prior to manual execution

 Change to the printer, communication partner, output language, and recipients


prior to execution

© SAP 2010 All rights reserved. / Page 38


Output Execution from Business Object
Manual Outputs: Immediate Print

 Manually execute a print action directly from the document

 Ignores schedule and start conditions

 Does not save any history

© SAP 2010 All rights reserved. / Page 39


Output Execution from Business Object
Manual Outputs: Scheduled Outputs
 Can be monitored and scheduled from the UI depending on the schedule conditions (business conditions)
and executed later depending on start conditions (again, business conditions such as the lifecycle status)

 Can be dependent on or independent of the partner

 Document history is saved and can be viewed, monitored, and managed on the output management UI

Actions listed after


validating schedule
conditions

Start conditions
are evaluated
before execution

© SAP 2010 All rights reserved. / Page 40


Output Execution from Business Object
Automated Outputs

 Can be scheduled from the back end depending on the schedule conditions (business
conditions) and executed later depending on start conditions (again business conditions
such as the lifecycle status)

 Can be dependent on or independent of the partner

 Actions are scheduled automatically and these actions can be viewed on the output
management UI

 Document history is saved and can be viewed and monitored on the output management UI

 Attachments can be sent to the e-mail recipient along with the document. Attachments can
be added to the document in the DOC_PERSONALIZE_BCS BAdI implementation. There
are two ways to do this:
 Static uploaded attachments from the condition configuration can be attached.
 Attachments already attached to the BO in the Attachment folder can be attached.

© SAP 2010 All rights reserved. / Page 41


Output Execution from Business Object
Mass Output

Mass output of unprocessed actions can be triggered from the worklist.

© SAP 2010 All rights reserved. / Page 42


Appendix
TM-Specific Configuration
Action profiles can be assigned to the document type for freight orders and forwarding orders.

However, method GET_PROFILES () of the agent class must be implemented and the relevant action profiles
must be returned to the PPF so that output can be triggered.

© SAP 2010 All rights reserved. / Page 43


Example of Output Management in
Outbound Shipper Scenario

Shipper Shipper Carrier


(SAP ERP) (SAP TM) Approval workflow (Third-Party)
Create sales order
Receive
and create outbound
transportation request
deliveries
Print, e-mail, or fax
Forwarding order and
Send outbound Plan confirmation
deliveries transportation requests document
and calculate
transportation charges

Planning activities

Send freight
order via B2B
communication
Create Receive transportation
transportation orders request

Send/Cancel RFQ via B2B


communication
Confirm order and
Transportation
provide tracking
execution
Transfer freight settlement updates
Print/E-mail/Fax
document via B2B House Air Waybill
communication Master Air Waybill Legend:
Freight invoice and Labels for Packaging
(Re-)Calculate Output management
freight invoice Print, e-mail, or fax Shipping Manifest
transportation charges CMR Road Waybill (Europe) deployed
verification freight settlement
document VICS Road Waybill (U.S.)
House Sea Bill of Lading
Master Sea Bill of Lading
© SAP 2010 All rights reserved. / Page 44
Appendix
TM-Specific Guidelines

Note:

In SAP Transportation Management, PDF forms are used as standard. PDF forms do not
support dot matrix printers. For more information, see SAP Note 1009567.

If you want to use a dot matrix printer, you must use Smart Forms.

© SAP 2010 All rights reserved. / Page 45


Navigation Path to Printing Settings in
Customizing for SAP Transportation Mgmt
The Customizing settings for SAP Transportation Management contain the IMG
activity Notes for BAdIs, in which the existing implementations of the business add-
ins used for printing are described.

© SAP 2010 All rights reserved. / Page 46


Appendix – Comparison Between Output
Management in TM 7.0 and TM 8.0
No. Pain Points in TM 7.0 SAP Solution in TM 8.0

1 PPF only handles one instance at a time. A2A/B2B communications and BI posting are processed in the same LUW as
Mass dispatch of documents (B2B) is not possible. the BO main process application.

Root causes: Print, fax, and e-mail output is processed as a background job (after-commit).
• Output triggers and processing of output triggers are generated
in the same LUW. Collective send of BI content for all related application data records.
• For each application record, a separate RFC queue is opened to
send BI content.

2 Evaluation of schedule, start conditions, and relevancy checks as The new BRFplus expression type, RetrieveBOData, has been introduced.
BAdI implementations
BO/node-specific service class (BNSC) developed to implement interface
Root cause: /BOFU/IF_PPF_SERV_FOR_BO. This enables profiles to be selected on the
As a reuse framework, PPF only supports callbacks to the basis of the application status and partners to be extracted on the basis of the
application through application-specific BAdI implementations. An BO node.
application may have generic BAdI implementations, which in turn
depend on application-specific configuration settings.

3 Print from UI (immediate printing), preview, and display from Output History, Preview, and Immediate Print/Send functions are enabled in TM
archive features are not available. 8.0 using DO PPF Output Content.

© SAP 2010 All rights reserved. / Page 47


Appendix
Components and Frameworks Used

Name Description Software Component Implications


BOPF Business Object Processing Framework SAP_BS_FND None
(AP-RC-BOF / CA-EPT-BOF)
PPF Post Processing Framework SAP_BASIS None
(BC-SRV-GBT-PPF)
BRFplus Business Rules Framework SAP_BASIS None
(BC-SRV-ASF-FOI-FDT)
ALM SAP Alert Management System (BC-SRV-GBT- SAP_BASIS None
ALM)
BCS Communication Services: E-Mail, Fax, SMS, SAP_BASIS None
Telephony
(BC-SRV-COM)
SFP Forms Processing SAP_BASIS None
(BC-SRV-FP)

© SAP 2010 All rights reserved. / Page 48


Appendix
References
 Output Management Guide 702 (detailed information)
 PPF Customizing Guide
 PPF Modeling Guide

© SAP 2010 All rights reserved. / Page 49


Thank you!

© SAP 2008 / Page 50

You might also like