Quantcast
Channel: SAP CRM: Webclient UI - Framework
Viewing all articles
Browse latest Browse all 188

Calling Transaction Launcher On a Custom Button( Event Handler ) In Web UI Level

$
0
0

Scenario: In this Blog i will call the SAP CRM Transaction BP via the CRM Web UI using button. Just you have to follow the below mentioned steps.

 

Step 1: Go to transaction CRMS_IC_CROSS_SYS  for Checking Logical System and URL.

 

In this case we are planning to execute the launch transaction in our own system as shown in properties below.

 

1.png

Step 2: Add the button code and launch transaction calling code in .htm page of view as shown in below screen shot.

 

1.png

2.png

Here i have added a button using in the htm page of the view and on the event handler i have set a flag in the IMPL class. based on the value of this flag corresponding call to the URL is made in an frame on the same page.


URL:'"http://dtsapcrm.defiancetech.com:8003/sap/bc/gui/sap/its/webgui/!?~transaction=IC_LTX&~okcode=ICEXECUTE&sapclient=100"'.%>

 

This opens up the BP Transaction in an iframe in the same view. To open any transaction, replace   IC_LTX in the URL with the required transaction.


Layout Code :


%--Button Code --%>


<% if controller->open_clicked ne 'X'. %>

 

 

<thtmlb:button id      = "OPEN"

design  = "EMPHASIZED"

onClick = "OPEN"

text    = "OPEN BP Transaction"

enabled = 'true'

/>

 

<% endif. %>

 

%-- Event Handler Code --%>


<% if controller->open_clicked = 'X' . %>

%-- This URL is taken from transaction CRMS_IC_CROSS_SYS  --%>

<% controller>url = '"http://xxxxxxxxx/sap/bc/gui/sap/its/webgui/!?~transaction=BP&~okcode=ICEXECUTE&sap-client=800"'.%>


%-- Launch Transaction Design Code --%>s

<html>
<iframe
name = "ff" id ="ff" width = 900 height = 900 src = <%= controller->url . %> >
</iframe>
</html>
<% endif . %>


Step 3:Create Event for this view and add the following code in event handler method as shown in the screen shot below.



4.png


Step 4: Double click on the Implementation class of TransactionLauncherOnButton view and add the two attributes OPEN_CLICKED and URL as shown below.


6.png


Step 5: Save,Activate and Execute the component .


123.png


Step 6: When click on OPEN BP Transaction button, set  flag and capture its value in the HTM page of the required view.


9.png


To find Business Partner through Launch transaction


10.png

11.png

It will helpful for who are struggling launch transaction in this type .

Thanks & Regards,

Harikrishna M.


Viewing all articles
Browse latest Browse all 188

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>