Calling ECC tcode using Transaction launcher on click of a CRM WEBUI Button
Requirement:——
-Call a ECC Transaction ME49 on click of a Toolbar button of sap crm transaction in WEBUI(CRM) by Transaction Luncher
-Pass some data of CRM Transaction to the ECC Transaction selection Screen.
-Open the ECC transaction in a separate window without overlapping the CRM Webui screen
Solution:——
#Steps:
-ECC: Copy Business object TSTC_UIF and Delegate.
-ECC:Create a new method and implement ,for setting the parameter values to ME49 selection screen.
-CRM: Create Transaction Luncher for BOR Object type with a handler class.
-CRM:Create Logical Link for this Transaction luncher.
-CRM: Create Custom object type , which is needed for navigation.
-CRM: Create generic Outbound plug mappings by using the logical link and custom object type.
-CRM: Create button and its Event handler method in webui.
-CRM:Implement logic in button event handler for dynamic navigation using navigation descriptor objects.
-CRM: Goto se24 and open the transaction luncher Handler class and implement your logic in
if_crm_ic_action_handler~prepare_data_flow and other methods as per your requirement..
#Details:
ECC Development |
---|
-Copied the Business Object TSTC_UIF to YV_TSTCUIF in Transaction SWO1. Delegate it to Standard TSTC_UIF. -Created a method SET_PARAMETER in this copied business object. In the General section of the method , the Dialog & Synchronous check box should be ticked . Set the status of the method to Released. -This method has the parameters: ( you can mark as mandatory for the required parameters) These are the parameters whose values will be passed from CRM during runtime. -Coding of method SET_PARAMETER: The corresponding report program of the TCODE ME49 get called . Because we can pass any parameter values without any issues. Note: You can also use the Call Transaction and using the set parameter ID, if the field has parameter ID . you can see this by using F1 key on the GUI fields. begin_method set_parameter changing container. swc_get_element container ‘EBELN’ l_f_ebeln. * Call report program of transaction code ME49 SUBMIT rm06eps0 WITH p_ekorg EQ l_f_ekorg end_method. |
CRM Developments |
---|
Details explained below. |
Created a button in the Webui and also its corresponding Event Handler method.
– This event handler method will create the navigation descriptor object for dynamic navigation using the object type.
Coding of Event handler is shown below
Transaction Launcher handler Class :
Which gets generated during transaction launcher creation.
Method: IF_CRM_IC_ACTION_HANDLER~PREPARE_DATA_FLOW
-Here we are sending the value for the transaction launcher parameters to ECC Transaction ME49.
-In this method you can see the parameter values which was assigned during Trans.launcher creation.
-So when you open this method, you will see some auto generated codes.
-Here you can get the collection which you sent via button event handler method, from variable gv_ltx_cuco as displayed below.
-Here you can also program as per your need.
Output: Now go to CRM webui and open your transaction. Click on the Button to lunch ECC tcode ME49.
This Tcode will open in a separate window without overlapping/replacing the current CRM webui screen .
Debugging: you can put a breakpoint in this handler class method . This will be triggered before displaying the ECC Transaction.
Hope this will be helpful .
Thanks
Sudhansu
Hi Sudhansu,
do you know these documents:
Almost Everything About Transaction Launcher - Part I
Almost Everything About Transaction Launcher - Part II
They contain a comprehensive documentation about everything possible with the transaction launcher functionality. I really don't see what your blog adds in addition to that.
Best,
Christian
Hi Christian,
Thanks for your comments.
Yes the document links mentioned by you are really explains the details about Transaction launcher via the links(Workcenter) in the Navigation Bar and how to troubleshoot. Its a very good document.
But the details about the scenario how to launch the Transaction launcher, from a Button (or Event Handler) in WebUI is not mentioned in those documents.
So in this document posted by me, explains details about how to trigger the Transaction Launcher from a button( Event handler methods) in CRM WebUI.
Thanks and Best Regards,
Sudhansu
Hi Sudhansu,
navigating from a button or link to a transaction launcher is just the navigation to a logical link. Therefore one only needs to use the navigation service to navigate to this link in the event handler of the button.
If you really think your document adds value you should at least take the time to
Best,
Christian
Hi Christian,
Ok I will prepare a good document and post again.
I would like to inform you, that the screenshots are my own and its not copy& paste from other documents.
Thanks
Sudhansu
This is exactly what I was looking for. Many thanks.
Almost Everything About Transaction Launcher - Part I
talks about opening transaction in same window. I want to open transaction in different window without changing current Web UI screen.
Sudhansu Maharana is your blog provides same. Quick reply would be helpful.