How to Add back button to your portal ABAP web dynpro based iview.

How to Add back button to your portal ABAP web dynpro based Iview

If you have integrated a WD ABAP iView into your portal.
Back button of portal will not work for it.  back button of portal then it returns to the portal page it was called from.
So here you can learn how to creating ABAP web dynpro back button.

Once you have created a button on your web dynpro you need to add the following code to the button action method in order to return to the previous page of your portal.

What needs to be done Within your ABAP WD.

Step 1:
Within the button action method or wherever you want to call the previous portal page add the following code:




  data: lr_compcontroller type ref to ig_componentcontroller,
        l_component type ref to if_wd_component.

  data lr_port_manager type ref to if_wd_portal_integration.
  lr_compcontroller =   wd_this->get_componentcontroller_ctr( ).
  l_component = lr_compcontroller->wd_get_api( ).
  lr_port_manager = l_component->get_portal_manager( ).

  CALL METHOD lr_port_manager->fire
    EXPORTING
      portal_event_namespace = 'urn:com.sapportals:navigation'
      portal_event_name      = 'historyNavigate'
      portal_event_parameter = '-1' .


No comments:

Post a Comment