Status Management in Marketing Plan Objects
For several marketing plan objects the status management is one of the key indicators for defining the business process. Depending on the object type, campaign or trade promotion, the current status either triggers any business transaction or determines which business transactions can be executed for that marketing project. In trade promotion management for example the status 'released' triggers the conditions generation, whereas in campaign management a campaign that is not released must not be executed. Depending on the object type the status management does have different meaning and is used differently.
Further there is a difference between user and system status. A user status defines and triggers the process, whereas the execution is controlled by system status only. That means once a user status is set, a business transaction is triggered that sets the corresponding system status. A user status therefore has only descriptive meaning, the user status describes the process, whereas the user status controls the business process. Depending on the customizing the online user can set user status only, system status only or can set both, user and system status.
Status Management Customizing
The customizing is the same for all marketing plan object types. In case user status are used the same need to be defined in the user status profile. This is available in the following customizing path:
Customer Relationship Management
Marketing Planning and Campaign Management
Define Status Profile for User Status
The Status Profile needs to be enabled for each MKTPL Object type:
The status profile can be used for the allowed object types only. In that case the status profile can be used for trade promotions, but not for trade promotion templates.
The user status profile contains all available user status for a marketing project. This includes the following fields:
- status order number
- status ID and short text
- lowest and highest status number: a status has a certain order number, the lowest and highest status number define which status can be set from a certain user status
- authorization key: defines which authorization is required to set a certain user status
- business transaction: business transaction that is triggered by setting the user status
Table TJ30 contains the mapping of a certain user status to the technical ID such as E0001.
The status profile can be assigned to the marketing plan object type or can be assigned manually. The assignment happens with the following customizing:
Customer Relationship Management
Marketing Planning and Campaign Management
This contains the assignment of the user status profile. Further the marketing plan object type defines whether system status can be set directly or if the control is done via user status only.
User Status Management
The example shows a trade promotion with a user status profile assigned. On creating the trade promotion the initial user status is set.
This comes from the user status profile customizing.
From this status system allows to set the following status.
When the trade promotion type customizing is changed to hide the system status only the user status appear in the status drop down list.
The user status that is available in the drop down list is controlled by the lowest and highest status number in the customizing.
The next user status allows more different status to be set.
Once any user status triggers a business transaction, the same sets the system status as defined in transaction BS33.
Setting the user status APTP 'Promotion Approved' triggers business transaction CAPR 'Approved' which sets the system status I1122 'Approved'.
In case the user status that is to be set triggers any business transaction that must not be set with the current status, the user status cannot be set as well. The affected user status is filtered from the drop down list for selecting the status.
In addition to the user status there are several system status that may be set directly in the marketing plan object. The available system status depend on the lifecycle of the marketing object. Depending on the mentioned customizing the system status can be set directly or can be hidden to the user.
The list of allowed system status is built in CL_CRM_MKTPL_STATUS_COLL=>GET_PERMITTED_CHANGES.
The following system status are available:
- Created CRTE: initial status for new marketing projects
- Released REL: released for the operative execution of the marketing activities
- generates conditions in a trade promotion
- Finished FSHD: the marketing project is finished/completed
- does no longer allow changes
- lower level marketing projects need to be finished as well
- Rejected CNC: the marketing project is canceled
- rejected status can be set for released projects only
- lower level marketing projects need to be rejected
- Locked LCK: locks the marketing project
Business Transaction System Status Dependencies
If a user status triggers a business transaction, the business transaction may be dependent on any system status. A marketing plan that is in status I1004 'released' must not execute business transaction CREL, since the same system status I1004 is set by business transaction CREL. This is mainly depending in the system status set by the business transactions.
The following table shows the dependencies:
|Business Transaction||Business Transaction Description||System Status||Status Description||Check Active|
|CREL||Release||I1004||Released||system status must not be active|
|CSIM||Release Simulation||I1327||In Simulation||system status must not be active|
|CCLS||Finish||I1008||Closed||system status must not be active|
|CCLU||Reset Finish||I1008||Closed||system status must be active|
|CLKS||Lock||I1121||Locked||system status must not be active|
|CLKU||Unlock||I1121||Locked||system status must be active|
|CAPR||Approve||I1122||Approved||system status must not be active|
|CCNS||Reject||I1124||Cancelled||system status must not be active|
|CCNU||Reset Rejected||I1124||Cancelled||system status must be active|
Status Design in Marketing Plan Objects
When a new marketing project the status customizing is read and the status object is generated. This is created in CRM_STATUS_OBJECT_CREATE. Other than for other marketing project data sets the status profile is stored in the general status object table CRM_JSTO only. There is no marketing project specific table available. Depending on the status customizing the initial status entries are created in table CRM_JEST.
Whenever any marketing plan object is accessed system determines any possible status that can be set to the object. This happens in the following coding:
The list of available status can be modified using BAdI CRM_MKTPL_OL_OBJ interface method CHANGE_VALUEHELP_ENTRIES.
Any status that sets business transaction 'Change Attributes' CGCH to forbidden, prohibits any further changes in the marketing project.
There are no changes allowed other than status changes.
Setting any status that sets CGCH is set to forbidden requires a change of the marketing project. This can be from any user status, with the transaction control or from setting system status rejected or finished.
The status design can be influenced using BAdI CRM_MKTPL_OL_OBJ. Both methods STATUS_CHANGE_BEFORE and STATUS_CHANGE_AFTER provide an option to influence the status processing and can prevent any status or business transaction from being set.
Status Management in Trade Promotion Management
Status Driven Events
In trade promotion management there are several processes and events that are driven by setting a status. Those so called status driven events are defined in the following customizing:
Customer Relationship Management
Trade Promotion Management
Define Status-Driven Events
These events are triggered depending on a certain user or system status.
Further information on status driven events is available with the following SAP notes:
Status for Funds Management Integration
If funds management is integrated most function are triggered by status driven events. Further information about the funds management integration set up is available in the following doc: Funds Management Integration in CRM Trade Promotion Management
As a brief overview the following event handlers are required:
- FUND_ASSOCIATION_HANDLER: triggers fund determination, if funds are returned, the fund assocication is generated
- FUND_USAGE_GENERATION_HANDLER: generates fund usage for reserving funds, on setting the relevant status
- FUND_PREAPRE_POSTING_HANDLER, FUND_POSTING_HANDLER: responsible for creating fund postings
- FUND_USAGE_FINALIZATION_HANDLER, CSR_USAGE_FINALIZATION_HANDLER: triggered on finishing or rejecting a trade promotion, balances fund usage, ensures that all claims associated with a trade promotion are settled before the trade promotion
Status for Generating Conditions
Campaign determination conditions and pricing conditions are generated on simulating or releasing a trade promotion. The system status I1004 REL 'Released' can either be set directly or can be triggered by any user status with executing business transaction CREL 'Release'.
Pricing conditions can be regenerated with triggering business transaction CCND 'Generate Conditions'. This can be used for automatically generating conditions after any changes are done. The CCND business transaction can be used for an 're-released' user status.
Status 'in simulation'
The status 'in simulation' is available for trade promotion objects only. Trade promotions with status 'in simulation' have the system status I1327 CSIM 'In Simulation' assigned. This is used to simulate the conditions generation in trade promotions. The trade promotion generates PR and CD conditions but cannot be used - the condition records are generated for simulation reasons only.
Once the status I1327 CSIM 'In Simulation' is set, the initial status I1001 CRTE 'Created' is deleted. This comes from the business transaction CSIM 'Release for Simulation'.
If no user status profile is used, that set an initial status the the trade promotion is in status I1327 only, after setting to 'in simulation'. Therefore only business transactions allowed for status I1327 can be performed.
Delete Trade Promotions
Certain trade promotion status may prevent the trade promotion from being deleted. This can either be controlled by the user status, by the system status or by certain assignments that forbid the trade promotion from being deleted.
From the user status the deletion of the trade promotion can be forbidden with setting the business transaction 'Delete Element' CEDL to forbidden for a certain user status:
For the system status the deletion of the trade promotion must be allowed via the transaction control of the system status.
When trying to delete the trade promotion system checks all active system status in the trade promotion. If none of the active system status does allow the deletion the trade promotion must not be deleted.
This happens for trade promotions in status 'in simulation'. The status I1327 CSIM 'In Simulation' does not allow to delete trade promotions. This comes from the transaction control:
Since the business transaction business transaction 'Delete Element' CEDL is not explicitly allowed for the status, the trade promotion must not be deleted.
An error is raised accordingly.
The same is valid for released trade promotions. A released trade promotion with conditions created can never be deleted. System checks the trade promotion conditions assignment. In case conditions are created the trade promotion must not be deleted. An error is raised accordingly.
A similar design is valid for moving a trade promotion like when setting a new parent element for a trade promotion. System checks both user and system status if the business transaction 'Move Objects' COMV is allowed for the trade promotion. For trade promotions in status I1327 CSIM 'In Simulation' the COMV business transaction is not allowed explicitly.
The trade promotion therefore must not be moved and an error is raised accordingly.
The status 'rejected' and 'finished' can be set for released trade promotions only.
Status Management in Campaign Management
A campaign that is not released cannot be executed. The campaign needs to be released first.
Other than for trade promotions, campaigns that are released but not yet executed can be deleted.
Status Dependencies in Marketing Plan Hierarchies
If there is a certain marketing plan hierarchy there status dependencies between the different hierarchy levels.
If any lower level project is released the higher level projects need to be in released status as well. Otherwise releasing the lower level project won't work. The same is valid for moving marketing projects. When moving a released project under an unreleased project an error is raised as well.
The check on the higher level projects for any status change is performed in CL_CRM_MKTPL_STATUS_COLL=>OBJECT_CHECK_ACTIVITY. For releasing the check is performed in CL_CRM_MKTPL_STATUS_COLL=>OBJECT_CHECK_RELEASE.
If any higher level project is finished or rejected the lower level projects need to be in rejected or finished status. Otherwise rejecting or finishing the higher level project won't work.
If undoing the rejected status in any lower level project the higher level projects must not be in rejected or finished status. Otherwise rejecting or finishing the higher level project won't work
Hide System Status
It might be required to hide the system status for the user. In that case the user status should be displayed. There are the following options available:
- Hide system status customizing set for the campaign type.
- Using BAdI CRM_MKTPL_OL_OBJ interface method CHANGE_VALUEHELP_ENTRIES. This approach is documented in the following notes:
1335228 - Hiding System Status in Marketing Applications
1338896 - Sample BAdI Implementations: Hide system status
There are some known issues related to the status management in marketing plans. The issues should be solved with the following SAP notes:
This document should provide an overview about status management in CRM Marketing Plan objects. In case you feel anything is missing, or anything is unclear please let me know.