Button to trigger action then call URL

Hi all,
Does anyone know if it is possible to create a web dynpro button which when pressed triggers an action. Within the method of this action i want to execute some ABAP code then call a website URL.
Is this possible and does anyone know what the syntax for the URL call would be.
Thanks in advance
Mart

Hi Mart
Use this piece of code in the onaction method of the button
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.com/'
  RECEIVING
    WINDOW         = lo_window.
lo_window->open( ).
Hope this helps u
Regards
Tamil

Similar Messages

  • How can I call my chart in Forms6i on When Button Press Trigger?

    Hi Friends,
    I have make a chart in Graphic Builder 6i and save on path C:\graph\test.ogd
    Now I want to run this Chart from Form6i on When Button Press trigger.
    I have call my report in forms using this command on When Button Press trigger.
    Run_Product(reports,'C:\Cheema\Qdir_store\reports\pmms\sec_backlog',asynchronous,runtime,filesystem,TO_CHAR(NULL));
    So tell me How can I call my chart in Forms6i?
    Please reply me on urgent.
    Thanks,
    Shahzad

    Just to recall after a long break of couple of years..... Pls check out if not wrong.
    First of all you need to embeed the chart object on your layout window and make it visible = FALSE. This is a design time work. In the button press event, show the chart object by setting the visible property = TRUE.
    Note, i could not paste u the sample code as i don't have forms installation on my PC. The above states is a logic you can apply.

  • Use Action to call JSP method instead for forwarding to another url

    I have a servlet button to save data I have entered on a form. The only way I understand to save the data when the button is pressed is to use ACTION and call up a .jsp to do the work like this:
    <FORM ACTION="http://localhost:8080/examples/jsp/learningJSP/UpdateStudentInfo.jsp" METHOD="POST">
    and here's the .jsp that sets my current properties from the form and saves them.
    <HTML>
    <BODY>
    <jsp:useBean id="studentDataBean"
         class="learningservlets.StudentDataBean"
         scope ="application"/>
    <jsp:setProperty name="studentDataBean" property ="*" />
    <!--call saveData() to send the data you just set - to the database%=stuInfo.saveData()%>-->
    <%studentDataBean.saveData();%>
    <jsp:forward page="PresentStudentData.jsp" />
    <H1>
    UpdateStudentInfo Bean
    </H1>
    </BODY>
    </HTML>
    The problem I have with using this approach is my user is sent to another page. Is there anyway to complete the above task transparently (i.e. without making the user go to the page that does all of the work)?
    Thanks for any assistance you may offer.

    Use this,
    UpdateStudentInfo.jsp
    <%@ page import="learningservlets.StudentDataBean" %>
    <jsp:useBean id="studentDataBean"
    class="learningservlets.StudentDataBean"
    scope ="application">
    <jsp:setProperty name="studentDataBean" property ="*" />
    </jsp:useBean>
    <!--call saveData() to send the data you just set - to the
    database%=stuInfo.saveData()%>-->
    <%
    studentDataBean.saveData();
    response.sendRedirect("PresentStudentData.jsp");
    return;
    %>
    Hope this helps.
    Sudha

  • Frm-40735 when-button-pressed trigger raised unhandled  exception ora-03114

    hi everybody,
    i am using oracle 10g release 2 in my test server and 10g release 1 in production server with forms in 10g running through the oracle 10g application server with no problem with our production server.
    but the same form when i try to use through the same application server for my
    with my test database server which is oracle 10g release 2 is giving me
    frm exceptions and disconnecting the session.
    like i get frm-40735 when-button-pressed trigger raised unhandled exception
    ora-03114. then frm-40655 sql error forced rollback;clear form and reenter transaction. then when i try to exit it shows ora-24324 service handle not initialized.
    The same thing when i try with my production server i dont get any exception handle error or forced rollback error.
    i am not facing any problem as such to connect to my test database(release 2)
    through sql plus client or TOAD OR ENTERPRISE MANAGER THEY ARE ALL FINE. IT IS ONLY WHEN I GO THROUGH THE APPLICATION SERVER TO ACCESS MY FORMS I GET THIS ERROR. BUT MY PRODUCTION IS RUNNING THE SAME WAY WITH NO ERRORS.
    any suggestions welcome as i have to bring release 2 in the production next month
    thanks and regards
    manish

    ORA-03114 not connected to ORACLE
    Cause: A call to Oracle was attempted when no connection was established. Usually this happens because a user-written program has not logged on. It may happen if communication trouble causes a disconnection. In addition, this message could occur when ALTER SYSTEM KILL SESSION or ALTER SYSTEM DISCONNECT SESSION were issued with the IMMEDIATE qualifier because, in those cases, the client's connection to the database is terminated without waiting for the client to issue a request.
    Action: Try again. If the message recurs and the program is user written, check the program.
    zaibi.

  • FRM-40735:WHEN-BUTTON-PRESSED trigger raised unhandled exception ORA-06502

    Hi,
    I am trying to run a form in which I have a button which when pressed should display another popup window with few text fields in it. I have a WHEN-BUTTON-PRESSED trigger on that particular button and its raising an exception called
    FRM-40735: WHEN-BUTTON-PRESSED trigger raised unhandled exception ORA-06502.
    When I debug the form with breakpoints its displaying the popup window correctly, but if I run it in a browser as soon as click the button it raises the Unhandled exception given above.
    Can anyone help with this? Urgent please....
    Thanks

    It is VERY good to handle your exceptions, specially a certain pre-defined exceptions like NO_DATA_FOUND, TOO_MANY_ROWS, ZERO_DIVIDE etc...
    You can also find samples on how to create user-defined exceptions, just search the online forms help (press the question mark in forms builder) for "User-Defined"
    But however you handle your exception never ever do
    WHEN OTHERS THEN NULL;If you do that you are telling to forms that no matter what kind of error is thrown do nothing, now that's very dangerous.
    You might also want to check Oracle's documentation on [url http://www.oracle.com/pls/db102/portal.portal_db?selected=5]Application Development and do a search on "Exception Handling"
    Regards,
    Tony
    Message was edited by:
    Tony Garabedian

  • Has anyone used a Button to trigger ISF Code

    Has anyone used a Button to trigger ISF Code
    RequestCenter 2008.3
    Oracle 10g
    Websphere 6.1
    IE6 & IE7
    Hello:
    The documentation specifies that a button can trigger a javascript instead of opening a browser window.  Has anyone done this?
    Below is the section of the documentation that I am referring to.
    Thank you
    Daniel
    Safeway Inc.
    Designers can specify a caption (text to appear on the button)
    and a URL. The URL can point to a JavaScript function or to
    an external page accessible elsewhere on the network.
    When referring to an external web page, use the fully qualified URL.
    • The URL may point to a JavaScript function, available in a library,
    or embed JavaScript code. Form data cannot be included in the
    parameters, if any, included in a function call. However, the function can include ISF.

    Hi Daniel,
    First you'll need a dictionary field to contain the button. Add this dictionary to your Active Form Component.
    Then in ServiceDesigner, go to Active Form Components, select your form, go to Display Properties tab, select the field, and check the "Add a Button" checkbox. Also enter the appropriate Button Text. Then In the URL field, enter "javascript:myFunction();" without the quotes, where myFunction is the name of your JavaScript function.

  • Button that does not redirect to url

    can i create button that does not redirect to url
    to perform a function or action on page, for instance
    i want button to call plsql function but not redirect
    Message was edited by:
    windo

    Hi,
    Yes you can...
    When you create the button, don't set anything for the page / URL redirect. Then go to your pl/sql process definition and set it to fire "when button pressed..." Finally, just make sure you either have a branch set, as a default, redirecting back to your current page or create a branch specifically for "when button pressed..." as well. I usually create a default branch back to the current page for any page that can be submitted with a sequence of 999 (and no conditions) so that it is (usually) the last redirect that is evaluated. This will always save the error "No page to redirect to..." and also saves creating a bunch of unnecessary branches
    Hope this helps,
    Mike

  • Ticker bean and WHEN-BUTTON-PRESSED trigger

    Hi,
    In Forms 6i, I use the Ticker bean. The problem with it, is that it appears on all canevas of my form.
    But if the bean is "stopped" (i.e. the clock is stopped), it works fine and it does not appear on the next canevas I show.
    However, I must have a button for the "stop" and another one that shows my next canevas. If I put the two code lines in the same WHEN-BUTTON-PRESSED trigger of a unique button, the ticker bean is still visible in the new canevas.
    Any help is appreciated.
    Regards,
    Olivier.

    Olivier,
    I think I remember having heard of this before. The reason for this could be that the ticker bean uses AWT classes, which are heavyweight. All you can try is to call
    synchronize;
    between starting and stopping the ticker if using one button only. If this doesn't help, then I don't know of any other solution that could work.
    Frank

  • FRM-40735:WHEN-BUTTON-PRESSED trigger raised unhandled exception ORA-06503

    Hello to all...
    I am developing a form on form 6i like a registration form....
    Suppose emp_name is a text item....
    I need to validate that item such that number ,null and special characters should not be allowed.
    I have created a function to check those validations
    function v_check(p_item_name varchar2)
    return boolean is
    begin
         for i in 1..length(p_item_name)
         loop
              if substr(p_item_name,i,'1') in ('1','2','3','$','%','@','!','#') then
                   return false;
              end if;
         end loop;
    end v_check;
    When i click on save_Record button it commit the form i'm checking the emp_name field with this validation by calling the above function.
    for save_Record button i have written this code WHEN-BUTTON-PRESSED trigger
    declare
         a number;
    begin
         if :iptable.ip_name is null or (not v_check(:iptable.ip_name)) then
              set_alert_property('alert',title,'name validation');
              set_alert_property('alert',alert_message_text,'null ans spl char are not allowed');
              a:=show_alert('alert');
              go_item('iptable.ip_name');
              raise form_trigger_failure;
         end if;
         if :system.form_status='CHANGED' then
              set_alert_property('alert',title,'Save Box');
              set_alert_property('alert',alert_message_text,'Do u want to save');
              a:=show_alert('alert');
              if a=alert_button1 then
                   commit_form;
              else
                   raise form_trigger_failure;
              end if;
         else
              set_alert_property('alert',title,'Save Box');
              set_alert_property('alert',alert_message_text,'noting to Save Box');     
              raise form_trigger_failure;
         end if;
    end;
    But i'm gettin this
    FRM-40735:WHEN-BUTTON-PRESSED trigger raised unhandled exception ORA-06503
    exception
    How can i resolve this error...help me
    thanks...
    Edited by: maddyd2k on Nov 25, 2010 10:37 AM

    Hi,
    Your function v_check actually can return a NULL value wich is not TRUE neither FALSE.
    Modify your function like this :
    function v_check(p_item_name varchar2)
    return boolean is
    l_return boolean := true;
    begin
    for i in 1..length(p_item_name)
    loop
    if substr(p_item_name,i,'1') in ('1','2','3','$','%','@','!','#') then
    l_return := false;
    end if;
    end loop;
    return l_return;
    end v_check;

  • Crash when creating advanced action with "open URL"

    Hi there,
    my crash problem (captivate 5.5, win 7 64 bit, adobe PP CS6 installed):
    On one slide of my project, I have a slide video and a button at a certain point. First I created an advanced action (open URL in a new window and pause slide video). Then I saved the action and assigned it to the button. Til here, all was ok.
    Then, I wanted to change the URL in the advanced action.
    When I opened the created action, the "open URL"-parameter disappeared, but the table row was shown empy:
    Then I wanted to assign a new URL. After creating a new "open URL"-paramter I wanted to save the changes. And then captivate crashed with this fatal error:
    And from this time, every time I want to change - or even create a new action with the above mentioned parameters - captivate crashes.
    can anyone reproduce this error? Is this a bug (or a feature ;-), or did I something wrong?
    Thanks
    Markus

    Hi Aditya,
    thanks for your post.
    2. Create a new project and try the same thing
    I created a new project....same problem...
    If you face the same channel, then try recreating the Adobe Captivate preferences. Please follow the steps mentioned here :
    1. Close Adobe Captivate.
    2. Locate the preference folder:
            Windows Vista and Windows 7: C:\Users\[user name]\AppData\Local\Adobe\Adobe Captivate 5.5 folder
    3. Rename the preference folder.
    I didn't found a preference folder in the captivate 5.5 folder. Here is my captivate 5.5 folder:
    what to do now?? Now I am at a loss...

  • Frm-40735-when-button-pressed trigger raises unhandled exception ora-01430

    Hi,
    I am running my developer6i application on winxp on one of my clinet side I got error frm-40735-when-button-pressed trigger raises unhandled exception ora-01430 when I press the button which give me the alter button to select yes or no before this the error araises.. but in the other client side its working correctlly with no such error message on same OS and developer6i version...

    i suppose you are getting 1403 and not 1430
    ++++++
    Error: ORA 1430
    Text: column being added already exists in table
    Cause: An ALTER TABLE ADD statement specified the name of a column that is
    already in the table.
    All column names must be unique within a table.
    Action: Specify a unique name for the new column, then re-execute the
    statement.
    ++++++
    1403 is no data found
    so most likely you are executing a
    select ... into ...
    which is user dependent through where clause
    that might be an explanation to your problem
    but more info is needed on that
    and surely you must clarify the ORA error you are getting.

  • Trigger actions through a program

    Hi experts,
      Here is my business functionality.
      I have to implement a badi for a customer request in crm. this would check the product against the reason code entered. If both match then i need to trigger action (actions are already defined) otherwise i have to collect error message in application log. I am through with the later half but dont know how to proceeed to action triggering.
      Can somebody pls help me out. Thanks in advance

    Hi Manuel,
    I have already seen that blog but when i copied the program , it gave me the error when the method for triggering the action is called. it gave me a short dump sayin
    Access via 'NULL' object reference not possible.
    The reason for the exception is:
    You attempted to use a 'NULL' object reference (points to 'nothing')
    access a component (variable: "LV_ACTION").
    An object reference must point to an object (an instance of a class)
    before it can be used to access components.
    Either the reference was never set or it was set to 'NULL' using the
    CLEAR statement.
    at line CALL METHOD lv_action->set_is_inactiv( space )..  "
    and since i have never used this method, i dont know how to solve this error. so can you please help me out with this

  • How do I execute a 'remote' when-button-pressed trigger?

    I am using Forms 6 in an 8i/10g environment. I have a data block (COMPACT) which is on canvas MAIN. Compact has an item (button) called CREATE_COMPACT, with a when-button-pressed trigger. I also have an error canvas which has a button called RESTART, so they can restart the entire build after an error. The restart code is exactly the same as the create_compact code, and, after the restart, I want the focus to be the main canvas, so I would like to just have the restart when-button-pressed trigger shift focus to the CREATE_COMPACT trigger and execute it. I have tried:
    go_item( 'Compact.Create_Compact' );
    do_key( 'Enter' );
    This switched me to CREATE_COMPACT but did not execute the trigger. I then tried:
    execute_trigger( 'Compact.Create_Compact' );
    and then:
    execute_trigger( 'Create_Compact' );
    but neither of these work. I get error FRM-40700 no such trigger. Is there any way to do this short of copying code or creating a pl/sql procedure?
    thanks

    do_key('ENTER') will execute the code in a KEY-ENTER trigger so I suggest you move your code into the KEY-ENTER trigger. On your when-button-pressed trigger you should also use do_key('ENTER');

  • How do you make an array of image icons and then call them?

    How do you make an array of image icons and then call them, i have searched all over the internet for making an array of icons, but i have
    found nothing. Below is my attempt at making an array of icons, but i cant seem to make it work. Basically, i want the image to match the value of the roll of the dice (rollVal)
    Any help would be greatly appreciated, some code or link to tuturial, ect.
    /** DiceRoller.java
    * Roll, print, Gui
    import javax.swing.*;
    public class DiceRoller extends JFrame
         private ImageIcon[] image  ;
         public String[] images = { "empty", "dice1.jpg",
                   "dice2.jpg", "dice3.jpg", "dice4.jpg",
                   "dice5.jpg", "dice6.jpg" };
         public Dice die;
         private int rollVal;
         public int rollNum;
         private JLabel j1;
         public DiceRoller(){
              j1= new JLabel("");
           die =new Dice();
           int rollVal;
           rollVal = die.roll();     
           image = new  ImageIcon[images.length];
         for(int i = 0; i < images.length; i++){
          image[i] = new ImageIcon(images);
         if (image!=null){
              j1.setIcon(image[rollVal]);
         System.out.println("Roll = "+die.roll());

    Demo:
    import java.awt.*;
    import java.net.*;
    import javax.swing.*;
    public class IconExample {
        public static void main(String[] args) {
            EventQueue.invokeLater(new Runnable(){
                public void run() {
                    launch();
        static void launch() {
            try {
                Icon[] icons = new Icon[6];
                for(int i=0; i<icons.length; ++i) {
                    String url = "http://www.eureka-puzzle.be/cast/images/dice" + (i + 1) + ".jpg";
                    icons[i] = new ImageIcon(new URL(url));
                display(icons);
            } catch (MalformedURLException e) {
                throw new RuntimeException(e);
        static void display(Icon[] icons) {
            JPanel cp = new JPanel();
            for(Icon icon : icons) {
                cp.add(new JLabel(icon));
            JFrame f = new JFrame();
            f.setContentPane(cp);
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.pack();
            f.setLocationRelativeTo(null);
            f.setVisible(true);
    }

  • I want to send a response from the servlet and then call another servlet.

    Hi,
    I want to send a response from the servlet and then call another servlet. can this happen. Here is my scenario.
    1. Capture all the information from a form including an Email address and submit it to a servlet.
    2. Now send a message to the browser that the request will be processed and mailed.
    3. Now execute the request and give a mail to the mentioned Email.
    Can this be done in any way even by calling another servlet from within a servlet or any other way.
    Can any one Please help me out.
    Thanks,
    Ramesh

    Maybe that will help you (This is registration sample):
    1.You have Registration.html;
    2.You have Registration servlet;
    3.You have CheckUser servlet;
    4.And last you have Dispatcher between all.
    See the code:
    Registration.html
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <HTML>
      <HEAD>
        <TITLE>Hello registration</TITLE>
      </HEAD>
      <BODY>
      <H1>Entry</H1>
    <FORM ACTION="helloservlet" METHOD="POST">
    <LEFT>
    User: <INPUT TYPE="TEXT" NAME="login" SIZE=10><BR>
    Password: <INPUT TYPE="PASSWORD" NAME="password" SIZE=10><BR>
    <P>
    <TABLE CELLSPACING=1>
    <TR>
    <TH><SMALL>
    <INPUT TYPE="SUBMIT" NAME="logon" VALUE="Entry">
    </SMALL>
    <TH><SMALL>
    <INPUT TYPE="SUBMIT" NAME="registration" VALUE="Registration">
    </SMALL>
    </TABLE>
    </LEFT>
    </FORM>
    <BR>
      </BODY>
    </HTML>
    Dispatcher.java
    package mybeans;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import javax.servlet.ServletException;
    import java.io.IOException;
    import javax.servlet.RequestDispatcher;
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class Dispatcher extends HttpServlet {
        protected void forward(String address, HttpServletRequest request,
                               HttpServletResponse response)
                               throws ServletException, IOException {
                                   RequestDispatcher dispatcher = getServletContext().
                                   getRequestDispatcher(address);
                                   dispatcher.forward(request, response);
    Registration.java
    package mybeans;
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class Registration extends Dispatcher {
        public String getServletInfo() {
            return "Registration servlet";
        public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
            ServletContext ctx = getServletContext();
            if(request.getParameter("logon") != null) {          
                this.forward("/CheckUser", request, response);
            else if (request.getParameter("registration") != null)  {         
                this.forward("/registration.html", request, response);
    CheckUser.java
    package mybeans;
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.sql.*;
    public class CheckUser extends Dispatcher {
        Connection conn;
        Statement stat;
        ResultSet rs;
          String cur_UserName;
        public static String cur_UserSurname;;
        String cur_UserOtchestvo;
        public String getServletInfo() {
            return "Registration servlet";
        public void service(HttpServletRequest request, HttpServletResponse response)
        throws ServletException, IOException {
            try{
                ServletContext ctx = getServletContext();
                Class.forName("oracle.jdbc.driver.OracleDriver");
                conn = DriverManager.getConnection("jdbc:oracle:oci:@eugenz","SYSTEM", "manager");
                stat = conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE);
               String queryDB = "SELECT ID, Login, Password FROM TLogon WHERE Login = ? AND Password = ?";
                PreparedStatement ps = conn.prepareStatement(queryDB); 
               User user = new User();
            user.setLogin(request.getParameter("login"));
            String cur_Login = user.getLogin();
            ps.setString(1, cur_Login);
            user.setPassword(request.getParameter("password"));
            String cur_Password = user.getPassword();
            ps.setString(2, cur_Password);
         Password = admin");
            rs = ps.executeQuery();
                 String sn = "Zatoka";
            String n = "Eugen";
            String queryPeople = "SELECT ID, Surname FROM People WHERE ID = ?";
           PreparedStatement psPeople = conn.prepareStatement(queryPeople);
                      if(rs.next()) {
                int logonID = rs.getInt("ID");
                psPeople.setInt(1, logonID);
                rs = psPeople.executeQuery();
                rs.next();
                       user.setSurname(rs.getString("Surname"));
              FROM TLogon, People WHERE TLogon.ID = People.ID";
                       ctx.setAttribute("user", user);
                this.forward("/successLogin.jsp", request, response);
            this.forward("/registration.html", request, response);
            catch(Exception exception) {
    }CheckUser.java maybe incorrect, but it's not serious, because see the principe (conception).
    Main is Dispatcher.java. This class is dispatcher between all servlets.

Maybe you are looking for

  • Doubt in CJ20N Transaction PS Module

    Hello experts, I have a Requirement which is as Follows: After Entering to Transaction CJ20N, i am choosing the Project definitions, and after that choosing the Project Structure and then the Easy Cost Planning. After that am choosing the planning fo

  • Export Book to PDF shows bad colours

    Hi all, I have created a book in Aperture, starting from a set of RAW/TIFF pictures. If I preview/export the book in PDF, it looks VERY BAD in the dark areas (posterized to very few RGB tones). The problem appears ONLY when I use the "Save as PDF" op

  • Specify field mapping when changing table location

    I want to change the tables in a report to refer to database tables with a different schema, and specify the mapping of fields in code. I already have code that changes table locations successfully when the schema does not differ, using the RAS API.

  • Need help restoring W7 64 bit Home Premium to my Gateway desktop

    I lost my system due to a hal.dll message last wed 7/5. After trying for several days I finally realized my 2nd HD was screwing up my boot sequence I was trying to boot from an old WindowsXP file on the 2nd HD. Disconnected the HD and tried doing a c

  • Observable and ActionListener.. help

    Is there anyway to pause update method and continue after I click the �Add Student� button? The update method is called automatically when my observable object is changed, so I can�t display previous observable information via the button�s ActionList