This document gives step by step guidance for fact sheet enhancing and customizing in SAP CRM.
The fact sheet provides you with an immediate and condensed overview of information about business partners taken from several sources such as business partner master data, statistical and transaction data, derived from SAP CRM, SAP ECC, and SAP NetWeaver BI. It enables you to see quickly and easily the most important details about your customers.
Here I want to show how you can enhance fact sheet in SAP CRM by adding assignment blocks. For example I will take standard assignment block "Addresses" with technical name BP_ADDR/CorpAccountAddressesOV and add it to the fact sheet BP_ACCOUNT_FS.
To add the assignment block BP_ADDR/CorpAccountAddressesOV to the bsp component BP_FACTSHEET you need to create a new assignment block in BP_FACTSHEET and make it’s classes as inherits from the classes of BP_ADDR/CorpAccountAddressesOV.
Transaction code: BSP_WD_CMPWB
On the Component Structure Browser click right mouse button on Views and then click Create.
In the field Name enter the name of the assignment block "CorpAccountAddressesOV" (or another if you want)
After press Continue until the end, it doesn’t need to fill other fields.
2. The next step is to inherit the classes of new assignment block from appropriate classes of the assignment block BP_ADDR/CorpAccountAddressesOV.
For ZL_BP_FACTS_CORPACCOUNTAD_IMPL->Superclass specify CL_BP_ADDR_CORPACCOUNTADD_IMPL: double click on Implementation Class ZL_BP_FACTS_CORPACCOUNTAD_IMPL, choose tab Properties, click on edit-icon than Change Inherit. In the field Superclass specify class CL_BP_ADDR_CORPACCOUNTADD_IMPL
Now we need to redefine method WD_CREATE_CONTEXT. Go to tab Methods, find method WD_CREATE_CONTEXT and press button Redefine.
Enter the following code:
And activate it.
For ZL_BP_FACTS_CORPACCOUNTAD_CTXT->Superclass specify CL_BP_ADDR_CORPACCOUNTADD_CTXT
activate (may be you’ll need to exit and enter the assignment block to be able to see the context nodes).
Now you need to redefine methods CREATE_BUILHEADER, CREATE_BUILADDRESS, CREATE_EMAILADDRESSESTO of ZL_BP_FACTS_CORPACCOUNTAD_CTXT class. That’s because the context nodes 'ACTIVEADDRESS', 'PARTNER', 'EMAILADDRESSESTO' are used in component controller BP_ADDR and they aren’t in component controller of bsp component BP_FACTSHEET. So delete the call of method owner->do_context_node_binding:
Activate class ZL_BP_FACTS_CORPACCOUNTAD_CTXT.
In the tab page Page Attributes add attributes:
BuilAddress TYPE REF TO CL_BP_ADDR_CORPACCOUNTADD_CN01
BuilHeader TYPE REF TO CL_BP_ADDR_CORPACCOUNTADD_CN00
EmailAddressesTo TYPE REF TO CL_BP_ADDR_CORPACCOUNTADD_CN02
If cannot create plug-in you can do this another way: create method IP_DEFAULT in class ZL_BP_FACTS_CORPACCOUNTAD_IMPL with parameter IV_COLLECTION Importing Type Ref To IF_BOL_BO_COL
Parameter IV_COLLECTION contains the entity "BuilHeader".
In the method IP_DEFAULT make data set:
Activate this method.
In Configuration tab create new configuration and add the fields you need in Displayed fields, then save the configuration (may be you’ll need to exit and enter the assignment block to be able to see tab Configuration).
BSP Application - BP_FACTSHEET
View - CorpAccountAddressesOV
You will need to enter the following data:
ID - ToAddress
View - MainWindow
View - BP_FACTSHEET/CorpAccountAddressesOV
Inbound Plug - DEFAULT
Click right mouse button on folder InboundPlugs and choose Add Plug with Follow Up Navigation
Inbound Plug - Address
Navigational Link ID - ToAddress
Save Runtime Repository Editor.
Transaction code SPRO
then: Customer Relationship Management -> UI Framework->UI Framework Definition -> Fact Sheet -> Maintain Fact Sheet
Choose BP_ACCOUNT_FS and enter the folder View Assignments
Press New Entries and enter the following data:
Component Name - BP_FACTSHEET
Interface View - MainWindow
Inbound Plug - ADDRESS
Title - Business partner addresses (you can name it as you wish)
Press "enter", if the warning "Choose the key from the allowed namespace" appears – ignore it (you should press "enter" again). Save changes.
Component BSP_DLC_FS is a Controller for Component BP_FACTSHEET.
Transaction code: BSP_WD_CMPWB
Component : BSP_DLC_FS
In the view BSP_DLC_FS/factsheet, open tab Configuration, press edit button and in dropdown list box Fact Sheet choose Account Fact Sheet (BP_ACCOUNT_FS)
Press Search and in table Result List choose the configuration you need (may be you will need to create a new configuration) and press Next.
On step 3 Assign Views find assignment block Business partner addresses and add it to Fact Sheet Views
Then press Finish button.