cancel
Showing results for 
Search instead for 
Did you mean: 

Invoking Transaction Launcher in Event Handler

Former Member
0 Kudos
79

Hi,

My requirement is to invoke transaction launcher on click of a button. I am invoking transaction launcher using the following code in my event handler.

DATA : lr_navigation TYPE REF TO if_crm_ui_navigation_service,

lr_navigation = cl_crm_ui_navigation_service=>get_instance( me ).

CHECK lr_navigation IS BOUND.

lr_navigation->navigate( iv_link_id = 'LOGICAL_LINK_ID' ).

Now, the transaction launcher is invoked with click of a button. However, this requires me to assign logical link to navigation bar profile and make it visible to the business role I am using. Meaning that, this logical link will appear on the navigation bar which I dont want. If I make this invisible for the business role, then the above code does not work.

Is there any solution for this ?

Regards

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

My requirement is that I need to pass the value of the attribute on which hyperlink is created. How can I do this?

Regards,

Jana

Former Member
0 Kudos

Hi,

If you are trying to launch an URL based Transaction using Tx launcher on button click. This code will help. You can write it in the Event handler of the button.

DATA: lr_data_collection   TYPE REF TO if_bol_bo_col,
        lr_ltx_val_node      TYPE REF TO cl_bsp_wd_value_node,   
        lr_ltx_data          TYPE REF TO crmt_ic_ltx_id_desc.                                         


    CREATE DATA lr_ltx_data.
    CREATE OBJECT lr_ltx_val_node
      EXPORTING
        iv_data_ref = lr_ltx_data.

    CREATE OBJECT lr_data_collection
        TYPE
          cl_crm_bol_bo_col.

    lr_data_collection->add( lr_ltx_val_node ).

    lr_ltx_val_node->if_bol_bo_property_access~set_property(
              EXPORTING
                  iv_attr_name = 'LTX_ID'
                  iv_value  = 'xxxx' ).

    lr_ltx_val_node->if_bol_bo_property_access~set_property(
              EXPORTING
                  iv_attr_name = 'DESCRIPTION'
                  iv_value  = 'xxxxxx' ).


    me->view_manager->navigate( source_rep_view = me->rep_view
                            data_collection = lr_data_collection
                            outbound_plug   = 'xxx' ).

Before that you need to create a component usage of component UICMP_LTX and create a navigation link to be used to pass to the outbound plug.

Regards,

Masood Imrani S.