Professional Documents
Culture Documents
SAPCRMWEBUI:58.ONECLICKACTIONS
58.ONECLICKACTIONS
When we open any service contract, we can see these one click actions in the item
assignment block. These actions help us to edit some important fields of line item there
itself in the table view. We need to not navigate to item overview page to edit it and also
we can delete that item on the same assignment block.
Let us provide one click action for a table view. Here I am going to add OCAs to the table
view that I created in the chapter VALUE NODE CONCEPT. However procedure that we
follow applies to any table view.
Step1.
We need to add one value attribute with name THTMLB_OCA with type
CRM_THTMLB_ONE_CLICK_ACTION to the context node of table view.
HELPFUL TOPICS
Go to the table view context node for which you want to implement ONE CLICK ACTIONS.
Add a value attribute as mentioned above. Kindly see the below screen shots for reference.
1.Introduction
http://www.sapcrmwebui.com/2013/06/58oneclickactions.html
1/5
6/19/2016
SAPCRMWEBUI:58.ONECLICKACTIONS
19.Introduction to UI Component
20.Adding MODEL to UI Component
Step3.
Go to the context node class of table and redefine the method GET_OCA_T_TABLE.
Write the following code inside that method and activate the method. In this method we
have added buttons.
Step4.
We need to tell the framework about newly created value attribute is an OCA type. For that
we need to code in the P getter method of new attribute.
If Pgetter is greyed out, then just double click on. Framework will ask to create it. Then
choose yes. Then write the following code inside the method.
http://www.sapcrmwebui.com/2013/06/58oneclickactions.html
2/5
6/19/2016
SAPCRMWEBUI:58.ONECLICKACTIONS
47.Adding Buttons To Overview Page
48.Adding EDIT,CANCEL and SAVE Buttons
To Overview Page
49.UI Object Type & Design Object
50.DO CONFIG DETERMINATION method
Here _oca is the event handler name that will be triggered when we click on edit or
cancel buttons.
Step5.
Create on event handler with name _oca. (event handler name is case sensitive ).
61.Tree View
62.Responding to Event of Another
Component.
Followers
Jointhissite
withGoogleFriendConnect
Members(184) More
Here for two buttons only one event handler is assigned. So whether you click on EDIT
button or DELETE button, same event handler will be triggered. So we need to know on
which button user has clicked to process our logic.
Write the following code inside the event handler and activate it.
Alreadyamember?Signin
SelectLanguage
Popular Posts
http://www.sapcrmwebui.com/2013/06/58oneclickactions.html
3/5
6/19/2016
SAPCRMWEBUI:58.ONECLICKACTIONS
Total Pageviews
707,755
We are getting the ID of buttons on which user has clicked. Based on the button id, We need
to process our own logic.
Test the application by placing a break point in the above event handler.
Clickonanybuon.IclickedonDELETEbuon
Colour
Consultancy@home
GetExpertAdvicebyAsian
PaintsAlongwithFreeIn
HouseQuotation.
5comments:
Anonymous 12 July 2013 at 01:45
Thank you for the gr8 post..
I have a question.. If we want to display any other image instead of 'edit' or 'delete'. How
are we going to it??
Reply
http://www.sapcrmwebui.com/2013/06/58oneclickactions.html
4/5
6/19/2016
SAPCRMWEBUI:58.ONECLICKACTIONS
Enteryourcomment...
Commentas:
Publish
Selectprofile...
Preview
Newer Post
Home
Older Post
Copyright 2013 Praveen K Mannala. All Screenshots were taken from SAP CRM Software. . Template images by andynwt. Powered by Blogger.
http://www.sapcrmwebui.com/2013/06/58oneclickactions.html
5/5