cancel
Showing results for 
Search instead for 
Did you mean: 

Exit button for web dynpro within portal

Former Member
0 Kudos

Hi All,

I have created a simple ABAP web dynpro which allows the user to display and change their challenge group from within the ESS portal. Once the user has finished changing their data i would like to put an exit button which closes the webdynpro and takes them back to the ESS overview or back to where they accessed the web dynpro from. Anyone know if this is possible without have to specify an actual URL!

Regards

Mart

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Mart,

here is the solution for your problem...it might be too late to find...but here it is:

you just need to fire this event....rest portal framework can take care of:

I tested this in all my application and it works fine. It will take you right back where you come from

DATA lo_api_component TYPE REF TO if_wd_component.

DATA lo_portal_manager TYPE REF TO if_wd_portal_integration.

lo_api_component = wd_comp_controller->wd_get_api( ).

lo_portal_manager = lo_api_component->get_portal_manager( ).

CALL METHOD lo_portal_manager->fire

EXPORTING

portal_event_namespace = 'urn:com.sapportals:navigation'

portal_event_name = 'historyNavigate'

portal_event_parameter = '-1' .

Thanks...

AS

Forget to mention that you need to put this code under your exit button action method....

Edited by: J Are on Apr 1, 2009 5:05 PM

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

This can be solved using an exit plug. Please go through th below steps:

1. Create an outbound plug in the Window. This should be of type Exit plug.

2. Specify a parameter to the plug-> Parameter CLOSE_WINDOW TYPE BOOLEAN.

3. Create Usage of this Window in the view in which you require the Close window button.

4. Go to Onaction method of Clos window (Any name) button in your view and give the following coding.

DATA lo_ytest_filter TYPE REF TO ig_your web dynpro component name.

lo_ytest_filter = wd_this->get_your web dynpro component name_ctr( ).

lo_ytest_filter->fire_Your plug name_plg(

close_window = 'X' " boolean

).

Regards,

Jenny

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

A little warning about using the close_window flag in the portal - it only works under limited circumstances. They are documented here:

http://help.sap.com/saphelp_nw70ehp1/helpdata/en/45/19bf8c16f25d7ae10000000a11466f/frameset.htm

Former Member
0 Kudos

Thanks very much for the replies, and although the exit plug works a treat if i run the wdp application as a standalone app it does not really have the desired effect when used within the portal. It simply closes the app but leaves the portal tray which it sits in, the user is then left with an iView consisting of an empty tray. It is not a major issue as the user can click manually to where they want to go next but would have been nice if i could have closed it down altogether and maybe returned them to the ESS overview screen.

Thanks again

Mart

IanStubbings
Active Participant
0 Kudos

Hi Mart

Did you ever solve your issue? I have exactly the same request and would like to know your resolution if you found one.

At the moment I can fire the exit plug with a url but it is obtaining the correct url that has me stumped. Do I have to navigate through the hompepage framework tables to obtain the resource url and concatenate the server and port on the front?

Cheers

Ian

Former Member
0 Kudos

Hi Ian,

Unfortunately i have not been able to find a solution to this issue, but its is something im going to have to get back too in the near future so if i manage to find a solution i will post it on here. Would be very gratefull of any solution you manage to find if you get there first!

Regards

Mart

IanStubbings
Active Participant
0 Kudos

Hi Mart

I need to find a solution within the next day or so. Therefore, I'll let you know my chosen route.

Cheers

Ian

Former Member
0 Kudos

Hi Ian,

Did you have any luck finding a solutions to this?

Regards

Mart

Former Member
0 Kudos

Hi Ian,

You have probably already solved this but thought id post the solution i have used just in case. I Have added the following code to my abap webdynpro within the action method of the exit button:

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( ).

  data: navigation_target type string,
        navigation_mode   type string,
        window_name       type string,
        lt_param          type wdy_key_value_table,
        ls_param          type wdy_key_value.

  navigation_target = 'ROLES://portal_content/com.sap.pct/every_user/com.sap.pct.erp.ess.bp_folder/com.sap.pct.erp.ess.pages/com.sap.pct.erp.ess.overview'.

  navigation_mode   = '0'.  

   call method lr_port_manager->navigate_absolute
    exporting
      navigation_target      = navigation_target
      navigation_mode        = navigation_mode.

NOTE:

The value inserted into 'navigation_target' is the value you see within the ID(PCD location) of the web dynpro, but with 'pcd:' replaced with 'ROLES://'

i.e. the above sap provided page is 'pcd:portal_content/com.sap.pct/every_user/com.sap.pct.erp.ess.bp_folder/com.sap.pct.erp.ess.pages/com.sap.pct.erp.ess.overview'