Background:
As a process of Budget availability control, system issues warnings and mail notifications based on tolerance limits set up. The notifications displayed in standard system seldom understood by users owing to the fact that the content of message is not clear and straight forward as shown below.
The challenges in understanding the standard notification messages can be summarized as below:
Hence very often there are demands from clients for customized messages (in a form that can be easily understood by users) to be displayed in the process of availability control. The fact that the standard message text is unclear and not straight forward, the requirement seems quite reasonable.
As such there is no standard way provided by SAP for getting the customized message, I am going to explain how this can be achieved indirectly through development.
The Solution:
To explain the solution in a simpler way, I am taking an example of custom message requirement as below where the required message text is like this:
WBS Element xxxxxxxxx (name of WBS) budget threshold of 75% has been crossed.
Message No:BPxxx
Details:
For WBS Element xxxxxxxxx(name of WBS), xx% of the released budget for fiscal year YYYY has been reached.
Available budget for future spend is XXXX (currency).
Creating Custom Message:
The standard messages related to Availability control are defined in message class "BP" and message numbers ranging from 601 to 614. To get the custom message displayed, all these messages need to be replaced by a custom message created in the same class “BP”.
Replacing these messages can be easily handled by maintaining a set for the message numbers to be replaced. Advantage with set is that any changes can be easily done as part of ongoing maintenance.
Steps in creating custom message:
1. A set is created using tcode GS01 as shown below:
2. Create a custom message number 890 in same message class “BP” using transaction SE91.
3. Format Long text of message as required
4. Define the variables as required in the message display. In the above example, V1 is used for WBS code concatenated with description, V3 is for % of budget spent, V2 is for Fiscal Year and V4 is for available budget. Out of these only V2 is the standard variable and all others are custom defined.
Functional design for getting different variables in the messages:
WBS element details and description of WBS are ascertained from standard Function Module and table PRPS.
For getting the % of spent budget, below logic will be used:
Table BPJA- OBJNR= PRPS-OBJNR
BPJA-WRTTP=42, BPJA-GJAHR= FY in question
Assigned Budget = (BPJA-WLJHR + TBPJA-WLJHR)
Release Budget = BPJA-WLJHV
Currency=BPJA-TWAER
% Budget Spent = (Assigned Budget/ Release Budget) * 100
Available Budget = Release Budget – Assigned Budget
For Overall budget values: refer table BPGE with same logic
The % of spent and remaining budget are dynamically calculated each time the message is hit.
Embed the calculations in the code to display dynamic values based on real time data
5. The budget availability control is managed in the standard program and the required custom message is achieved through implementation of Implicit Enhancements.
Create implicit enhancements in Include: LBPFCM1 as shown below
These custom enhancements are meant to fulfill the below tasks in the same order:
6. Activate the enhancements and after activating the implementation, the custom message (BP 890) will be displayed as on-screen notification and also as external mail text.
Customized message as on-screen notification:
Message sent to external mail Id:
Sample Code for implicit enhancements for both LBPFCM1 and FM: BP_CREATE_MAIL for the above custom message is provided below
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
2 | |
2 | |
2 | |
2 | |
2 | |
2 | |
1 | |
1 | |
1 | |
1 |