Skip to Content
Hi Friends,
in one of my post, I talked about how to open ABAP webdynpro page via pop up window to resolve a real customer issue.
Now I have another solution to navigate to ABAP webdynpro page via CRM navigation framework.
The CRM navigation framework is using a so-called navigation object which can tell framwork what the target UI view and the respective operation ( Display, Edit, Search etc ). The navigation object relies heavily on CRM ui concept like UI object type, BOR and BOL type which do not make sense for a ABAP Webdynpro page.
So the main idea of this solution is, to use a wrapper CRM ui component which encapsulate ABAP webdynpro page and make configurations to achieve the navigation from source UI component to the wrapper component. After the wrapper component is opened, it will then open ABAP webdynpro page itself.
/wp-content/uploads/2013/11/clipboard1_319752.png
The finaly result would look like below:
/wp-content/uploads/2013/11/clipboard2_319753.png
compared with the solution in my previous blog, this solution does not need any enhancement on standard UI component, instead only several customizing work
( with corresponding mapper class development )and the development of a new wrapper UI component with tiny effort. The main steps are below:
step1:
create a simple wrapper UI component. ( Please ignore view main, which is for another blog )
/wp-content/uploads/2013/11/clipboard3_319763.png
create an inbound plug for window MainWindow and implement as below.
  method IP_FROM_WF.
    data(lo_entity) = iv_collection->get_first( ).
    CHECK lo_entity IS NOT INITIAL.
    data(lv_guid) = lo_entity->get_property_as_string( ‘DOCMNT’ ).
    cl_zmeta_mainwindow_impl=>gv_url = zcl_url_utility=>get_url( CONV #( lv_guid ) ).
  endmethod.
The idea is to get the target ABAP webdynpro page url from iv_collection which is passed by CRM navigation framwork and set it to a static attribute of window controller class. That gv_url is just used in view windowOpen.htm. So it means when this wrapper UI component view is about to be rendered, it will open the target ABAP webdynpro page via javascript window.open.
/wp-content/uploads/2013/11/clipboard4_319764.png
step2:
SM30, view name BSPDLCV_OBJ_TYPE create a new UI object type. please AlWAYS double check in the system whether there are already existing UI object type in the system!
Here I create a new UI object type CRM_WF. You can input any name in BOL Object name. There is no validation check, just input a meaningful name.
The Genil component specified here will be loaded automatically by framework in the runtime. In most time your ABAP webdynpro page does not have respective Genil component in CRM, you just can maintain a dummy one.
/wp-content/uploads/2013/11/clipboard5_319765.png
step3:
create a new entry in table CRMS_UI_OBJ_MAP. The object name comes from step2.
/wp-content/uploads/2013/11/clipboard6_319766.png
the mapping class must implement interface IF_CRM_UI_OBJ_MAPPER. If your scenario is just navigation from CRM ui to ABAP webdynpro,
you only need to implement GET_ENTITY_FROM_UI_OBJECT.
Here I just retrieve respective document data from database with document key passed in from framework ( iv_entty_key_value )
/wp-content/uploads/2013/11/clipboard7_319767.png
step4:
in SPRO-Customer Relationship Management-UI Framework-Technical Role Definition-Define Work Area Component Repository:
create a new entry for your wrapper UI component:
/wp-content/uploads/2013/11/clipboard8_319768.png
in inbound Plug Definition, create one entry:
/wp-content/uploads/2013/11/clipboard9_319772.png
in SPRO-Customer Relationship Management-UI Framework-Technical Role Definition-Define Navigation Bar Profile:
create an entry in “Define Generic Outbound Plug mapping” for your profile.
/wp-content/uploads/2013/11/clipboard10_319773.png
And that’s all.
To report this post you need to login first.

6 Comments

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

  1. Ivan Ivanov

    THanks!

    Can you tell us, how did you actually navigate from the link click event handler. I tried to use navigation descriptor and CL_CRM_UI_NAVIGATION_SERVICE=>navigate_dynamicaly

    Works, but source page is being changed to the empty window from wrapper component.

    (0) 
    1. Jerry Wang Post author

      Hi Ivan,

      No, it is not necessary for application developers to do any coding on the link click event handler, the navigation after you click the hyperlink is done by UI framework automatically, as long as you finished all the customizing described in this blog correctly.

      Please set a break point on method PROCESS_NAV_QUEUE of CL_BSP_WD_VIEW_MANAGER, and click hyperlink, the breakpoint will be triggered. Then debug into method SET_WORKAREA_CONTENT to check why the navigation does not work as you expected.

      I have put some debugging screenshot in this link, hope it helps:

      Best regards,

      Jerry

      (0) 
      1. Ivan Ivanov

        Hi Jerry, thanks for the quick and informative update.

        I’m developing a custom genil/bol, so, unfortunately, I should handle this myself 🙂 Could you please provide the standard webclient UI component name, so I could see how this handler works?

        (0) 
  2. Anirban Guharaja

    Hi Jerry,

    Many thanks for sharing this, its really helpful. My requirement is to display a bespoke webdynpro application in a new window when users click on a hyperlink in a crm web ui standard component.

    To achive this, my plan is to pass the entity user clicked to the inbound plug, get the relevant information, then construct the URL and while launching the WD application, I will like to pass the retrieved info to the WD application and display the details.

    Now I am having a doubt regarding step 3 of this blog, need some insight on this please.

    When I am maintaining table CRMS_UI_OBJ_MAP using view CRMV_UI_OBJ_MAPS, in the mapping class, if I maintain a Z class and implement the interface IF_CRM_UI_OBJ_MAPPER, will that be ok please? (as I would be implementing the business logic in my z-class since I haven’t got any sap standard wd application to display)

    Best regards,

    Anir

    (0) 

Leave a Reply