Start of Content Area

Background documentation Object-Based Navigation (OBN)  Locate the document in its SAP Library structure

The structure of SAP Enterprise Portal content is based on roles. You can browse through the user-specific navigation structures using the top-level navigation and the detailed navigation. Portal navigation allows you to navigate between different iViews or pages in any application running as a portal content (that is, any page or iView).

In many cases it is sufficient to use either relative or absolute navigation to navigate to a specific iView or page. However, sometimes more flexibility is required. For this purpose, you have Object-Based Navigation, which allows you to define navigation steps at a higher semantic level. Instead of defining a concrete target URL, you call a particular operation of a particular Business Object.

You configure in the portal which concrete iView (or which page) is to be used for executing this operation. This configuration can be role-specific or user-specific. The Web Dynpro application itself passes on solely the name of the business object and the operations linked to it.

In Web Dynpro for ABAP, the integration of object-based navigation is very similar to the integration of Portal Eventing. To trigger the navigation itself, the Web Dynpro Framework provides a service that can be called from the application. This service, like Portal Eventing, is part of the portal manager.

Triggering Object-Based Navigation

You can activate object-based navigation of the portal in Web Dynpro ABAP by calling the method NAVIGATE_TO_OBJECT of the portal manager (interface IF_WD_PORTAL_INTEGRATION). You can generate an appropriate template using the Web Dynpro Code Wizard, in which you then enter values.

  data lr_componentcontroller type ref to ig_componentcontroller .

  data l_api_componentcontroller type ref to if_wd_component.

  data lr_port_manager type ref to if_wd_portal_integration.

 

  lr_componentcontroller =   wd_this->get_componentcontroller_ctr( ).

  l_api_componentcontroller = lr_componentcontroller->wd_get_api( ).

  lr_port_manager = l_api_componentcontroller->get_portal_manager( ).

 

  call method lr_port_manager->navigate_to_object

    exporting

      system                 = navigation_data-system

      object_type            = navigation_data-object

      operation              = navigation_data-operation

      object_value_name      = navigation_data-object_value_name

      object_value           = navigation_data-object_value

      business_parameters    = bus_parameter_list

      forward_obn_metadata   = navigation_data-forward_obn_metadata.

 

Only two parameters are required for the navigation:

      SYSTEM

Specify the system (or the system alias) the business object is assigned to.

      OBJECT_TYPE

Specify the business object you are using.

All other parameters are optional.

      OBJECT_VALUE

There are usually a large number of different instances for a single business object, as is the case for the business object Customer for example. You use this parameter to specify which specific customer (for instance, use the customer number) is to be used for the object-based navigation step.

      OPERATION

You use this parameter to specify which operation is to be used for the object-based navigation step.

      OBEJCT_VALUE_NAME

The specified object value is transferred as a URL parameter to the OBN step. The standard name of this parameter is ObjectValue. You can change this name if you want.

      BUSINESS_PARAMETERS

As well as specifying the object value, you can define other parameters that are to be forwarded by the OBN step. An example of a parameter string you could define is: Mode=Edit&ShowHeader=false.

These parameters can be used by the target of the OBN if the operation of the business object has been prepared accordingly (see below under the section Maintaining the Target Application in the Portal.

      FORWARD_OBN_METADATA

It is sometimes useful if OBN target receives more details about the current navigation step. For instance, if you implement an application that serves for implementing different operations performed on a business object, the application must know which operation was triggered by the OBN step. Therefore, you can pass on the following parameters:

       obn.system

The system the business object is assigned to.

       obn.bo_type

The business object itself

       obn.operation

The respective operation If the default operation is used, the value is _default_.

Maintaining the Target Application in the Portal

The target application is maintained in the portal for the respective operation of the business object. This is usually done by the portal administrator.

For business parameters of a WDA target application you use the Application Parameters defined for the Web Dynpro ABAP application. If you want to assign application parameters in the startup plug of the application dynamically, you can find them in the documentation for the application.

Example

You can find an example in the system in Web Dynpro Component WDR_TEST_PORTAL_NAV in Web Dynpro application, WDR_TEST_PORTAL_NAV_OBN.

Role-Based Navigation Selection

Execution of the navigation is thus dependent on the customizing for the role settings in the portal. For example, the user of a role could have the authorization for displaying and editing the content of a page, while the users of another role might only be allowed to display the content. If a user triggers object-based navigation, but does not belong to a role that has authorization for the respective operation, an appropriate error message will appear. So as to make the user interface as user-friendly as possible, it is a good idea – from the very start – not to provide this operation for the user in question. For this purpose, however, the information for the authorization of the respective operation must be got by the portal. This can be done using a Web service that is called from the Web Dynpro ABAP application using the class CL_WDR_PORTAL_OBNWEB_SERVICE.

 

Web Dynpro Framework also offers an additional class:

CL_WDR_PORTAL_OBNWEB_VI. This class also accesses a Portal web service; unlike the class mentioned above, however, it includes a range of enhancements to the use of information about navigation options, in accordance with the users' different roles.

You can find more information about CL_WDR_PORTAL_OBNWEB_VI in the class documentation in the system.

 

 

End of Content Area