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: 
Former Member



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.
DATA:
       l_f_ebeln TYPE ekko-ebeln,
       l_f_ekorg TYPE ekko-ekorg,
       l_f_submi TYPE ekko-submi.

swc_get_element container 'EBELN' l_f_ebeln.
swc_get_element container 'EKORG' l_f_ekorg.
swc_get_element container 'SUBMI' l_f_submi.

* Call report program of transaction code ME49
* -> Selection values from CRM Service order Quotation

   SUBMIT rm06eps0 WITH p_ekorg EQ l_f_ekorg
                      WITH p_ebeln EQ l_f_ebeln
                      WITH p_submi EQ l_f_submi
                      VIA SELECTION-SCREEN AND RETURN.

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

6 Comments
Labels in this area