on 10-17-2011 7:57 AM
Hi,
I struck with portal navigation from Webdynpro ABAP. My scenario is to develop a custom application and on closing this application using a BACK button should navigate to previously visited portal page.
I have ESS Personal information screen from there I attached my custom application developed in WDA and the appearance behaviour is SHOW_INPALCE in the portal.. I have a Close button on custom application which should take me back to previous portal screen instead of closing entire portal browser.
I found below code, in the sdn forum itself and unable to use it according my requirements. Please help with with this.
data: L_API_COMPONENT type ref to IF_WD_COMPONENT,
LO_PORTAL_MANAGER type ref to IF_WD_PORTAL_INTEGRATION.
L_API_COMPONENT = WD_COMP_CONTROLLER->WD_GET_API( ).
LO_PORTAL_MANAGER = L_API_COMPONENT->GET_PORTAL_MANAGER( ).
IF NOT lo_portal_manager->m_portal_version IS INITIAL.
DATA baseURL TYPE STRING.
DATA portalPATH TYPE STRING.
baseURL = 'pcd:portal_content/com.sap.pct/every_user/com.sap.pct.erp.common.bp_folder/com.sap.pct.erp.common.roles/com.sap.pct.erp.common.erp_common/com.sap.pct.erp.common.lpd_start_wd_abap'.
portalPATH = 'pcd:portal_content/com.sap.pct.erp.common.lpd_start_url'.
* Navigate to calling iview
CALL METHOD lo_portal_manager->navigate_relative
EXPORTING
"base_url = baseURL
levels_up = '1'
navigation_mode = 'WDPortalNavigationMode.SHOW_INPLACE'
*path = lt_path.
*path = 'pcd:portal_content/com.sap.pct/every_user/com.sap.pct.erp.common.bp_folder/com.sap.pct.erp.common.roles/com.sap.pct.erp.common.erp_common/com.sap.pct.erp.common.lpd_start_url'.
path = portalPATH.
CALL METHOD lo_portal_manager->fire
EXPORTING
portal_event_namespace = 'urn:com.sapportals:navigation'
portal_event_name = 'historyNavigate'
portal_event_parameter = '-1'.
ELSE.
* Trigger window to be closed
lr_wdw_main = wd_this->get_wdw_main_ctr( ).
lr_wdw_main->fire_exit_plg( close_window = abap_true ).
ENDIF.
Thanks
Praveen
Praveen,
Guess CALL METHOD lo_portal_manager->fire to historyNavigate is inside event handler of BACK button.
regards,
Nikhil Bose
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Thnaks for the reply. However, when I use inside the back button, build error comes at below lines which I am unable to understand although I tried with test with different data types.
Error says - portalPATH = 'pcd:portal_content/com.sap.pct.erp.common.lpd_start_url'.is not in compatible types.
What is the format/type to input path in below method navigate_relative? it was like a string but giving compataiobility error. (showing in bold below)
DATA baseURL TYPE STRING.
DATA portalPATH TYPE STRING.
baseURL = 'pcd:portal_content/com.sap.pct/every_user/com.sap.pct.erp.common.bp_folder/com.sap.pct.erp.common.roles/com.sap.pct.erp.common.erp_common/com.sap.pct.erp.common.lpd_start_wd_abap'.
*bold* portalPATH = 'pcd:portal_content/com.sap.pct.erp.common.lpd_start_url'.*bold*
* Navigate to calling iview
CALL METHOD lo_portal_manager->navigate_relative
EXPORTING
"base_url = baseURL
levels_up = '1'
navigation_mode = 'WDPortalNavigationMode.SHOW_INPLACE'
*path = lt_path.
*path = 'pcd:portal_content/com.sap.pct/every_user/com.sap.pct.erp.common.bp_folder/com.sap.pct.erp.common.roles/com.sap.pct.erp.common.erp_common/com.sap.pct.erp.common.lpd_start_url'.
*bold* path = portalPATH.*bold*
Edited by: Praveen kumar Kadi on Oct 17, 2011 11:47 AM
User | Count |
---|---|
80 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.