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.

budget 1.png

The challenges in understanding the standard notification messages can be summarized as below:

  • The budget amount displayed is at times very confusing
  • No direct indication of available budget
  • The standard text does not provide the name of WBS element which is most prominently used for tracking by business

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:

/wp-content/uploads/2016/05/bac2_946141.png

2. Create a custom message number 890 in same message class “BP” using transaction SE91./wp-content/uploads/2016/05/bac3_946148.png

3. Format Long text of message as required

/wp-content/uploads/2016/05/bac4_946150.png

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

/wp-content/uploads/2016/05/bac5_946152.png

These custom enhancements are meant to fulfill the below tasks in the same order:

    1. Replacing standard message numbers maintained in set with the custom message BP 890
    2. Concatenating WBS text to WBS number
    3. Storing the dynamic variables such as % of budget spent and available budget in message
    4. Customizing message text being sent to external mail as part of FM: BP_CREATE_MAIL

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:

/wp-content/uploads/2016/05/bac6_946153.png

Message sent to external mail Id:

/wp-content/uploads/2016/05/bac7_946154.png

Sample Code for implicit enhancements for both LBPFCM1 and FM: BP_CREATE_MAIL for the above custom message is provided below

To report this post you need to login first.

7 Comments

You must be Logged on to comment or reply to a post.

  1. Rajat Patil

    Nice One Raghu…Detailed and well explained document.

    I want to know one query…you shown message sent to external mail ID.

    How we can do this? and is it possible to send this budget message to more than one user as currently it will send message only to one user as a part of standard in SAP inbox.

    (0) 

Leave a Reply