Skip to Content
SAP Customer Relationship Management

Calling Transaction Launcher on user action

Tags:

This document is part of document series Transaction Launcher.

This document is continued from previous part of the document series with title "Transaction Launcher in SAP GUI".

Sometimes there may be a requirement to execute a  Transaction Launcher based on some events like clicking on a button or hyperlink. Let us see how to implement it in this document.

Here as an example let us check how a webdynpro application which takes different input parameters is called by executing URL based transaction launcher by clicking on a hype link.

Example:

             Business Role SALES-PRO

             Search for opportunity -> Go to Opportunity Overview Page->open the  transaction history AB -> click on Project id in the transaction history

             It will launch Webdynpro application CPROJECT


This type of Transaction Launcher can be implemented with following steps:

(1)  Maintain UI Object type in view BSPDLCV_OBJ_TYPE.

     Go to transaction SM30.


     Create new entry for new UI Object type in view BSPDLCV_OBJ_TYPE and save.


     Example:

     Following UI object type is created to execute URL Based transaction launcher (say display webdypro application webdynpro/sap/cprojects to display                the project number for an opportunity ).

    

     Transaction launcher uses ‘ICBORWrapper’  BOL object  to get the values from UI.


   

(2) Configure an URL based transaction launcher: ( Click here to see for more details)

       Eg. Display webdypro application sap/bc/webdynpro/sap/cprojects to display the project number for an opportunity in remote system.

     

      Define Input parameters which the application can receive from the URL.

      

 

     Configure Transaction Launcher for the above URL ID.


       


Here it is important that you select import parameters and assign it value  //clipboardICBORWrapper/OBJKEY  as shown below.





(3) Define Logical link  to trigger the transaction launcher:

     Path: SPRO->Customer Relation Management->UIFramework->Technical role definition->Define Navigation bar profile->Define Logical Links,

     For LTX ,

     Target ID = ‘EXECLTX’,

     Parameter class = ‘CL_CRM_UI_LTX_NAVBAR_PARAM’

     Parameter = LTX ID               

     Type = ‘C

   


    


(4) Define generic mapping entry for the Navigation Bar Profile

At run time CRM WebClient picks the target id mentioned here or Logical Link Id  and calls the inbound plug related to this target link.

Object type = enter the Object type created in step 1.


Logical Link ID = enter the LL ID created in step 3.


(5)  Implement event handler to trigger your custom object type.

     Here, in ‘transaction history‘ AB view of on opportunity, after clicking on ‘project ID’  CPROJECT application will be launched  by executing URL Based      transaction launcher CPROJECT.




     If we click on the link Project ID 201 ,it will display the Project by executing the application CPROJECTS which is triggered by URL based Transaction           launcher CPROJECTS .



To achieve this, in the event handler method of the hyperlink write the below code.


(a)  Get the selected   entity from the collection:


    

(b)  Get the key value for the selected entity:


    


(c)   Get entity ICBORWrapper  from bor object for the our UI Object type by passing the key value.

    

        You can get the object key,object type from ls_docflow.

         If you don’t know the UI Object type, get the UI Object type.


       

       

            

        If you know UI Object type and BOR object, get the entity ICBORWrapper 

        Lv_bor_object_type = ‘BUS2172’

        lv_ui_obj_type  = ‘WRAPPED_BUS2172’


      

     


        


    (d) As you can see in the code above, we are using the class CL_CRM_UI_DESCRIPTOR_OBJ_SRV and method CREATE_UI_OBJECT_BASED to store the         UI Object type and entity.


    (e)  After above step we added two entities

        i) The dynamic navigation entity and

         ii) The value node entity to the navigation object.

         Method lr_nav_service->navigate_dynamically( lr_data_collection )is used to executethe Logical Link assigned to our UI Object type which in turn will                  trigger the transaction launcher.

         

        

    


    Once above implementation part of event is over Transaction Launcher is ready to use.

     Check if the values are passed properly in LTX handler class method PREPARE_DATA_FLOW of LTX handler class as shown below.


  

If the values are passed correctly then transaction launcher will be executed as expected.


Hope this helps.



--------------------------------------------------------------------------------------------------------------------------------------------

For Transaction Launcher commonly faced issue refer Note 1013376 .