How to define onSelect action in code?
I created a dropdownbykey using dynamic way like below.
IWDDropDownByKey myDropDown = (IWDDropDownByKey) view.createElement(IWDDropDownByKey.class, "myDropDown ");
myContainer.addChild(myDropDown);
Now I want to add the code to set the onSelect action event for this drop down.
Does anyone knows and can give me this line of code?
Thanks!
Hi
do the following to create a dropdown by key in the view.
first write the following code in the wddomodifyview()
this will create a new dropdown ui element in the tray havin id "tray".
ddk_id is the id of the dropdown created
now bind its selected key property to the desired attribute
then you can set the onselect property to one of the actions created already in the view.
then write the code for what you want on selecting a particular key in the eventhandler of this action
as showm below:
write this code in wddomodifyview()
if(firstTime)
IWDTray mytray = (IWDTray)view.getElement("Tray");
IWDDropDownByKey ddk = (IWDDropDownByKey)view.createElement(IWDDropDownByKey.class,"ddk_id");
IWDAttributeInfo attrinfo = wdContext.getNodeInfo().getAttribute("ddk");
ddk.bindSelectedKey(attrinfo);
*ddk.setOnSelect((IWDAction)view.getAction("SelectAction"));* mytray.addChild(ddk);
Write the desired code for the action in the eventhandler as shown below
//@@begin javadoc:onActionSelect(ServerEvent)
/** Declared validating event handler. */
//@@end
public void onActionSelect(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
//@@begin onActionSelect(ServerEvent)
//write the code here
//@@end
thanks hope it is clear
Sarbjeet Singh Gill
Similar Messages
-
How to define an action which generates a pdf based on a smartform formular
Hello everybody,
I am looking for a solution to define an action which generates a pdf based on a smartform formular (my printer
is LOCL and there will be no other printers in the system defined).
With the standard print action for the smartforms formular nothing is printed on printer local.
Best regards,
AngelikaHmm, no replies yet...
Am I in 'uncharted territory' with this issue? -
How to record user action?
Dear All,
I am trying to build a performance testing tool like jmeter. I want to know how jmeter or any HTTP performance tool records user action. I don't know how to write the action recording code. If anybody knows please help me out.
The following are the logic behind the jmeter action recording
1. Turn on the proxy (HTTP in this case). Jmeter starts listening to HTTP traffic to/from the specified URL. It basically acts like a sniffer for the traffic between your client (the browser) and the server IP address.
2. User starts performing his business process (the activities/requests to the server).
3. When a request is sniffed/captured by the tool, it immediately creates a code to send the same request (basically an HTTP GET/POST method created).
4. At the same time it monitors the response from the server and creates a checking code for verifying that the response obtained is correct (This is used further by the tool when we run the test). The response includes the complete HTML data including the Header and Body sections.
5. All the requests and corresponding responses are captured by the tool and the corresponding code generated automatically.
6. Once the recording ends, it puts together these snippets to create a complete code which could be further modified by the users so that they can run it in a multi-threaded environment.
7. Users run the code specifying the number of users (basically threads) to perform a load test on the server. (The code generated would be thread-safe so that there are no overlaps)
Thanks & regardsSo why not using Jmeter and make you own modification when required
This is the great benefit of open source community
Regards,
Alan Mehio
London,UK -
How to define a Custom Action in VC 6.0 ?
Hi all
I want to know how to define a custom action like for a check box UI Element, I want particular action to be performed when it is checked ? How can I achieve this in VC 6.0
Please feel free to ask me if my question is unclear ?
Regards
KapilHi,
Try adding an expression element on your form.
Go to the Expression control properties and in the Expression attribute enter
IF(@Selected==true,"X"," ")
@Selected is the checkbox. For your function call input use the expression element and not the checkbox.
Hope this helps. Let me know if it works.
Thanks. -
How do I combine two actions in code correctly?
I figured out how to create my playback controls, however I still have a problem. I want to have an additional button that links to a website (I have coded this correctly with actionscript and works great. Now I have two seperate projects...one project has my playback controls and the other has a button that links to a website.
I am having problems combining both action script codes and having everything working properly. My code for each is below. How do I arrange them into one?
Code for link to website:
website_btn.addEventListener(MouseEvent.CLICK,gotoWebsite);
function gotoWebsite(evtObj:Event):void{
var theSite:URLRequest = new URLRequest("http://www.website.com");
navigateToURL(theSite,"_blank");
Code for playback controls:
go.addEventListener(MouseEvent.CLICK,startplaying);
hault.addEventListener(MouseEvent.CLICK,stopplaying);
function startplaying(event:MouseEvent):void{
play();
function stopplaying(event:MouseEvent):void{
stop();the only way that could make sense is to use:
go.addEventListener(MouseEvent.CLICK,startplaying);
hault.addEventListener(MouseEvent.CLICK,stopplaying);
function startplaying(event:MouseEvent):void{
play();
var theSite:URLRequest = new URLRequest("http://www.website.com");
navigateToURL(theSite,"_blank");
function stopplaying(event:MouseEvent):void{
stop();
var theSite:URLRequest = new URLRequest("http://www.website.com");
navigateToURL(theSite,"_blank"); -
How define the action of a h:form?
Hi, I have a page that is accessed with http that contains a form which needs to be posted to a https action. As there is no way to define the action attribute for a h:form tag, how can I implement this using the h:form tag? Is there a way to make the commandButton tag action attribute point to a url?
With JSP+Servlets in Tomcat I would do something like this
<form action="https://${pageContext.request.serverName}:8443${pageContext.servletContext.contextPath}/Login?action=login" method="post">
<label for="username"><fmt:message key="user_username"/>:</label><input type="text" name="username" id="username" value="${username}"/>
<br/>
<label for="password"><fmt:message key="user_password"/>:</label><input type="password" name="password" id="password" value=""/>
<br/>
<input type="submit" value="<fmt:message key="login"/>"/>
</form>how I do something similar using JSF html tags? -
Hi All,
I need an advice...
If t.code FB60 is a t.code "enjoy", how to define the t.code F-02 ???Dear,
FB60 is vendor posting for enjoy , if you wan to post to a GL then you can use FB50. But F-02 doesnt have any enjoy related transaction code, if you require then you can customize the transaction code with ABAPer. -
How to use same actions for differ pop-up
Hi gurus,
I am using 2 popup in a view.same popup's having same buttons 'Yes', 'No'.when i use 1st one i have to create an action for that Yes button where i put my code for that particular Action.
But when i used 2nd one the action define for that is not acceptable with differ name.it takes only standard one.
Now my Query is : How to use same actions for differ pop-up buttons with in a similar view?Where i put my code.
Plz sugges me.
<b>Points will be sured.</b>
Sanket sethiHi,
Take one integer value attribute in the context of view
when you r performing action on POP1 set it's value to 1
when you r performing action on POP2 set it's value to 2
create one method which receives integer argument, say diaplay(int a)
In the action call display(wdContext.currentContextElement().get<intvariable>()) by passing the value in the context attribute
in display() method, Check the value of integer variable..
if it is 1 then perform action related to POP1
if it is 2 then perform action related to POP2
Regards
LakshmiNarayana -
How to use same actions for differ pop-up buttons
Hi gurus,
I am using 2 popup in a view.same popup's having same buttons 'Yes', 'No'.when i use 1st one i have to create an action for that Yes button where i put my code for that particular Action.
But when i used 2nd one the action define for that is not acceptable with differ name.it takes only standard one.
Now my Query is : How to use same actions for differ pop-up buttons with in a similar view?Where i put my code.
Plz sugges me.
<b>Points will be sured.</b>
Sanket sethiHi ,
u can use the method SUBSCRIBE_TO_BUTTON_EVENT of the IF_WD_WINDOW interface ... to handle the event fired by the popup .....used this method after creating the popup window ...
regards
Yash -
I defined custom action but it is not running properly.
Hi,
I defined custom action but it is not running properly.
I deployed in MII (System Management --> Custom Actions)
When i use it as an action in a transaction error below generated.
Errors
[ERROR]: STEP EXCEPTION (Custom_Action_0) : Item 'Custom_Action_0' is not an Action
[ERROR]: STEP EXCEPTION (Custom_Action_0) : Item 'Custom_Action_0' is not an Action
Custom action code is below.
package com.wipro.action;
import com.sap.xmii.xacute.actions.ActionReflectionBase;
import com.sap.xmii.xacute.core.ILog;
import com.sap.xmii.xacute.core.Transaction;
@author cemil.bozlagan
public class CustomAction extends ActionReflectionBase {
private String strFirstInput;
private String strSecondInput;
private String strOutString;
public CustomAction() {
strFirstInput = "";
strSecondInput = "";
strOutString = "";
@Override
public String GetIconPath() {
return "/com/wipro/action/resources/icons/CustomAction.png";
@Override
public void Invoke(Transaction trx, ILog ilog) {
try {
strOutString = strFirstInput + strSecondInput;
// This varaible is defined in ActionReflectionBase class
_success = true;
} catch (Exception e) {
_success = false;
public String getFirstInput() {
return strFirstInput;
public void setFirstInput(String strFirstInput) {
this.strFirstInput = strFirstInput;
public String getSecondInput() {
return strSecondInput;
public void setSecondInput(String strSecondInput) {
this.strSecondInput = strSecondInput;
public String getOutString() {
return strOutString;
@Override
public boolean isConfigurable() {
return false;
How can i solve this problem?
Thanks.Hi Cemil,
Pls check document, I hv sent to your mail.
May be it helps.
Regards
Padma -
Z-Button - How to call a Action Profile to Open a PDF-Doc. within an Event?
Hi Experts,
we have created a Z-Button that afterwards creates an event. In the coding for the event an Action Profile should be called and a PDF-Document should be opened. We have copied the coding from the standard button 'Print Preview' which is calling the standard event: EH_ONPRINT_PREVIEW.
We have also defined a Z Action Profile which is a copie of SERVICE_CONFIRMATION. Our problem is we don't know how why our Z-Action Prodile is not called? What is the class lr_actioncontext (TYPE REF TO cl_crm_bol_entity)?
DATA: lr_cn TYPE REF TO cl_bsp_wd_context_node,
lr_adminh TYPE REF TO cl_crm_bol_entity,
lr_actioncontext TYPE REF TO cl_crm_bol_entity,
lv_adminh_guid TYPE string,
lv_url TYPE string,
lc_head_context TYPE REF TO cl_doc_context_crm_order,
lt_item_context TYPE ppftctxpos,
iv_header_guid TYPE crmt_object_guid,
lif_decision_pop TYPE REF TO if_bsp_wd_popup,
lv_string TYPE string.
CHECK gv_print_preview_enabled = abap_true.
lr_cn = me->get_context_node( gc_cn_btadminh ).
CHECK lr_cn IS BOUND.
lr_adminh ?= lr_cn->collection_wrapper->get_current( ).
CHECK lr_adminh IS BOUND.
lv_adminh_guid = lr_adminh->get_property_as_string( iv_attr_name = 'GUID' ).
lr_actioncontext = lr_adminh->get_related_entity( iv_relation_name = 'BTHeaderAction' ). "#EC NOTEXT
CLEAR gt_print_actions.
CLEAR gr_action_popup.
iv_header_guid = lv_adminh_guid.
CALL METHOD cl_crm_uiu_actions_tools=>get_action_definition
RECEIVING
rv_action_def = lv_string.
CALL METHOD cl_crm_uiu_actions_tools=>show_print_actions_popup
EXPORTING
ir_action_context = lr_actioncontext
ir_parent_node = lr_adminh
ir_view_controller = me
ir_component_controller = comp_controller
iv_event_name = gc_ev_print_preview_closed
iv_for_preview = abap_true
iv_appl_guid = lv_adminh_guid
IMPORTING
et_actions = gt_print_actions
ev_url = lv_url
CHANGING
cr_decision_popup = gr_action_popup.
IF lv_url IS NOT INITIAL.
call_print_preview_popup( lv_url ).
ENDIF.
Best RegardsClosed. No answers.
-
How can i set action on UITaBar and get event from that
Hi All,
I m doing one apps in which i have to add three UITabBarItem and this is UITabBarSystemItem.
Now i cannot understand that how can i set action and get event from the?
And how can i set various views on three tab bar item.
I have to use UITabBar means i have to use UINavigationController+UITabBar
My code id
tabBar =[[UITabBar alloc] initWithFrame:CGRectMake(0,370,320,50)];
tabBar.backgroundColor =[UIColor blackColor];
UITabBarItem *search =[[UITabBarItem alloc] initWithTabBarSystemItem:UITabBarSystemItemSearch tag:0];
UITabBarItem *recents =[[UITabBarItem alloc] initWithTabBarSystemItem:UITabBarSystemItemRecents tag:1];
UITabBarItem *favorites =[[UITabBarItem alloc] initWithTabBarSystemItem:UITabBarSystemItemFavorit es tag:2];
tabBar.items =[[NSArray arrayWithObjects:search,recents,favorites, nil] retain];
tabBar.selectedItem = search;
[myView addSubview:tabBar];
[tabBar release];
I add a action:
UITabBarItem *search =[[UITabBarItem alloc] InitWithTabBarSystemItem:UITabBarSystemItemSearch tag:0 action:@selector(select:)];
So it error: Warning -no'InitWithTabBarSystemItem:tag:action:' method fount
So any can help me regarding it?Thanks RickMaddy very much.
I read and do with sample at the View Controller Programming Guide . But when run it only view TabBar with title but haven't got any TabBarItem on it. I searched a few example about TabBar and i did, but i want do a form with a button then press on button it view a form with 2 TabBarItem on TabBar and press each TabBarItem will show correlative form page 1, page 2.
UITabBarController *tabBarControl = [[[UITabBarController alloc] initWithNibName:nil bundle:nil] autorelease];
tabBarControl.title = @"Tab bar";
ViewControl1 *view1 = [[[ViewControl1 alloc] initWithNibName:@"ViewControl1" bundle:nil] autorelease];
ViewControl1 *view2 = [[[ViewControl1 alloc] initWithNibName:@"ViewControl2" bundle:nil] autorelease];
tabBarControl.viewControllers = [NSArray arrayWithObjects:view1,view2,nil];
[self.navigationController pushViewController:tabBarControl animated:YES]; -
How to know which Action has been done by a Dialog in ControlsFX?
Hello!
I am using ControlsFX for the "Dialog" class. This class lets you build a dialog with "Node" Content.
I set the content to a GridPane and and had wanted to set up a custom Action.
There are premade Actions like "OK" "CANCEL "YES" "NO" "CLOSE" so I tried using "OK" and it worked by saving all of the info in the TextFields which were set in the GridPane
However when I tried "CLOSE" "NO" or "CANCEL" it also saved the data within the TextFields... SO I'm confused, what Actions are exactly going on, and I figured I would just make an if statement saying {code} if(Dialog.getAction(Action.OK) == true){code} but it never worked.
Thoughts on howe to do the actions? I tried to make a custom action at first, but the premades "workjed" but not really.. :(?Thanks!
This wasn't there when I first looked at it, or I was looking at another location of the api, I will make sure to look at this one now :D.
I basically did Action action = Dialog.show().
then did if (action.equals(Dialog.Actions.OK))
//code
}So it works :).
I like the custom action too, I'm interested in the example Action response = Dialogs.create()
.title("You do want dialogs right?")
.masthead("Just Checkin'")
.message( "I was a bit worried that you might not want them, so I wanted to double check.")
.showConfirm();I from the api it says that .create() is static Dialogs Type, so I'm curious how that's used as the Action in this case?
Thanks again :) -
How to define logic to BO for display of more meaningful messages in Webi?
Hi All.
Greetings for the Festive Season.
We would like to know as to how to define the logic to our BO application while displaying messages to end users of Web Intelligence.
We have defined restrictions for various users and restrictions are appliced correctly when the user logs in.
We have some MIS REPORTS in Web Inetlligence with different charts and we have also given links to various other web intelligence reports at the bottom for users to click and view or do analysis.
And if any user if he/ or she is not authorised to view any / or part of the report - it does not show up.
Which works well.
But if some user is not part of any group and is not authorised to view data in a particular report, then we see a standard message coming in like :
"No Data to retrieve in Query1" or "No Data to retrieve in ABC".
Which one could say is correct. Because for that particular user, the query has NO data.
But. We feel there has to be a logic to be defined differently with the applicaton.
How do we differentiate - as to whether the query does not really have data at the back end and HENCE it is saying No data to retrieve in the Query or report
OR whether the user who is trying to view report is NOT authorised to view
AND HENCE the message is displayed as "No Data to Retrieve"
We looked at the source file and it is pointing to :../AnalyticalReporting/viewers/cdz_adv/ViewDocument.jsp?
But we found it a bit difficult to understand the logic there.
Could anyone advise as to how we could define this logic for Web Intelligence - so that messages we see on screen for the end user could be more meaningful ? How do we really make the system understand or look for 2 options as to whether the message to be displayed is because there is REALLY NO DATA AT THE DATABASE LEVEL, OR whether the USER is not authorised to view this data.
Can this be made possible by any means or thro SDK ?
Many thanks
Regards
Indu
Edited by: Indumathy Narayanan on Dec 21, 2010 9:50 AM
Edited by: Indumathy Narayanan on Dec 21, 2010 9:51 AM
Edited by: Indumathy Narayanan on Dec 21, 2010 9:54 AMHere is my current report detail view.
[http://s49.photobucket.com/albums/f270/helenen/add/?action=view¤t=2010-06-2511-44-20.png]
(click on link and view at 100%)
The 3 rd KF column is the calculated ratio which is => 2nd Column (Work Hrs) A% 1st column (PlanHrs)
Right now, I cann't get % at detail line (they're now shown as X, because PlanHrs is not null at detail line.
I'd like those X should be calculated as => WorkHrs (at that line) A% PlanHrs (of that specific employee) .
For example: 16 A% 1827 = 0.875%
It seems soo eassy but I coulnd't do it. -
Very Urgent: how to define field symbols in class using se24 Points assured
hi all
I am new to abap oo programming. I am using se24 to build a class
where some methods have code which involves working with field sybmols but i am not able to figure out way for how to define field symbols in the attributes section.
I tried defining like : fld_sym type ref to dbtab-fld
but in the method implementation if i try to use it like assign fld to <fld_sym> there it says fld_sym is not defined as a field symbol.
So can anyone please guide me how to define field symbols in se24.
Also what should be the general steps while creating a class using se24.
Points assured
thanksHi
Global classes are like Global fun modules in which the Methods and code is already written and is mainly used for Reusability purpose.
Goto SE24 tcode and see the std global classes like
CL_ABAP_CHAR_UTILITIES
see the links
chk out the links below:
General Tutorial for OOPS
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e8a1d690-0201-0010-b7ad-d9719a415907
Have a look at these links for OO ABAP.
http://www.sapgenie.com/abap/OO/
http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b5654f411d194a60000e8353423/content.htm
http://www.esnips.com/doc/375fff1b-5a62-444d-8ec1-55508c308b17/prefinalppt.ppt
http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
http://www.esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
http://www.allsaplinks.com/
http://www.sapgenie.com/abap/controls/index.htm
http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
http://www.esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf
http://help.sap.com/saphelp_erp2005/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
SDN Series:
https://www.sdn.sap.com/irj/sdn/developerareas/abap?rid=/webcontent/uuid/35eaef9c-0b01-0010-dd8b-e3b0f9ed7ccb [original link is broken]
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCABA/BCABA.pdf
Basic concepts of OOPS
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/b6cae890-0201-0010-ef8b-f970a9c41d47
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/1591ec90-0201-0010-3ba8-cdcd500b17cf
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap%20code%20samples/alv%20grid/abap%20code%20sample%20to%20display%20data%20in%20alv%20grid%20using%20object%20oriented%20programming.doc
http://www.henrikfrank.dk/abapuk.html
http://www.erpgenie.com/abap/OO/
Reward oints if useful,
Aleem.
Maybe you are looking for
-
Unable to startup since updating to 10.8.5
My iMac was working fine until yesterday when I was prompted to do a software update through the app store. The update was for OS X 10.8.5. However, since I made the update, I have had a non-functioning iMac. My iMac now won't start. On restart, it g
-
Tunneling result unspecified/No available router to dest weblogic 10.0 MP1
Hi, I have some problems with my weblogic installation. I would like to desploy via eclipse and get the following error messages. Some configuration input: -firewall is off Eclipse base directory: ${project_path} Goals: install weblogic:deploy weblog
-
BizTalk Server 2013 R2 EDI EDIFACT custom Target Namespace is not being used
I have a client that has a partner that doesn't use the "out of the box" BizTalk EDIFACT 97A DELFOR schema. I'm using BizTalk Server 2013 R2. I need to use a custom target namespace. I have created a custom schema for EFACT_D97A_DELFOR with a diffe
-
Photoshop Elements 7 lost in computer crash. How do I redownload?
Could you please help me to find the way to re-download Photoshop Elements 7? My computer crashed and I lost all of my programs on Vista. Now I have Windows 7 and I would love to put the Elements 7 on and get started again.
-
Importing Video to Imovie, Makes video Red
A screen recording video, that i go to import into Imovie (after mavricks update) now makes my entire movies red. Before mavricks, i never had an issue. Now i simply cannont Import a video without it being all red. Please help me fix, or give me back