Skip to Content

There was a business requirement in our xRPM 4.5 SP6 implementation to send emails out on Gate approvals. The expectation was to provide xRPM item link in the email text so that user can click on the link and navigate directly to xRPM item.
There was no standard functionality available in xRPM to achieve this. SAP customer support confirmed that.

xRPM 4.5 item dashboard is built on ABAP WebDynpro  technology while item overview is  a Java WebDynpro application. We investigated how the control moves from item dashboard to item overview. We found that this functionality is based on Portal Eventing.  When a user clicks on one particular item in item dashboard, a portal even is fired. That portal event is subscribed by Java application to start Java WebDynpro application. We leveraged on SAP standard functionality to build our own functionality. The solution involved the following. A new custom ABAP WebDynpro component was created with URL parameter in the application to accept Item GUID

  • ABAP WebDynpro component reads the item attributes, prepares the event parameters and fire the portal event SetContextEvent (available in portal event namespace ‘urn:com.sap.pct.cprxrpm.wdrSetContextEventFire).
  • The event is fired at WDDOMODIFYVIEW event of the view ‘Main’.
  • This ABAP WebDynpro in isolation does not redirect to Item Overview screen of the xRPM item. The steps below are also needed. This application has to issue the portal event in portal environment so that it can be listened by Java WebDynpro application.
  • On xRPM portal, we created a portal page.
  • This portal page contains the i-view (type WebDynpro). This I-View renders the ABAP WebDynpro , we created above.
  • The Portal Page was configured to accept the parameter for item overview and pass it on to I-View to WebDynpro.
  • Now  the portal page URL can be sent ( with Item GUID) as parameter can be sent via email and it will redirect user to item overview page of xRPM item.
  • Navigation Panel  need to be added under dynamic navigation of the page.

 Please note the following.1. The format of the event parameter is as following.

  1. LinkId for item overview| item guid |  item name | item external id | ‘1’ | ‘False’
  2. Link Id for the item overview can be found from IMG-> SAP xRPM->Global Customizing->Process and Service setting->Define Navigation. Please data type for Link Id is N ( 4 digits).

2. Portal event via ABAP WebDynpro is fired using the interface IF_WD_PORTAL_INTEGRATION method FIRE.   

Added by author :-

There have been several comments where people tried the approach given in blog. They were able to fire the Portal even but even was not caught.  I am uploading the snapshots of Portal configuration depicting what needs to be done at portal side.

  • Create ABAP webdynpro iView, add iView to Page. Add page to Portfolio Management role.

image

” mce_src=”” alt=”Portal Configuration -1″ border=”” hspace=”” vspace=”” width=”” height=”” align=”” />

  • Navigation Panel  need to be added under dynamic navigation of the page.image

To report this post you need to login first.

11 Comments

You must be Logged on to comment or reply to a post.

  1. Vivek Pandey
    Hi Sharad,
    Many thanks for sharing this across on SCN. This blog is really helpful and is one of the most common requirements in RPM implementations.

    Regards,
    Vivek Pandey

    (0) 
  2. Prashant Verma
    Hi Sharad,
    we have built application as stated however portal doesnt seem to respond to event. Have we to place the PORTAL PAGE in same workset where other standard RPM pages reside ?

    iv_portal_event_namespace = ‘urn:com.sap.pct.cprxrpm.wdrSetContextEventFire’.
      iv_portal_event_name = ‘SetContextEvent’.
      iv_portal_event_parameter = ‘0121|DF16381F52916FF1A649005056A05754|RIH|BT N/W Update|A5I/00259|1|FALSE’.

    if l_portal_manager is BOUND.

      l_portal_manager->fire(
        EXPORTING
          portal_event_namespace = iv_portal_event_namespace
          portal_event_name      = iv_portal_event_name
          portal_event_parameter = iv_portal_event_parameter ).
    endif.

    (0) 
    1. Sharad Agrawal Post author
      No, it does not have to be in same workset but looks like your external id has ‘|’ character which might confuse event manager. Try with out that.
      (0) 
      1. Prashant Verma
        External ID is A5I/00259  there is no ‘|’ charachter in there ? Param list that i have pasted here is exactly what i get in debug mode when we click on the item link in the ITEM Dashboard.

        In case of your development where did you place your portal page? did u add it to any workset at all ?

        (0) 
        1. Sharad Agrawal Post author
          I just talked to portal resource who did the portal side development. I did the WDA development. As per him-
          “We added the page in the role under standard workset,not directly in the standard workset
          I believe it should not matter.

          The Path is Portfolio Management PMO role -> Portfolio Management Workset -> Portfolio Management Workset -> Item Overview Redirect Page”

          I hope it helps.

          (0) 
  3. Johannes Bacher
    Hello Sharad,
    Unfortunately I have the same problem as stated by Prashant. The portal (or RPM) does not respond to the raised event.
    I have tried to fire the event from a BSP page, then also from a WDA component, no effect.
    I can receive the event in another BSP page, so the event is actually fired.
    I compared the event parameters, they match exactly the standard event in the item dashboard.

    Is there anything else I could be missing ? any special configuration in the portal page or iview ?

    Your help is highly appreciated!
    Thanks,
    Johannes

    (0) 
  4. Pramod Gopisetty
    Hi Sharad,

    We followed all the steps in the blog.

    We are facing an issue with the custom Web Dynpro Application created for this purpose.

    I Created the iView and page and also the WDA App which accepts the parameters
    DRILLDOWN_LINKID,MY_OBJECTS_STRING,OBJECT_GUID,OBJECT_ID,OBJECT_NAME,OBJECT_TYPE,SCOPE_STRING

    And we are getting the parameters.

    We previewed the iView and appending the URL parameters to the URL of the iView and when previewing it is not taking to the Item Overview, basically it is not triggering the WDDOMODIFYVIEW of the application.

    Please suggest where are we doing wrong.

    And would appreciate if you can send the Portal definition of the iView and also the coding for the Custom WebDynpro App.

    Best Regards,
    Pramod

    (0) 
    1. Sharad Agrawal Post author

      Pramod,<br/>I have been several replies complaining about portal event not being fired. First thing, I want to make it clear we are on XRPM 450_700 SP 006, SAP_BASIS release 700 SP 0018.<br/><br/>Web dynpro Application- It has one parameter PROJECT_GUID. At the startup plug of main window, I have the following code.<br/>method HANDLEDEFAULT .<br/><br/>  data : l_item type /rpm/item_d,<br/>         l_context type /RPM/TS_OBJECT_HIER,<br/>         l_attributes type  /RPM/TS_ITEM_D_API,<br/>         l_lang type  LAISO.<br/><br/>  data : l_event_param type string,<br/>         l_guid_str type string.<br/><br/><br/>  if project_guid is initial.<br/>    exit.<br/>  endif.<br/><br/>  select single * from /RPM/ITEM_D into l_item where guid = project_guid.<br/>  if sy-subrc <> 0.<br/>    exit.<br/>  endif.<br/><br/>—–Fill the context and get all attributes<br/>  l_context-PORTFOLIO_GUID = l_item-PORTFOLIO_GUID.<br/>  l_context-parent_guid    = l_item-PORTFOLIO_GUID.<br/>  l_context-object_guid    = l_item-guid.<br/><br/>  l_lang = sy-langu.<br/>  CALL FUNCTION ‘/RPM/ITEM_DISPLAY'<br/>    EXPORTING<br/>      IS_CONTEXT    = l_context<br/>      IV_LANGUAGE   = l_lang<br/>    IMPORTING<br/>      ES_ATTRIBUTES = l_attributes.<br/><br/><br/>  DATA lo_nd_item_info TYPE REF TO if_wd_context_node.<br/>  DATA lo_el_item_info TYPE REF TO if_wd_context_element.<br/>  DATA ls_item_info TYPE wd_this->element_item_info.<br/>  DATA lv_item_guid LIKE ls_item_info-item_guid.<br/>   navigate from —–Issue portal event to launch Java webdynpro<br/>me->ONACTIONON_CLICK( exporting wdevent = ld_event ).<br/><br/><br/><br/>endmethod.<br/><br/><br/>DATA:<br/>    l_componentcontroller      TYPE REF TO ig_componentcontroller,<br/>    l_api_componentcontroller  TYPE REF TO if_wd_component,<br/>    l_portal_manager           TYPE REF TO if_wd_portal_integration,<br/>    iv_portal_event_namespace  TYPE string VALUE ‘urn:com.sap.pct.cprxrpm.wdrSetContextEventFire’,<br/>    iv_portal_event_name       TYPE string VALUE ‘SetContextEvent’,<br/>    lv_window_manager          type ref to IF_WD_WINDOW_MANAGER.<br/><br/><br/>  DATA lo_nd_item_info TYPE REF TO if_wd_context_node.<br/>  DATA lo_el_item_info TYPE REF TO if_wd_context_element.<br/>  DATA ls_item_info TYPE wd_this->element_item_info.<br/>  DATA lv_event_parameter LIKE ls_item_info-event_parameter.<br/> navigate from I hope it helps.

      (0) 
  5. AMITTEJA VUTPALA
    My requirement is almost similar but we have to call the role through FES and that should send through,however I tried the same to call a role through FES but faile any idea of how to achive this .

    Regards,
    Amit

    (0) 

Leave a Reply