on 08-17-2007 8:37 PM
Hello All,
I'm trying to navigate from a custom BSP (rendered in SAP CRM Portal) to the Account Management / Accounts / General Information tab within CRM Portal (this is also known as the Business Partner page).
Here's the code I'm using:
CALL METHOD cl_bsp_runtime=>construct_bsp_url
EXPORTING
in_application = 'CRM_BSP_FRAME'
in_page = 'entrypoint.do'
IMPORTING
out_abs_url = lv_bp_url.
navigation->exit( lv_bp_url ).
Unfortunately, the URL that is returned from the construct_bsp_url method does not return me to the desired page. In fact, the navigation completely fails. I believe I'm passing the wrong parameters to the method...
Does anyone know how I'd go about constructing the correct URL for returning to the Business Partner page? This one has me stumped...
Thanks,
Matt
what gets returned in lv_bp_url?
try this
call method cl_bsp_runtime=>if_bsp_runtime~construct_bsp_url
exporting
in_application_ns = 'sap'
in_application = 'CRM_BSP_FRAME'
in_page = 'entrypoint.do'
importing
out_abs_url = lv_bp_url .
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you very much for the reply! I more than appreciate it!
The Function Module returns the following URL:
http://sapdvap01.lab.corp:8000/sap/bc/bsp/sap/crm_bsp_frame/entrypoint.do
However, when I call navigation->exit( bp_url ), the URL does not take me back to the General Information tab under the Accounts tab in Portal CRM. When I add appl=CRMM_ACCOUNT to the URL I'm directed to Accounts, however, it's rendered within my custom BSP, under my custom tab.
My goal is to be redirected to the Accounts tab, with the General Information tab selected... My custom tab and bsp are at the same tab level as the General Information tab, under the Accounts tab. Hope this makes sense...
Is it even possible to do this?
Thanks,
Matt
I resolved this issue by using the following code:
DATA: IM_OBJECT_TYPE TYPE CRMT_PRT_OTYPE,
IM_METHOD TYPE CRMT_PRT_MTD,
IM_OBJECT_ID TYPE SWO_TYPEID,
IM_PARAMETERS TYPE CRMC_URL_PARAMETER_TAB,
im_param type crmt_url_parameter,
im_logical_system TYPE logsys,
re_url TYPE string.
im_object_type = 'ACCOUNTCRM'.
im_method = 'APPLICATION'.
im_object_id = partner.
im_param-name = 'CRM_OBJECT_TYPE'.
im_param-value = 'ACCOUNTCRM'.
append im_param to im_parameters.
im_param-name = 'CRM_BOR_TYPE'.
im_param-value = 'BUS1006'.
append im_param to im_parameters.
im_param-name = 'CRM_METHOD'.
im_param-value = 'APPLICATION'.
append im_param to im_parameters.
CALL FUNCTION 'BBP_LOGSYS_READ'
IMPORTING
e_my_logsys = im_logical_system.
try.
CALL METHOD cl_prt_url_generator=>get_navigation_info
EXPORTING
im_object_type = im_object_type
im_method = im_method
im_object_id = im_object_id
im_parameters = im_parameters
im_logical_system = im_logical_system
IMPORTING
ex_url = partner_url.
catch cx_prt_urlgen.
if for some reason the call to cl_prt_url_generator=>get_navigation_info fails, construct the url manually
CALL FUNCTION 'ZCRM_GET_PORTAL_URL'
IMPORTING
url = lv_portal_url.
CONCATENATE lv_portal_url '?'
'NavigationTarget=pcd%3Aportal_content%2Fcom.sap.pct%2Fspecialist%2F'
'com.sap.pct.crm%2Fcom.sap.pct.crm.roles%2Fcom.sap.pct.crm.core.defaultservices'
'%2Fcom.sap.pct.crm.core.urldispatcher%3FDynamicParameter%3DCRM_OBJECT_TYPE%253D'
'ACCOUNTCRM%2526CRM_BOR_TYPE%253DBUS1006%2526CRM_OBJECT_ID%253D' partner '%2526CRM_LOGSYS%253D'
im_logical_system '%2526CRM_METHOD%253DAPPLICATION%2526CRM_BSP_RESTORE%253DFalse' INTO partner_url.
endtry.
FUNCTION ZCRM_GET_PORTAL_URL.
*"----
""Local Interface:
*" EXPORTING
*" VALUE(URL) TYPE STRING
*"----
DATA: lv_protocol TYPE string,
lv_server TYPE string,
lv_port TYPE string,
lv_path TYPE string,
lv_url TYPE string.
SELECT F_VALUE into lv_protocol
from CRMC_PRT_CUSTOM where F_NAME = 'PROTOCOL'.
ENDSELECT.
SELECT F_VALUE into lv_server
from CRMC_PRT_CUSTOM where F_NAME = 'SERVER'.
ENDSELECT.
SELECT F_VALUE into lv_port
from CRMC_PRT_CUSTOM where F_NAME = 'PORT'.
ENDSELECT.
SELECT F_VALUE into lv_path
from CRMC_PRT_CUSTOM where F_NAME = 'PATH'.
ENDSELECT.
CONCATENATE lv_protocol '://' lv_server ':' lv_port '/' lv_path into lv_url.
TRANSLATE lv_url TO LOWER CASE.
move lv_url to url.
ENDFUNCTION.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.