Wednesday, March 23, 2011

Changing the Work Area Title of an overview page

In the CRM Webclient, every overview page you call has a caption in the header. This caption gives you information of the data below. For instance, in the BP_HEAD/BPHEADOVERVIEW, the account number and the address is shown. In the BT126H_CALL/SALESCALLOVVIEWSET for instance, the information is the transaction type and transaction description.

In some cases you might want to add information to this Work Area Title. This would be particularly useful if you are dealing with information that is important to the agent, but is not available in any assignment block. For instance, you might consider:
  • Calling ERP te retrieve the total due amount for this customer
  • Add the age of the customer if this is relevant
  • Add the current customer lifecycle
  • Add the customer's segment
  • Add the customer's loyalty points
  • Add the userstatus of the transaction
If you want to do this, you should find the relevant window (so not the overview page itself), and enhance the method IF_BSP_WD_HISTORY_STATE_DESCR~GET_STATE_DESCRIPTION under the node "Breadcrumbs and Messages".

As always, it is preferred to first call the super class (have SAP do it's own coding), and after that add information to the description. Use the typed context to read information from the BOL.