Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Bernhard Knuth
Version 1.0
Integrating PSCD-Objects
Content:
1 Introduction.......................................................................................................................3
2 Objective............................................................................................................................3
3 Prerequisites.....................................................................................................................3
5.10 Step 9: Assign Blueprint View to the Role of the Portal User......................................................11
6 References......................................................................................................................12
7 Glossary............................................................................................................................12
Page 2
Cookbook – Enhancements of CRM Case Management for Public Sector
1 Introduction
The business scenario CRM Case Management for Public Sector enables employees of a governmental
administration to process complex cases – such as a tax audit case. Tax information for a constituent or a
local company is kept in mySAP Public Sector Collection and Disbursement (PSCD) – based on R/3
technology using the SAPGUI for Windows for user interaction. On the other side, CRM Case Management
is based on mySAP CRM and was developed for the People-centric User Interface (PC-UI). Due to the
different methods of user interaction, it is a challenge to manage information from PSCD in CRM Case
Management.
This cookbook should help to understand, which steps to do in customizing – without modification – to get
information from a PSCD system (or any other R/3 system) displayed in CRM Case Management. It is
targeted for technical consultants.
2 Objective
This cookbook should demonstrate the flexibility of the SAP component CRM Case Management. It guides
through an example of how to enhance the SAP standard scenario by individual customer requirements. In
this example, information from a CRM-external system should be displayed in a CRM case.
Assuming, we have a Remote Function Call (RFC) – f.e. a BAPI – which retrieves data from the external
system. Every single step in customizing is described to get this data displayed in a case. The cookbook
follows this sample scenario and should enable you – as a technical CRM consultant – to set up similar
solutions – as required by your customer.
This enhancement is done without modification of the SAP standard functionality. It adds a blueprint view
using the Blueprint Application Builder (BAB). The blueprint view is set up for a user role in the SAP
Enterprise Portal.
What is not in focus is how to maintain data in the external system. Data is in display mode only. The next
step – for future cookbooks – would be how to update data in non-CRM systems.
Please note this cookbook was created on a SAP CRM system Release 4.0 with SP04 (based on a
WebAS 6.20 SP30) and a SAP EP 5.0. If you use it on a different release, some navigation, wording etc.
might have changed. Any feedback on this is highly appreciated (mailto:bernhard.knuth@sap.com).
3 Prerequisites
Following prerequisites should be fulfilled.
CRM 4.0 - including an EP 5.0 (or EP 6.0) - and PSCD system installed
Portal role which accesses CRM Application CRMD_CASE set up
Demo user for the Caseworker or Case Manager which is assigned to the portal role as well
as to the SAP role ‘SAP_BC_CM_USER’ (or ‘SAP_BC_CM_ADMINISTRATOR’)
CRM case type customized
Case created
Business Partner created and added to case in CRM
Business Partner with same ID exists in PSCD
Business Partner has Contract Account Information maintained
RFC Destination from CRM to PSCD exists.
Furthermore, to perform the example in this cookbook, your development user in CRM must be authorized to
create development objects and maintain cross-client table entries. Have
o a package,
o a function group,
o a customizing transport request, and
o a workbench transport request
created, so you can transport all development objects afterwards.
Page 3
Cookbook – Enhancements of CRM Case Management for Public Sector
Little knowledge about ABAP programming and creating elements in Data Dictionary are required.
Screen shot 1 displays the CRM Case with the standard view on related business partners – as it can be set
up using regular IMG customizing.
Page 4
Cookbook – Enhancements of CRM Case Management for Public Sector
How this tabstrip ‘PSCD-Account-Info’ was set up is described in the following steps.
Page 5
Cookbook – Enhancements of CRM Case Management for Public Sector
We will use an IMG customizing activity to change the standard case application ‘CRMD_CASE’. For this
(and the following steps), use transaction /nCRMC_BLUEPRINT_C, or navigate via the customizing IMG
(/nSPRO and F5) to ‘Customer Relationship Management’ -> ‘Layout of User Interface (People-centric UI)’.
Navigate to ‘Application/Layout’ -> ‘View’.
Switch to change mode (Ctrl + F1).
Create ‘New Entries’ with
o View ’ZCSC_PSCD’ and
o Description ‘View for PSCD objects’.
In this IMG customizing activity, you create all events for tab pages, fields and buttons that are for interface
elements of the People-Centric UI that trigger an event. For our example, we will use the event for tab pages
only. Use transaction /nCRMC_BLUEPRINT_C.
Navigate to ‘Application Element’ -> ‘Event’.
Switch to change mode (Ctrl + F1).
Create ‘New Entries’ with
o Event ’ZCSC_CMG_TAB_PSCD’ – unique identifier,
o Description ‘Layout-relevant’, meaning the triggered event only influences the layout,
o no Object Link,
o no Navigation Event and
o Unlock Object ‘No Data Loss Popup’, since we will not set up any navigation in our tabstrip,
and
o Text ‘PSCD-Account-Info’, as we will name our new tabstrip (compare with screen shot
above).
Page 6
Cookbook – Enhancements of CRM Case Management for Public Sector
We will use our in step 1 created screen structure to build up a field group structure.
Using transaction /nCRMC_BLUEPRINT_C
navigate to ‘Application Element’ -> ‘Field Group’ -> ‘Field Group’.
Switch to change mode (Ctrl + F1).
Create ‘New Entries’ with
o Field Group ’ ZCSC_CMG_PSCD’ – unique identifier,
o Description f.e. ‘Case Man.: PSCD Objects’,
o now, use the horizontal scroll bar to get to the column Structure Name and enter
ZCSC_CRMT_PSCD_CTRACPSOBJECT .
o Leave the further columns Compress and Variants with their default value.
Navigate to ‘Application Element’ -> ‘Field Group’ -> ‘Field Group Structure’ and select Work Area
ZCSC_CMG_PSCD and switch to change mode (Ctrl + F4).
For each component of the structure ZCSC_PSCD_CTRACPSOBJECT (which is returned by the BAPI)
we need to create one entry with numbering the
o Screenposition f.e. ‘10’, ‘20’, …, ‘100’.
o Fld Grp Variant and View can be left blank.
o Field Name has to be the same as the component in ZCSC_CRMT_PSCD_CTRACPSOBJECT,
o Fieldtype is an ‘Inputfield’,
o URL Type and Unlock Object should be left as defaulted to ‘Portal Link’ and ‘No Data Loss
Popup’ (we are not using ‘Object Link’ at all since no navigation will be set up), and
o Height detail and Length detail stay initial.
o The following check boxes should be left initial – except ‘Not Changeable’ and ‘Not in List’.
Every component is for display only and should not be changeable. Which ever component
(i.e. Field Name) should not be displayed in overview mode must be ticked with ‘Not in List’.
Then, the component will only be shown when switching via the ‘Detail Toggle’ into detail
mode.
The layout of the field group has to be generated afterwards. Navigate to ‘Application Element’ ->
‘Field Group’ -> ‘Layout Generation’ and select Field Group ZCSC_CMG_PSCD and set all other
fields and check boxes to blank.
In our example, we add an entry only valid for our view. The standard case application will not be changed.
Only users, which will have this view (depending on their role), will see this tabstrip.
Using transaction /nCRMC_BLUEPRINT_C
navigate to ‘Application/Layout’ -> ‘Define Application Layout’ and select ‘CRMD_CASE’.
Switch to change mode (Ctrl + F4).
(if no standard entry is shown, import ‘S Table Entries’ by Ctrl + F12.)
Create a new entry for
o View ’ZCSC_PSCD’,
o Event ’ZCSC_CMG_TAB_PSCD’,
o Position ’Detail Area 1’ (which is the position shown in screen shot above),
o Screen Variant – no entry in our example (they are used in very special requirements only),
o Scrn Elmnt Type ‘List’,
o Field Group ‘ZCSC_CMG_PSCD’,
o Toolbar Group – no entry, since no push buttons (except the ‘Detail Toggle’) will be offered,
o Tab Page Group ‘CMG_MAIN’,
o Search Grp, DocuClass, and Object ID – no entry,
Page 7
Cookbook – Enhancements of CRM Case Management for Public Sector
o Structure Name – as defined for the selected Field Group – cannot be changed anyhow.
FUNCTION Z_IBS_PS_READ_PSCD.
*"----------------------------------------------------------------------
*"*"Local interface:
*" IMPORTING
*" REFERENCE(IV_BUPA) TYPE BU_PARTNER
*" TABLES
*" PSOBJECTLIST STRUCTURE ZCSC_PSCD_CTRACPSOBJECT
*"----------------------------------------------------------------------
types: begin of bapi_struc,
SIGN type BAPISIGN,
OPTION type BAPIOPTION,
LOW type BU_PARTNER,
HIGH type BU_PARTNER,
end of bapi_struc.
data: ls_partner_list type bapi_struc,
lt_partner_list type table of bapi_struc,
ls_bapiret2 type BAPIRET2 occurs 0.
ls_partner_list-sign = 'I'.
ls_partner_list-option = 'EQ'.
ls_partner_list-low = IV_BUPA.
append ls_partner_list to lt_partner_list.
ENDFUNCTION.
The code sets the imported id of a single business partner into appropriate format. Then, the BAPI is
called via Remote Function Call (RFC). The destination 'PSCD_CL100' has to be set up via
transaction /nSM59 before (see chapter on ‘Prerequisites’).
Page 8
Cookbook – Enhancements of CRM Case Management for Public Sector
Object-oriented ABAP (ABAP-OO) allows reusing major functionality by creating a sub-class, which inherits
most of the needed functionality. This ensures that standard functionality will be maintained through Support
Packages, and can be extended without modification.
Create the new model access class with transaction /nSE24
enter ZCL_CRM_BSP_CMG_ACCESS_PSCD as unique identifier,
click on icon to ‘Create Inheritance’ – located on the top right of the creation popup – and enter
CL_CRM_BSP_CMG_ACCESS as Superclass, a Description f.e.’ Model Class for PSCD Extension’,
Instantiation ‘Public’, check Class Type ‘Usual ABAP Class’, tick Final, and leave Only Modeled
blank.
Add an attribute to the class, like ‘GT_CRMT_PSOBJECT’ as ‘Instance Attribute’ and ‘Protected’
‘Type’ ‘ZCSC_CRMT_PSCD_CTRACPSOBJECT_T’. With this attribute, we can ensure that once
the data is read via RFC from the PSCD system it is buffered in CRM until the user selects a
different case to work with.
Switch to tab ‘Methods’ and re-define method IF_CRM_BSP_MODEL_ACCESS_IL~READ. Set cursor
on this method (not double-clicking) and select icon ‘Redefine’ which brings you to the source code.
The coding could look like this:
method IF_CRM_BSP_MODEL_ACCESS_IL~READ .
Page 9
Cookbook – Enhancements of CRM Case Management for Public Sector
* Part Four: merge PSCD data into screen structure (i.e. into attribute of class)
loop at lt_psobject into ls_psobject.
move-corresponding ls_psobject to ls_crmt_psobject.
move ls_psobject-PSOBJECTKEY to ls_crmt_psobject-object_key.
append ls_crmt_psobject to lt_crmt_psobject.
endloop.
gt_crmt_psobject = lt_crmt_psobject.
endif.
This sample coding consist of data definition and five parts (as highlighted):
1. Checks if PSCD data was read before.
2. After a function call gt_rec_hier has all objects linked to the case record. With node type
‘INSTANCE’ and anchor ‘C1’ all attached business partners are filtered. The id of the first
business partner found will be moved to lv_bu_partner. This is just for the demo example. It
is not likely that this can be taken for a real scenario.
3. The function module of the previous step is called. That step, i.e. the creation of a function
module including function group, can be avoided by inserting the source code directly into
this part.
4. The data is converted into to the structure for the PC-UI and moved into the global attribute
of our model access class.
5. The final part has to be done regardless of the check in part 1. It moves the list of PSCD
objects into the screen structure of the PC-UI.
In our example, ‘CRMD_CASE’ is the standard application set for Case Management. Since we added our
new tabstrip in a new blueprint view, we do not have to add our Tab Page Group to the application set.
Neither have we set up a Toolbar Group nor a Search Group, which we would need to assign in the IMG
customizing step. But we need to assign our model access class to the application set.
Page 10
Cookbook – Enhancements of CRM Case Management for Public Sector
5.10 Step 9: Assign Blueprint View to the Role of the Portal User
The final step is done in portal administration. If the portal is not installed yet, the scenario can be tested
without the portal.
By setting up the access for any user via the SAP Enterprise Portal, an External Service for the CRM
application CRMD_CASE must have been established (see chapter on ‘Prerequisites’). It should look as
screen shot 3 shows.
appl=CRMD_CASE&sap-syscmd=nocookie
appl=CRMD_CASE&sap-syscmd=nocookie&BLVIEW=ZCSC_PSCD
Page 11
Cookbook – Enhancements of CRM Case Management for Public Sector
If the SAP Enterprise Portal is not installed yet, it is possible to test the view by calling transaction /nSE80
select ‘BSP Application’ ‘CRM_BSP_FRAME’,
click on ‘Pages with Flow Logic’ -> ‘select.htm’
right-mouse-click -> ‘Test’,
log on with end-user id and password,
select ‘Case Management’ (or ‘CRMD_CASE’), and
add ‘&BLVIEW=ZCSC_PSCD’ at the end of the URL. This URL could look similar to this:
‘http://iwdf9391.wdf.sap.corp:1080/sap/bc/bsp/sap/crm_bsp_frame/entrypoint.do?
sap-client=750&appl=CRMD_CASE&BLVIEW=ZCSC_PSCD’.
As soon as a single case is selected, the new tabstrip should appear.
6 References
Online documentation Basis Case Management: http://help.sap.com
Documentation on BAPIs http://ifr.sap.com à Component SAP IS-PS-CA
7 Glossary
Term Definition
BAB Blueprint Application Builder
PC-UI People Centric CRM User Interface
BAPI Business Application Program Interface
RFC Remote Function Call
EEWB Easy Enhancement Workbench
DDIC ABAP Data Dictionary
WebAS Web Application Server
PSCD Public Sector Collection and Disbursement
Page 12