Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
deepika_chandrasekar
Active Contributor

This document is about launching Transaction from CRM Webui with passing parameter to the Transaction without adding the TL in any of the workcenter

In CRM we have many standard Transaction launchers are available already. First we need to find out the Businees type of thr transaction and then we can search in CRMC_IC_ACTIONPROF for standard TL and we can use that or else we can create custom TL if not available in standard

If we need to create custom TL then first step is

STEP1: We need add entry in table BSPDLCV_OBJ_TYPE for custom business type.

for example for business type VTTK we dont have standard TL in CRM system so we can add entry in this table with object type as WRAPPED_VTTK

STEP2: We need to create custom TL in SPRO

SPRO ->Customer Relationship Management -> UI Framework -> Technical Role Definition ->Transaction Launcher -> Configure Transaction Launcher

Create TL for the maintained object type

Give your TL name and click continue

Give your TL description and TL class to be created and click on continue

Chose BOR Transaction and Logical system as your target system if you want to launch transaction of current system choose current system or ERP system choose ERP system in Logical system and then BOR object type as object type of Transaction then choose DISPLAY method

Choose Parameter Object Key value will come automattically click on continue

Click on continue

Click on Complete

In Created class we need to change the code in PROCESS_DATA_FLOW method

Comment the existing code and replace with the following code


data: __gdc    type ref to if_crm_ui_data_context,
        __source type        string,
        __line   type        string,
        __path   type        crmt_ic_ac_identify_path.


__gdc ?=
cl_crm_ui_data_context_srv=>get_instance( gv_view_controller ).
********** Begin of parameter declaration ***********

data ICWCPROCESSEDOBJECT type ty_ICWCPROCESSEDOBJECT .
data ICWEBCLIENTBORKEYPARAMETER type ty_ICWEBCLIENTBORKEYPARAMETER .
concatenate
'/'
'/'
'OBJKEY'
into __source.

call method cl_crm_ui_ltx_cuco_access_srv=>get_instance
   exporting
     iv_controller = gv_view_controller
   receiving
     rv_result     = gv_ltx_cuco.
GV_SELECTED_ENTITY ?= GV_LTX_CUCO->GET_SELECTED_CLIPBOARD_ENTRY( ).
if gv_selected_entity is bound.
   try.
       __path = __source.
       call method
cl_crm_ic_activity_clipboard=>get_property_as_value
         exporting
           iv_xpath  = __path
           iv_entity = gv_selected_entity
         importing
           ev_result = ICWEBCLIENTBORKEYPARAMETER .
     catch cx_crm_bdc_no_data cx_crm_bdc_xpath_error cx_root.
       clear ICWEBCLIENTBORKEYPARAMETER .
   endtry.
endif.

me->set_container_object(
   iv_name        = '<*MAINOBJ*>'
   iv_object_key  = ICWEBCLIENTBORKEYPARAMETER
   iv_object_type = gv_bortype ).


* Data flow is complete - set to false if data is missing
gv_data_flow_complete = abap_true.

Activate the changes

STEP 3: Create Logical Link ID for the TL

Save the changes

STEP 4: Maintain Bus Type in your Navigation Bar Profile for Dynamic Navigation

Maintain Object Type with logical Link ID created for the TL and then Save you changes

STEP 5: Call the TL using code Dynamic navigation

On click event of the attribute we need to call the TL using dynamic navigation

DATA: lr_nav      TYPE REF TO if_crm_ui_navigation_service.
    DATA: lr_nav_descr TYPE REF TO if_bol_bo_property_access.
    DATA: lr_col      TYPE REF TO if_bol_bo_col.

CALL FUNCTION 'CRM_GET_ERP_SYSTEM'
      IMPORTING
        ES_SMOF_ERPSH = ls_ecc.
    lv_rfcdest = ls_ecc-rfcdest.
     CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
        EXPORTING
          INPUT  = lv_shipment
        IMPORTING
          OUTPUT = lv_shipment.

      lv_obj_key = lv_shipment.
      lr_nav_descr = cl_crm_ui_descriptor_obj_srv=>create_bor_based(
                                                              iv_bor_object_type  = 'VTTK'
                                                              iv_bor_object_key   = lv_obj_key
                                                              iv_logical_system   =  lv_logsys
                                                              iv_ui_object_type   = ''
                                                              iv_ui_object_action = if_crm_ui_descriptor_object=>gc_action_display ).

      CREATE OBJECT lr_col TYPE cl_crm_bol_bo_col.
      lr_col->add( lr_nav_descr ).
      lr_nav = cl_crm_ui_navigation_service=>get_instance( me ).

      CHECK lr_nav IS BOUND.
      IF lr_nav->is_dynamic_nav_supported( lr_nav_descr ) = abap_true.
        lr_nav->navigate_dynamically( lr_col ).
      ENDIF.

It will navigate to the Transaction in logical system with parameter.


IF Transaction Launcher is available in CRMC_IC_ACTIONPROF by standard for the required Transaction ob jecttype then we can call the TL using Same code changinf object type on click event of parameter.

.

    lv_obj_key = lv_sal_ord.
    lr_nav_descr = cl_crm_ui_descriptor_obj_srv=>create_bor_based(
                                                            iv_bor_object_type  = 'BUS2032'
                                                            iv_bor_object_key   = lv_obj_key
                                                            iv_logical_system   =  lv_logsys
                                                            iv_ui_object_type   = ''
                                                            iv_ui_object_action = if_crm_ui_descriptor_object=>gc_action_display ).

    CREATE OBJECT lr_col TYPE cl_crm_bol_bo_col.
    lr_col->add( lr_nav_descr ).
    lr_nav = cl_crm_ui_navigation_service=>get_instance( me ).

    CHECK lr_nav IS BOUND.
    IF lr_nav->is_dynamic_nav_supported( lr_nav_descr ) = abap_true.
      lr_nav->navigate_dynamically( lr_col ).
    ENDIF.

Regards,

Deepika C.

5 Comments
Labels in this area