Skip to Content

This document is for demonstrating how to create an URL based transaction launcher in CRM UI to exchange data between SAP and an external URL in real time.

  • Declare URL and the Parameters [SPRO->Customer Relationship Management->UI Framework->Technical Role Definition->Define URLs and Parameters]


  • Declare URL Parameters. For this we must remember the meaning of import and Export parameters. For example, here, I’m creating 3 parameters: name (Import), xpos (Export) and ypos (Export).



Import Data to be transferred from SAP CRM UI to external URL
Export Data to be transferred from external URL to SAP CRM UI




  • Now launch the Transaction Launcher wizard.[SPRO->Customer Relationship Management->UI Framework->Technical Role Definition->Configure Transaction launcher]






  • Now assign the transaction launcher in CRM UI as Workcenter link following usual process. I’m not detailing them here.[SPRO->Customer Relationship Management->UI Framework->Technical Role Definition->Define Navigation Bar Profile]
  • The class ZCL_LAUNCH_URL was created by the wizard. We need to make certain changes for data exchange to work.[Transaction:SE24]
    • Save the class under a transport as it gets created under local object by default.
    • Go to redefined CLASS_CONSTRUCTOR method to change the following code, it is required as we want data to flow back to SAP CRM.


    • Go to the redefined method IF_CRM_IC_ACTION_HANDLER~PREPARE_DATA_FLOW to add the following code. This super class method has the code to add the return URL information. The return URL is the SAP CRM URL which the external webpage will send the information to.


    • Go to redefined method IF_CRM_IC_ACTION_HANDLER~PROCESS_RETURN to add the code to handle return data. For example here I’m giving a message.


  • For demonstration purpose I’ve built a HTML webpage and hosted it using Apache in my local machine. Similarly any webpage can be used to exchange data with SAP CRM. This webpage displays the sent information from SAP i.e Name and has 2 input fields XPos and YPos. When “Go” button is clicked on the webpage the data is sent back to SAP CRM UI and displayed.
    • The source code of the webpage using some JavaScript functions.
<title>My Page</title>
<script type="text/javascript">
function getUrlVars() {
    var vars = {};
    var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m,key,value) {
        vars[key] = value;
    return vars;
function decode(str) {
     return unescape(str.replace(/\+/g, " "));
var fullname = getUrlVars()["name"];
var returl    = getUrlVars()["ICRETURNADDRESS"];
var client    = getUrlVars()["ICRETURNCLIENT"];
var comid     = getUrlVars()["COMPONENT_ID"];
var guid      = getUrlVars()["GUID"];
var returl1   = decode(returl);
function submitform(){
window.onload = function(){
<form id="name" name="name" >
Name           : <input type="text" name="fullname" readonly="readonly"/><br />   
<form id="details" name="details" method="post" action="" >
COMPONENT ID   : <input type="text" name="component_id" readonly="readonly"/><br />
Return address : <input type="text" name="value3" readonly="readonly"/><br />
Return Client  : <input type="text" name="client" readonly="readonly"/><br />
GUID           : <input type="text" name="guid" readonly="readonly"/><br />
XPOS           : <input type="text" name="xpos" value="" />
YPOS           : <input type="text" name="ypos" value="" />
<input type="submit" value="go!" />
<script LANGUAGE="javascript">        = decode(fullname)
document.details.component_id.value = comid
document.details.value3.value       = returl1
document.details.guid.value         = guid
document.details.client.value       = client

    • Now the Apache has to be running for testing this.


  • Now if we can test our application.

    • Log-in to SAP CRM UI and confirm a Business Partner.


    • Click on “Launch URL” Workcenter link to launch the external URL. You can notice the Fullname of the Business Partner has been transferred to the external webpage.


    • Now enter some data in the input fields XPOS and YPOS and click the “Go” button.


    • It can be seen that data is passed back to in SAP CRM. For demonstration purpose I’m displaying them as message but it can be easily stored in database or it can be used to trigger any business process.


To report this post you need to login first.


You must be Logged on to comment or reply to a post.

  1. Karthi M R


    Thanks for your detailed document.

    For a BOR based transaction, is there any additional code to be added for the process_return i.e return data flow method to get triggered.


  2. Former Member

    Hi Sourav,

    Nice job but I am having trouble trying to make it work.

    I did everything like you did but the method “process_return” of my transaction launcher is never called.

    I am using CRM 7.0 EHP3.

    Do you have an idea ?


        1. Former Member

          Thanks for your reply.

          Yes, I had marked the variable GV_IS_RETURN_DF_REQUESTED as X.

          I can see that the control comes to UICMP_LTX page GenericLTXReturn.htm but then i do not see the code where the handler class gets called within the code for this page.

          Does this code need to be modified or do we need to create a new BSP application and do some custom coding to call the handler class on return?

          Thanks & Regards

            1. Former Member

              Thanks. I had referred this code as well, but the problem is that the control is not coming back to the handler class sub class of super class (CL_CRM_UI_LTX_ABSTRACT_URL) method PROCESS_RETURN

              1. Former Member

                Hi Reecha,

                Check the method OnRequest  in your BSP application for return (my ZUICMP_LTX), you need the component id sent by the called URL.



Leave a Reply