Skip to Content
avatar image
Former Member

Navigate from BSP to Business Partner Page in CRM Portal

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Aug 20, 2007 at 06:09 AM

    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 .

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 06, 2007 at 02:15 PM

    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.

    Add comment
    10|10000 characters needed characters exceeded