ACTION to be called on click of Button - BADI to be triggered.
Hi Amigos,
I have a requirement to create a button "Quality Notification" and when clicked it should generate the Action in WebUI.
Can any of you help me in calling the ACTION BADI. How do i call the badi from the event handler. Please give me some sample coding.
Regards,
Jagadish.G
Hi jagadish g,
For the code in your new button in Web UI, maybe you can copy the sap standard code on how they call the action.
The idea is in your action profile, use 'processing when saving documents' in processing time. So this means when you save your transaction, your BADI will be called.
Put breakpoint on FM CRM_ACTION_DETERM_COMPL_DOC
So you can know how to get the parameter in below FM.
CALL FUNCTION 'CRM_ACTION_DETERMINE'
EXPORTING
iv_header_guid = iv_header_guid
iv_object_guid = iv_header_guid
iv_at_once_only = iv_at_once_only
iv_for_toolbar_only = iv_for_toolbar_only
iv_no_detlog = iv_no_detlog
iv_context = lv_contexts
iv_trigger_onsave = iv_onsave.
The lv_context will have the data that need to your new button to trigger the action and your EXEC_METHODCALL_PPF BADI.
Btw, why the requirement need processing in new button ? the processing in save button is standard and you don't need to put any event handler
Hope it's work,
Lina
Similar Messages
-
Hi,
I need to make RFC call to ABAP function module with some input parameters.
On click of a button, I need to navigate between views based on returned values.
I have followed steps similar to FlightList example. Created a model, custom controller and all necessary contexts between them.
Basic RFC connection seems to be working fine (I tried to populate a table with the return values for testing purposes) as the table header gets the appropriate values based on model... but the actual values are not being returned.
Please guide me what needs to be done with
1) ButtonAction() method, 2) DoInit( ) method of the model, 3) ...Bapi_execute( )
Or give me the steps to start from fresh, whatever is easier...
Thanks a lot in advance,
DilHi
Steps:
1. First create an instance for bapi and bind the instance to the bapi node.
Z<bapi name> zb=new Z<bapi name>();
wdContext.nodeZ<bapi name>. bind(zb);
2. Then if u have the import parameter u have to set them by using
The instance of the above bapi.
Zb.set<import parameters>;
3. Then Execute the bapi after setting the import parameters.
4. If there is any export parameters, then get the values after execution.
public void onActionsubmit(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
//@@begin onActionsubmit(ServerEvent)
Z<bapi name> zb=new Z<bapi name>();
wdContext.nodeZ<bapi name>. bind(zb);
Zb.set<import parameters>;
try
wdContext.nodeZ<bapi name>_Input().currentZ<bapi name>_InputElement().modelObject().execute();
catch (Exception e)
wdComponentAPI.getMessageManager().reportWarning("Exception:"+e);
// code for getting values from response node
//@@end
Hope this helps,
Regards,
Arun -
How to call ME21n Screen in webdynpro once you click any button
Hi exports,
I have created one webdynpro application..In first view i have one button which have action...Once i click that button
it should go to next view where it should diaplay standard Transaction ME21n screen..where i need to enter all PO details..finally PO should be created auotomatically like normal SAP...
Can anybody plz help me how can i acheive this?
Thanks & regards,
Praveena.You have to create Transaction iView for ME21n in portal.
Call the iView using portal integration api
Web Dynpro for ABAP Portal Integration [original link is broken] -
Hi,
I am new to JSF.
Here is my problem.
I have a select one menu and command button on a page
When ever the page loads for the first time the select one menu is loaded with the data and the button should be disabled.
When an item is selected from the menu the button should be enabled.
Upto this part I finished.
Now the problem is with button.When I click the button the corresponding action method is not calling.
If the button is enabled during page load then the action method is calling when ever I click the button.
But I need to make the button disabled until I select an item from the
select one menu.In this case the action method is not calling when I click the button.
Please help me.
Thanks in advanceThanks for fast response.
Here is my jsp code:
<script>
function enableLoad(){
if(document.getElementById("form1:menu1").selectedIndex==0){
document.getElementById("form1:loadTable").value = 'true';
else{
document.getElementById("form1:loadTable").value = 'false';
document.getElementById("form1").submit();
</script>
<h:form styleClass="form" id="form1">
<TABLE class="tableBorder" cellspacing="10" cellpadding="10">
<TR>
<TD width="230" align="right">
<SPAN class="outputtext">Select The Table To Manage:</SPAN>
</TD>
<TD>
<h:selectOneMenu styleClass="selectOneMenu" id="menu1" value="#{manageReferenceTablesMB.tableValue}"
onchange="enableLoad()">
<f:selectItems value="#{manageReferenceTablesMB.tableNames}" />
</h:selectOneMenu>
</TD>
</TR>
<TR>
<h:inputHidden id="loadTable" value="#{manageReferenceTablesMB.loadTable}"/>
<TD colspan="2" align="right">
<hx:commandExButton type="submit" value="Load Table"
styleClass="commandExButton" id="button1" disabled="#{manageReferenceTablesMB.loadTable}"
action="#{manageReferenceTablesMB.refTable}"></hx:commandExButton>
</TD>
</TR>
</TABLE>
</h:form>
This is the backing bean code:
public class ManageReferenceTablesMB extends BaseMB{
public SelectItem[] tableNames;
public String tableValue = "-1";
public boolean loadTable ;
public ManageReferenceTablesMB(){
super(SessionConstants.MANAGE_REFERENCE_TABLES);
if (this.getFromPageDataBuffer(SessionConstants.MANAGE_REFERENCE_TABLES) == null){
System.out.println("in constructor");
Hashtable results = new Hashtable();
SwqmisFrontController controller = this.getFrontController();
results = controller.getRefTableNames();
tableNames = buildMenu((Vector) results.get("REF_TABLE_NAMES"));
System.out.println("added data");
System.out.println("........."+tableValue+"..........");
this.addToPageDataBuffer(SessionConstants.MANAGE_REFERENCE_TABLES,this);
}else{
this.tableNames = ((ManageReferenceTablesMB)this.getFromPageDataBuffer(SessionConstants.MANAGE_REFERENCE_TABLES)).tableNames;
this.tableValue = ((ManageReferenceTablesMB)this.getFromPageDataBuffer(SessionConstants.MANAGE_REFERENCE_TABLES)).tableValue;
this.loadTable = ((ManageReferenceTablesMB)this.getFromPageDataBuffer(SessionConstants.MANAGE_REFERENCE_TABLES)).loadTable;
public String refTable(){
System.out.println("IN REF TABLE");
System.out.println("....."+tableValue+".......");
Hashtable results = new Hashtable();
SwqmisFrontController controller = this.getFrontController();
results = controller.getRefTable(getDisplayText(tableNames,tableValue));
if(results!=null && results.size()>1)
System.out.println("success");
else
System.out.println("failure");
return "success";
* @return Returns the tableNames.
public SelectItem[] getTableNames() {
return tableNames;
* @param tableNames The tableNames to set.
public void setTableNames(SelectItem[] tableNames) {
this.tableNames = tableNames;
* @return Returns the tableValue.
public String getTableValue() {
return tableValue;
* @param tableValue The tableValue to set.
public void setTableValue(String tableValue) {
this.tableValue = tableValue;
* @return Returns the loadTable.
public boolean isLoadTable() {
return loadTable;
* @param loadTable The loadTable to set.
public void setLoadTable(boolean loadTable) {
this.loadTable = loadTable;
In the above backing bean code the loadTable value is false.
So under this condition the action method is calling.B'cause the button is in enable state even there is no section in the menu.
If I make loadTable=true then the action button is in disabled state until the menu item is selected. But the action method is not executing in this case.
Thanks. -
Add new line in ALV report on click of button...
Dear All,
How to add a new line for input in ALV report at runtime, on click of a button.
Waiting for early and favorable reply.
Regards,
Dharmesh VyasHi,
First of all u have to Create ur own PF-status and Assign Fcode e.g 'INSERTROW'.
So, whenevr you will click Insertrow button it will be triggered in your User Command and then just Append the blank line in your Final Internal Table.
And Refresh Icon will be there by default...
To Trigger it You have to write rs_selfield-refresh = 'X'
You can also follow the below link...
Try it.
Link:[http://wiki.sdn.sap.com/wiki/display/ABAP/ALVeasytutorial].
Regards
Arbind -
Calling URL when click on buttons using web dynpro - ABAP
Hi All,
I am new to web dynpro application development and i am facing issue when i try to test my application.
simple require when i click on button i should direct the to one of url say 'http://www.google.co.in/' my application is activate with no error but when i test the application i am getting below error , can someone please provide me the solution or way out.
The URL http://ides47:8062/sap/bc/webdynpro/sap/zwa_calling_url/ was not called due to an error.
Note
The following error text was processed in the system N6Q : Access via 'NULL' object reference not possible.
The error occurred on the application server IDES47_N6Q_62 and in the work process 0 .
The termination type was: RABAX_STATE
The ABAP call stack was:
Method: IF_WDR_CONTEXT_MENU_HANDLER~CONTEXT_MENU_CALLED of program CL_WDR_INTERNAL_WINDOW_ADAPTERCP
Method: IF_WDR_CONTEXT_MENU_HANDLER~CONTEXT_MENU_CALLED of program CL_WDR_INTERNAL_WINDOW_ADAPTERCP
Method: IF_WDR_ADAPTER_EVENT_HANDLER~HANDLE_EVENT of program CL_WDR_CONTEXT_MENU_HANDLER===CP
Method: IF_WDR_CLIENT~GET_CLIENT_UPDATES of program CL_WDR_CLIENT_SSR=============CP
Method: EXECUTE of program CL_WDR_MAIN_TASK==============CP
Method: IF_HTTP_EXTENSION~HANDLE_REQUEST of program CL_WDR_MAIN_TASK==============CP
Method: EXECUTE_REQUEST_FROM_MEMORY of program CL_HTTP_SERVER================CP
Function: HTTP_DISPATCH_REQUEST of program SAPLHTTP_RUNTIME
Module: %_HTTP_START of program SAPMHTTP
HTTP 500 - Internal Server Error
Thanks,
ParabHi ,
It seesms something you are missing. It would be easy for us if you could paste your code which you have written in the Action of Button.
Sample code for your reference :
METHOD onactionget_url .
data lo_window_manager type ref to if_wd_window_manager.
data lo_api_component type ref to if_wd_component.
data lo_window type ref to if_wd_window.
lo_api_component = wd_comp_controller->wd_get_api( ).
lo_window_manager = lo_api_component->get_window_manager( ).
CALL METHOD lo_window_manager->CREATE_EXTERNAL_WINDOW
EXPORTING
URL = 'http://www.google.co.in/'
MODAL = ABAP_FALSE
HAS_MENUBAR = ABAP_TRUE
IS_RESIZABLE = ABAP_TRUE
HAS_SCROLLBARS = ABAP_TRUE
HAS_STATUSBAR = ABAP_TRUE
HAS_TOOLBAR = ABAP_TRUE
HAS_LOCATION = ABAP_TRUE
RECEIVING
WINDOW = lo_window.lo_window->open( ).
ENDMETHOD. -
Professional way to call that frame on button click?
Hi
Nice to get new look and feel for forum :)
Wel my question is I have a frame which has many buttons textfields labels and other components too.
On clicking one of the button I am opening a frame which is like calculator(display is same as calculator)
I am using frame for that calculator.
My question is that what will be the most professional way to call that frame on button click?
All you java professionals your kind attention will be appreciated
RegardsGood question, I've often wondered this myself!
Personally, I don't like to use anonymous inner classes for handling events. I generally handle events two ways:
1. Make the main class implement lots of interfaces and use action commands. eg
public class MyFrame extends JFrame implements ActionListener {
public static final String CALC_BUTTON = "cb";
public MyFrame() {
super();
JButton cButton = new JButton("Calculator");
cButton.addActionListener(this);
cButton.setActionCommand(CALC_BUTTON);
public void actionPerformed(ActionEvent ae) {
if (ae.getActionCommand().equals(CALC_BUTTON) {
//do something
2. Subclass AbstractAction.
public class MyAction extends AbstractAction {
//create a constructor specific to the goal
public MyAction(/*Some arguments*/) {
//set variables
public void actionPerformed(ActionEvent ae) {
//handle the action
//and in the main class
JButton cButton = new JButton("Calculator");
cButton.setAction(new MyAction());I tend to use the first method more often, but if there's some specific kind of action, then I use the second method.
I'm interested to know what other people do though. :)
-Muel -
Bug? calling javascript click() on a hidden button causes js error on page
I call the .click() method on a hidden button to cause the page to refresh. This works OK, but when the page comes back up, it has a javascript error on it. It turns out the error is from some javascript that is trying to set the focus on the hidden button that was clicked, which causes an error in IE (This doesn't seem to bother Firefox) .
While I imagine that there are workarounds, why should the underlying faces architecture be setting the focus to a hidden button?
It's easy to duplicate:
Create new page. Add two buttons. For the first, make it invisible (uncheck visible in properties), then cause it to submit a virtual form.
For the second, add this to the onclick:
document.getElementById("form1:button1").click();return false;
Bring up the page, click on the visible button. The page will refresh, and you'll have a nice js error.
BTW: Obviously, I don't want to click one button from another. What I want is a way to cause an action to happen from javascript. I can't imagine it would work to simply submit a form from javascript, so I use this method. It works fine except for the error. Is there a better way to do this?which causes an error in IE (This doesn't seem to bother Firefox) .Vaious browsers behave differently at times when executing javascript code. Many instances of this can be found on the net. This is a browser specific problem.So it's ok to set the focus to a hidden button because firefox is more relaxed about this obvious error than explorer is? When would anyone really want a hidden button to gain focus? What do I tell my users--don't use explorer, because it doesn't like it when faces sets the focus to a hidden button? Ignore the error message you get? What?
BTW: Obviously, I don't want to click one button from another. >>What I want is a way to cause an action to happen from javascript.Please describe in detail what action you would like to perform from javascript. It is not clear as to what the use case is.
I don't really see how the use case matters. I gave a very easy example how to duplicate this problem. The reason that I want to do this is that there are many places to enter javascript code that don't allow for an action to be triggered. I have many instances of this. For example, I'd like a mouseover on an edit field to cause an action. I can capture this in javascript, but I can't cause any server side processing. To get around this limitation, I call the hidden button's .click method, which does cause a server side event.
Here's a simpler, more direct incarnation of this error that doesn't involve javascript.
Create a new page. Put an element on it, like an edit box. Put a button on the page. For its action, put:
public String button1_action() {
getButton1().setVisible(false);
return null;
Pressing this button will cause a page refresh, and then a javascript error.
Use Case: After the user presses the button, they shouldn't be allowed to press or see it again. -
When I am on a phone call and I double click the button to go to my home screen, then open another application (usually my calendar program, Calengoo), my screen goes blank and I am not able to return to either the app, the phone, or the home screen. If I am speaking to a person, if they hang up then I am back to the phone application. If I'm leaving a message, I am unable to return to the phone screen to end the call, and have to wait until the other phone hangs up. I'm also unable to switch back and forth to look at my calendar if I'm calling someone about scheduling. This has only started happening since the most recent iOs update. I run into situations similar to this about once per day during the work week, as I use my phone is this manner quite often. While not life altering it is quite frustrating. Can anyone here help me figure out a way to avoid this? If it helps, I have noticed a general downgrade in overall performance starting two system updates ago (apps opening more slowly, closing unexpectedly more often, etc.). I have an iPhone 3GS with the latest OS update.
Thank you for any help or suggestions,
ChrisI could be corrupted backup.
You can check the notification settings for message.
Settings>Notification Center>Messages>Alert Style
It should be on Banners or Alerts.
Settings>Messages> Turn on Imessage and send as SMS and below that "Blocked" to check if you have any numbers block might be blocking the message.
You can also do a hard reset by holding power and home till it restarts and release after seeing the apple logo.
Still doesn't work? Settings>General>Reset>Reset all settings -
Is there a way to answer the 5c without swiping? It really is a pain and hard to do at times one handed. Maybe allow favorites to be answered with a click of the home button or possibly all calls with a home button push. First smart phone I have owned and the old flip phone was much easier to answer.....just press one button.
Is there a way to answer the 5c without swiping? It really is a pain and hard to do at times one handed. Maybe allow favorites to be answered with a click of the home button or possibly all calls with a home button push. First smart phone I have owned and the old flip phone was much easier to answer.....just press one button.
-
Call smart form on button click
Hi Experts,
I have a screen. In screen a button is available. I need when i clicked on button my smartform should be open. Plz provide me ur appreciated solution.
Regards,
SwapniksHi Swapnika,
You forgot a small code in between.
data: v_formname type tdsfname value 'zmem',
v_fmname type rs381_fname
Case sy-ucomm.
when 'okbut'.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
FORMNAME = v_formname
IMPORTING
FM_NAME = v_fname
call function v_fname.
exporting
pernr = itab-pernr.
tables
itab = itab.
Regards,
Prakash Pandey -
Calling default browser on button click in swings
Hi all,
I have built a window with tab page in it having a button on tabpage in java SWING. Now i want that when ever i click on button it calls my default browser i.e. IE6 with a predefined URL. The browser should open with in the tabpage area not beyond that. Please help........ Many people have helped till now because i am very new to this.......
Again looking for help from experts................I feel like I answer this almost everyday
search the web for JDIC and webbrowser -
What FM is called on click of "To Form Selection" button in team viewer
Hi experts,
I am working in team viewer in MSS portal and need to cutomize some code in any FM that gets called when you click on button "to form selection" after selecting employee. I rsearched everywhere in portal and all documentation in company and SDN but could not find any information. Could you please share this information if you happen to know the answer?
Thanks.
MithunHello All,
Can some one please help me out to find a place where we can write our code on click of Login button in EP 7.4.
Regards,
Rajesh -
Button action only from the second click on
Hello, everybody!
I´m facing a weird problem on my application. I have a button that
takes action only from the second click on. My vi has several buttons,
all of them have the same type, and all of them work properly(since the
first click) except one.
I gave up a few minutes ago...any ideas?
Thank you,
LuannaHi
Well this sounds quite strange. The best way to help you is to comment your vi. I think a picture is not enough, as we have to see the behaviour.
So - is it possible for you to post the vi here?
Using LV8.0
Don't be afraid to rate a good answer... -
Calling function by clicking a button in JSP?
Can I call specific function (present in my JSP page) by clicking a button?
Regards,
sumitI am using TimerTask in my JSP page to print some message:
<%
Timer timer = new Timer();
TimerTask monitorTimerTask = new Monitor();
timer.schedule(monitorTimerTask,1000,1000);
%>
<%!
private class Monitor extends TimerTask{
int i = 0;
public void run(){
System.out.println("TimerTask ["+i+"]");
++i;
%>And to stop the TimerTask daemon, I created the following function:
<%!
public void stopTimerTask(){
if(monitorTimerTask != null){
System.out.println("Stopping the Timer Task");
monitorTimerTask.cancel();
%>Now, I am trying to call funtion "stopTimerTask()" by click of a button in JSP page. The function is being called BUT the daemon keeps on printing the text message to the console. It means the above function is not able to stop the TimerTask.
What to do?
Please help!
Thanks,
sumit
Maybe you are looking for
-
This seems like a major privacy concern, but mainly I'm just very curious how this can possibly happen: The Game Center app suggests primarily people I have met in real life... but have had NO online interaction with! I life in a high-population US c
-
I can no longer update existing or download new apps onto my MacBook Pro of late?
I can no longer update either existing; or download new apps any more on My MacBook Pro? This is a new thing, and seems to have coincided with getting my new iPhone 4S the week before last? If had the MacBook since Dec 2010, and this is the first tim
-
There's no explanation of "Morning Coffee." What is it and what does it do? It asked me whether I want it and I chose it but without knowing what I was getting into.
-
Workflow Trivia....and begin..
TOOLS: FCP 5.04, G5 Quad, 8GB of Ram. FACTS: 90min program that needs to go to DVD Studio Pro 4 but cannot go thru Compressor from FCP. I have to run Compressor on another machine to keep the Quad open for other projects. A Quicktime Movie file said
-
Database View ---- Execution Time
Dear experts, I hv to improve the performance of a report in which a view has been used. I hv debugged the program, when control goes to query that is fetching data from view, taking very long time. Can anything be done to improve the performance of