Registration

Dear SAP Community Member,
In order to fully benefit from what the SAP Community has to offer, please register at:
http://scn.sap.com
Thank you,
The SAP Community team.
Skip to end of metadata
Go to start of metadata

Introduction

This How to Guide explains how to start the Web Client UI with a particular component and optional data. For example how a URL must be entered to display the overview page of a particular contact person in the workarea of the WebClient UI.

Customers can benefit of this feature when it comes to using non SAP Portals where they want to have links that directly launch specific components.

The URL described here can only be used to launch a new Web Client UI session. Triggering navigation within an existing sessions is not supported. 

Terminology

Within CRM the term URL parameter is often used for key value pairs following the ? in the URL separated by &. However since these parameter are part of what is officially called query (see RFC 3986 - Uniform Resource Identifier (URI): Generic Syntax ) the term query parameter is used within this How to Guide. 

How to Use

Make sure you collect all the necessary parameters for the particular component you want to call and that all necessary customizing and code is there to support this feature. This is described further down.

Now type a URL according to the description below into a browser window.

URL Composition

protocol://host:port/{service path or alias}/default.htm?{mandatory query parameters}[{optional query parameters}]

{service path or alias}:

  • All      releases: service reference /sap/crm_logon
  • before      SAP CRM 7.0: service path /sap/bc/bsp/sap/crm_ui_frame or any service reference or external alias pointing to it
  • from      SAP CRM 7.0 on: service path /sap/bc/bsp/sap/crm_ui_start or any service reference or external alias pointing to it

In all of the following cases the parameter saprole can be used to specify the business role within the url

Using Object Types and Action with Optional Business Data Identifier

Only this way allows to call a component to display particular business data. Flexible approach as targets for object type and action are role specific.

Mandatory Query Parameter

Define the following mandatory query parameters:

  • Query      parameter for object type: crm-object-type
  • Query      parameter for object action: crm-object-action

These parameters determine the target component. The targets are defined in transaction CRMC_UI_NBLINKS (Define Navigation Bar Profile). Select a navigation bar profile and choose Define Generic OP Mapping.

Note
The navigation bar profile must be assigned to the appropriate business roles in transaction CRMC_UI_PROFILE (Define Business Roles).

Example
Call Contact Person Search in CRM: crm-object-type=BP_CONTACT&crm-object-action=A

Optional Query Parameter

The following parameters are optional. They allow to pass a single name-value pair (mostly an identifier of a business object) to target component. This is always necessary when calling the display action since the component must know what data should be displayed.

  • Query parameter for object value: crm-object-value
    This is the actual value for the field that is used to determine the business object (for example, Business Partner ID: 112)
  • Query parameter for Object Key Name: crm-object-keyname
    This is the name of the field that is used to determine the business object

These parameters must identify a unique data object (for example, an account). A data object is represented internally by a business object layer (BOL) entity.
Once you have specified the query parameters, an application specific mapper class is called to find a corresponding BOL entity with that name-value pair. If successful the BOL entity is passed to the target component so it can use the data.

Note
There is no list or table where you can see all possible key names to determine the BOL object as each mapper class is individually programmed. The only way is analyzing the code of the mapper class.

Example
Display Account in CRM: crm-object-type=BP_ACCOUNT&crm-object-action=B&crm-object-value=3274&crm-object-keyname=PARTNER
Given a business partner with ID 3274 exists in the system

Using Logical Link Identifier (new from SAP CRM 7.0 on)

A logical link from navigation bar customizing is targeted directly. The target is fix. The logical link must be assigned to the business role the user has chosen in the running session. If not, an error message is raised. Since this way does not allow transferring additional data to the target component, certain logical links e.g. to overview pages won't work.

This feature actually came out of the requirement to offer easy access menu favorites in the sap gui. In the easy access menu there is an option in the menu under Favorites->Add other objects. Select URL type CRM WebClient Application. A popup dialog allows to select the logical link id and a optional business role for the favorite. Double click the new favorite to get a URL that matches description below.

Mandatory Query Parameter

Define the following mandatory query parameters:

  • Query parameter for the logical link identifier: crm-logical-link

Example
Display opportunity search in CRM: crm-logical-link=SLS-OPP-SR

Result

The target will be displayed as long as valid query parameters have been specified.

Prerequisite

In order to provide access via URL using object-type/-action as described above an ABAP OO Class must exist and must be assigned to the object type in the customizing described below

Mapper Class Definition

The mapper class must implement the interface IF_CRM_UI_OBJ_MAPPER. The method IF_CRM_UI_OBJ_MAPPER~GET_ENTITY_FROM_UI_OBJECT is responsible to take the parameters provided in crm-object-keyname and crm-object-value and convert them into an object that implements interface IF_BOL_BO_PROPERTY_ACCESS. The application frame will call that method, receive the object entity and add it to the collection that is passed to the target component.

The algorithm inside of the method is defined by the individual application area and the result object must be understood by the target component.

Example
Business Partner. Method CL_CRM_BUPA_UIU_OBJ_MAPPER->GET_ENTITY_FROM_UI_OBJECT is able to understand all fields that are defined in the BOL query 'BuilHeaderSearch'. This is a great example for other implementations.

Customizing

The following customizing entries are necessary to determine the target and to find the mapper class. The sequence below is how the customizing is searched at runtime. For an implementation the reverse sequence is to be used.

Target Determination

Use transaction CRMC_UI_NBLINKS (View cluster CRMV_UI_NB) for 1. and 2.


       

  1. Using object types and action

Select the navigation bar profile (navbar profile) under Define Profile and select Define Generic OP Mapping. An entry for the particular object type and action combination must be defined here. It hast to point to a logical link identifier (2.) or directly to a target identifier (3.).

2. Using logical link identifier or coming from 1.

The particular logical link identifier must be defined under Define Logical Links and point to a target identifier.

3. Definition of target identifier

The target identifier must be defined in the workarea component repository (Transaction CRMC_UI_WA_COMP_REP or view cluster CRMVC_UI_COMP).

Mapper Class Determination

1. Getting the BOL entity name according to the given object type

The object type must be defined in either maintenance view Define UI Object Types BSPDLCVC_OBJ_TYP (Customer) or BSPDLCV_OBJ_TYPE (SAP). The customer's definition has a higher priority than SAP's definition. The object type must be assigned to a BOL object name (2.) in that definition.

2. Finding the BOL object's mapper class

The BOL object name must exist in maintenance view Define Object Mapping CRMV_UI_OBJ_MAP (Customer) or CRMV_UI_OBJ_MAPS (SAP) with an existing mapper class assigned

Example

The following example describes how to call the CRM overview page for an account and the necessary customizing to make it work within the role sales professional (SALESPRO).

  • URL: ...default.htm?crm-object-type=BP_ACCOUNT&crm-object-action=B&crm-object-value=3274&crm-object-keyname=PARTNER&saprole=SALESPRO
  • Transaction Define Business Role CRMC_UI_PROFILE
    • Business role SALESPRO has navigation bar profile SLS-PRO
  • Transaction Define Navigation Bar Profile CRMC_UI_NBLINKS
    • Profile SLS-PRO has object type BP_ACCOUNT and action Display (B) assigned with target id MD-BP-OV
    • No logical link necessary as direct target assignment
  • Transaction Define Work Area Component Repository CRMC_UI_WA_COMP_REP
    • Component/Window BP_HEAD_MAIN/MainWindow has an inbound plug OVERVIEW with the target id MD-BP-OV
  • Maintenance view Define UI Object Types BSPDLCV_OBJ_TYPE (SAP)
    • Object type BP_ACCOUNT is assigned to BOL object name BuilHeader
  • Maintenance view Define Object Mapping CRMV_UI_OBJ_MAPS (SAP)
    • External object name BuilHeader uses mapper class CL_CRM_BUPA_IC_OBJ_MAPPER
  • Mapper class CL_CRM_BUPA_IC_OBJ_MAPPER implements interface method IF_CRM_UI_OBJ_MAPPER~GET_ENTITY_FROM_UI_OBJECT

FAQ

Question: How can I find all mapper classes?
Answer: Call transaction SE80 and display interface IF_CRM_UI_OBJ_MAPPER. Open Implementing Classes in the repository browser tree

Question: Is there a list or table where I can find all possible key names for a particular object type?
Answer: No. Each mapper class is individually programmed. The only way is analyzing the code of the mapper class.

Question: Why is the target component not displayed
Answer: There are several potential causes if the settings described above are not complete. Here are two most common errors:

      • The target is not active or not included in the particular business role
      • There is no matching business object fitting to object key name and object value. Some applications throw an error message, other just trigger a "default back" navigation which will not be visible to a user and the default view of the business role will be shown instead.

 

 

5 Comments

  1. Hi,

     

    I've a question I need to jump directly to a certain BP in change mode, but it seems that there's no configuration for EDIT?

    I tried to map to the OVERVIEW outbound plug, but it has no effect (sad)

     

    regards

    Meex

  2. Former Member

    It's great. Thanks for the detailed information .

  3. Former Member

    Hi ,

    I am trying to build  webUI URL with parameters where object type is for order creation and I am trying to populate the Sold to party field. I am able to open create sales order page with URL but sold to party is not getting populated with value I am passing.

    http://xxx:yyy/sap/bc/bsp/sap/crm_ui_start/default.htm?crm-object-type=BT115_SLSO&crm-object-action=D&crm-object-value=XXXXXXXX&crm-object-keyname=SOLDTO_NAME

    Sold to party not getting populated with sold to party number I am sending. 

    I tried as an example different scenario to display sales order by passing sales order # in URL and its absolutely working fine. 

    Is above scenario to populate field while creation valid? Which parameter is wrong in above case?

     

    Thanks,

    Madhura

     

    1. Former Member

      Hi Joshi,

      have you found a way to pass additonal values like the sold-to party when creating the order?  

      Thanks,

      Renate

  4. Former Member

    Very helpful information. Thank you Hassan!