Profit Simulation for Settlement Requests 
Use
A profit simulation enables you to calculate the expected surplus from an agency business transaction that you have entered in a settlement request (single settlement request or settlement request list). This function is combined with status control for the agency document. Depending on the outcome of the profit simulation, the system assigns a status that determines how the document is subsequently processed.
Prerequisites
The following settings must be made in Customizing for Agency Business to ensure that profit simulation is carried out correctly.
The following data must be entered in the profit groups:
The profit analysis type defines, for example,
The status group combines a number of application statuses. It is used as a reference in the payment type to define which possible application statuses a document can have with regard to profit simulation (see below). The following entries must be maintained for the status group:
You can enter separate text descriptions for the application statuses.
The internal status defines what effect the relevant application status has on the subsequent processing of the document, that is, whether the system can create follow-on documents.
In addition, the following entries must be maintained for profit analysis and status control in Customizing for the Payment Types.
The status group defines the number of possible application statuses that can be assigned to a settlement request. From the various application statuses, you can select the status (e.g. default status) that you want to use for the payment type in question:
This field defines the status that the system automatically enters as the default value when you create a document.
This field defines the profit analysis type that is valid for the payment type in question.
In this field, you define the default value that is displayed if the result of the profit analysis is positive.
In this field, you define the default value that is displayed if the result of the profit analysis is negative.
Features
In Customizing, you can define minimum margins for a positive outcome of an agency business transaction entered in a settlement request.
You can maintain separate statuses that define the profit simulation for the document as positive or negative, which you use to block or release documents for subsequent processing. You can enter texts for these application statuses in Customizing.
In addition, you can define whether profit simulation is to be carried out automatically or manually. For further information, see
Carrying Out Profit Simulation Automatically and Carrying Out Profit Simulation Manually.In the document display, you can display the result of profit simulation as a message list or overview tree.
In addition, reports RWLF8004 and RWLF8005 are available for carrying out profit simulation for a user-defined number of documents. The list display then contains the result for each document involved. From here, you can go to a detailed view that represents the analysis as an overview tree or message list.
Business Transaction Events
Process interface 00420001 is available for the calculation of profit during profit simulation. This enables you to replace function module WLF_PROFIT_SIM_WITH_BALANCE, provided by SAP for profit calculation, with your own function module.
As a result, you can adapt the standard profit simulation process to your own requirements without having to modify the program coding. Several function modules can be attached to a process interface. The following priorities apply when calling function modules:The customer-specific function module has call priority, followed by the partner function module, followed by the function module provided by SAP.
Use sample function module SAMPLE_PROCESS_00420001 provided in the standard system as a template for your customer-specific or partner function module. This contains documentation that makes programming easier.
For further information, see the documentation for the implementation guide (IMG) on Agency Business under Use Business Transaction Events.