Causing an event in one VI when called from another

Hi All
I wonder if anyone could give me some advice on this. I have a VI, which displays the value of a text control, as a ‘value change’ event using an indicator. If I run this, having checked the ‘update will typing’ parameter for the control, the VI runs as expected and the indicator displays what I type. If I call the VI by reference from another and pass a string to the text control using the Set Control Value [Variant] method, the indicator remains blank, even though I can see the text control is being updated. I’m guessing this is because the event structure is expecting a user generated event which is no longer occurring. Is there any way to re-configure the code so that a value passed in this way, would be seen as an event? I've tried to get some idea from the Labview examples but not being too familiar with the way events work, I'm struggling to make sense of it. (I’m using Labview 7.1)
Thanks
Bruce

knight2 wrote:
Thanks tbob & Christian.
Can I just check this? I need to create a new control or indicator in the main VI and create a reference to it. This would then be passed to the subvi and I’m assuming, wired to the Value (signaling) property? If not, where should it go? I'm not too clear on this bit.
That said, I currently call the subvi from main, by reference. This was because I needed the subvi front panel to be visible before sending text to it. As I’m not passing any values via the connector pane, can the control/indicator reference still be passed?
Thanks
Bruce
Yes, your first paragraph is correct.  Pass the ref to the subvi and use Value(Sgnl) property node in the subvi.  This causes an event for the control, and since it is a reference, the event gets carried to the source of the reference, which is in Main.
To pass control references (or any object) to a subvi that is called by reference, you can use the Call by Reference method as shown in the attached Main vi.  This allows you to pass items into and out of the subvi called by reference.  If you use the standard way and use GetControlValue and SetControlValue, I don't think you can cause an event in Main by changing a value in the subvi.  If you use the method in my vi, you can use the Value(Sgnl) property in the subvi to cause an event in the Main vi.  This is the only way I know how to send events from a subvi to the main.
Download the subvi first and put it in some directory.  Then download the main and put it in the same directory as the subvi.  Then when you open Main, it should find the subvi.
- tbob
Inventor of the WORM Global
Attachments:
MainVI_Ref.vi ‏14 KB
SubVI_Ref.vi ‏11 KB

Similar Messages

  • Populating selection screen of one prog by calling from another prog

    This is regarding variant population.
    I need to populate values in selection screen fields of one program (program 2)by calling from another executable ABAP program(.Program 1)
    I can identify the variant that i need ot populate.But there is a pushbutton in the selection screen of Program 2 which on clicking leads to some more fields in a pop up screen.How can I populate values in those fields there ?Please help.
    Thanks & Regards,
    Savitha

    I got a problem like that, then I tried to do a BDC, but it doesn't accept BDC's so I made a vbs program. This could help:
    FORM exec_vbs .
      DATA:BEGIN OF it_file OCCURS 0,
               line TYPE string,
           END OF it_file.
      DATA:filename     TYPE     string.
      CLEAR it_file[].
      it_file-line = 'msgbox "Variant will be updated, please don''t move or minimize the screen"'.
      append it_file.
      it_file-line = 'Dim objShell:Set objShell = CreateObject("WScript.Shell")'.
      append it_file.
      it_file-line = 'do while(ObjShell.AppActivate("R/A Settlements")=FALSE)'.
      append it_file.
      it_file-line = '  wscript.sleep 2000'.
      append it_file.
      it_file-line = 'loop'.
      append it_file.
      it_file-line = 'wscript.sleep 500:ObjShell.SendKeys "%ye":wscript.sleep 1999'.
      append it_file.
      it_file-line = 'do while(ObjShell.AppActivate("SAP Easy Access")=FALSE)'.
      append it_file.
      it_file-line = '  wscript.sleep 1000'.
      append it_file.
      it_file-line = 'loop'.
      append it_file.
      it_file-line = 'ObjShell.SendKeys "cj8g":wscript.sleep 940:ObjShell.SendKeys ""'.
      append it_file.
      it_file-line = 'wscript.sleep 1500'.
      append it_file.
      it_file-line = 'do while(ObjShell.AppActivate("Actual Settlement")=FALSE)'.
      append it_file.
      it_file-line = '  wscript.sleep 1000'.
      append it_file.
      it_file-line = 'loop'.
      append it_file.
      it_file-line = 'wscript.sleep 1950'.
      append it_file.
      it_file-line = '''controlshiftF7'.
      append it_file.
      it_file-line = 'ObjShell.SendKeys "^+":wscript.sleep 3100'.
      append it_file.
      it_file-line = '''shift+F2'.
      append it_file.
      it_file-line = 'ObjShell.SendKeys "+":wscript.sleep 2199'.
      append it_file.
      it_file-line = '''shift+F10'.
      append it_file.
      it_file-line = 'ObjShell.SendKeys "+":wscript.sleep 500:''SCROL DOWN'.
      append it_file.
      it_file-line = 'for x = 1 to 2: ObjShell.SendKeys "":wscript.sleep 500:next'.
      append it_file.
      it_file-line = '  wscript.sleep 500:ObjShell.SendKeys "":Wscript.Sleep 950'.
      append it_file.
      it_file-line = '''shift+F4'.
      append it_file.
      it_file-line = 'ObjShell.SendKeys "+":Wscript.Sleep 1999:ObjShell.SendKeys "+ it_file-line = 'Wscript.Sleep 1000:ObjShell.SendKeys "C:\TEMP\Worksheet.txt"'.
      append it_file.
      clear it_file-line.
      concatenate 'Wscript.Sleep 500:ObjShell.SendKeys "' TEMP_FOLDER '\Worksheet.txt' '"' into it_file-line.
      append it_file.
      it_file-line = 'Wscript.Sleep 400:ObjShell.SendKeys "":Wscript.Sleep 2500:ObjShell.SendKeys "":Wscript.Sleep 1900'.
      append it_file.
      it_file-line = 'ObjShell.SendKeys "^s":Wscript.Sleep 2900'.
      append it_file.
      it_file-line = 'ObjShell.SendKeys "+":Wscript.Sleep 1200'.
      append it_file.
      it_file-line = 'ObjShell.SendKeys "+":Wscript.Sleep 1200'.
      append it_file.
      it_file-line = 'ObjShell.SendKeys "%"'.
      append it_file.
      it_file-line = 'Wscript.Sleep 1700'.
      append it_file.
      concatenate TEMP_FOLDER '\settle.vbs' into filename.
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          filename = filename
        TABLES
          data_tab = it_file.
      CALL FUNCTION 'WS_EXECUTE'
        EXPORTING
          PROGRAM = filename.
      IF SY-SUBRC <> 0.
      ENDIF.

  • File upload hanging when called from another form

    Hi
    I have created a file upload form from the documentation I found on metalink and the form works fine on its own. I have then implemented the form into a multi form application and when the file upload form is called from another form it hangs trying to get to the client drive so that it can pick up a file. I have tried using the 'call_form', 'open_form' and 'new_form' built-ins but the results were all the same. Can anybody help me?
    Maria

    Hello,
    This is not the support, so there are no post more urgent than other.
    Francois

  • How do I return Labview errors from a LV executable when calling from another applicatio​n?

    I want to call my LV executable from another programming language, Spectrum. How can I return any LV errors to this application.

    > I want to call my LV executable from another programming language,
    > Spectrum. How can I return any LV errors to this application.
    >
    I don't have a PC in front of me, but what I'd try is to write to stderr
    or stdout. If that is not possible, the other possibilities depending
    on what Spectrum supports is to try named pipes or TCP/IP.
    Greg McKaskle

  • How do I return Labview errors from a LV executable when calling from another application?

    I'm calling a third party executable under WindowsXP. The program returns an exit code when complete. I tried Sys Exec VI, but the 'return code' field does not seem to grab the exit code. Help.

    Although I am not fully verse in this subject, I have to disagree because of previous experiences I had.
    You can write executables that return "exit codes". For example, in C++ you can use the function exit(). The syntax of the function is:
    #include
    void exit(int status);
    "status" is provided for the calling process as the exit status of the process. Typically a value of 0 is used to indicate a normal exit, and a nonzero value indicates some error.
    In the past I've seen commercial applications that allows you add your own functions. Sometimes what the application expect is an exit code after your custom .exe executes.
    Unfortunatelly, I've been unable to do this with LabVIEW, therefore I must use another development environment
    such as MS VC++ or Borland C++ Builder to accomplish this. I wish I could do that with LabVIEW though...
    Enrique
    www.vartortech.com

  • Can I get the Write window in the foreground when called from another application?

    When windows applications create a new message through thunderbird (quickbooks wants to send an invoice for example) the new message appears in the background and bothers the user who prefered the way outlook would pop up newly created messages in the foreground. The foreground popup is the preferred work flow as the operator clicks 'send invoice' and then the message pops up for review and for the operator to hit send. Now migrating to Thunderbird, in frustration the user is creating many drafts but not always sending the invoice.
    How can I set Thunderbird to popup a new message window in the foreground in this case?
    Thanks in advance.

    Hi, I have the same problem, any version of TB, win7x64 or winXP32... for me is not a problem, but less experienced users, or old people, get puzzled by not seeing the expected window, and usually keep trying, ending with multiple "compose" windows, until they realize they're open in the background...
    I'm trying to get around this using a small free utility I already have in my windows startup folder: Deskpins (see http://www.snapfiles.com/get/deskpins.html). This little app, which sits in the taskbar icon area, can force any window stay on top, (visually) "pinning" it also. Very handy. This little gem also has an optional "autopin" feature, which can "intercept" a new window by class & title (with wildcards). Which windows to intercept,y ou define creating specific rules, from its help:
    <<
    You can configure DeskPins to automatically pin certain windows as soon as they are created. This should be useful in case you always want to make an application topmost (e.g. Calculator, console windows, etc).
    Rules
    You can specify which windows will be auto-pinned by adding auto-pin rules (see Autopin options). Every time a window is created, DeskPins will check whether it satisfies any rules, and if so, it will pin it. A rule consists of two parameters: a title and a class, which are explained below. Both parameters can contain DOS-style wildcards (* and ?) and they are not case sensitive.
    >>
    I tried, and it seems to work.
    when a new "compose" window is created, even when "sending a file to recipient" using windows standard tools (eg: right click on file and send>mail recipient) now I see the window "on top" and is "pinned"... of course it would have been much, much better to have a native better behaviour, but in the meanwhile... this could work. Maybe similar solutions are available for other OSes...
    Marco

  • Keynote presentation does not automatically play upon open when called from another keynote presentation

    I have a master keynote presentation that hyperlinks to other keynote presentations.  The called keynote presentations open, but do not automatically play even though I have marked them to automatically play upon open.  What am I doing incorrectly?

    Automatically Play on open, has the same function as pressing the play button in the tool bar.
    Once the presentation is playing,  it will move to the next slide  depending on
    how you have set the options in:
    Inspector > Document > Presentation
    the choices to advance to the next slide are:
    normal           - requires a keyboard press or a muse click to advance
    Hyperlink       - requires the mouse to click on an object with a hyperlink
    Recorded      - plays back using the recorded narration sound track
    Self-playing   - will advance according to the options in the delay times set in
    Inspector > Document > Presentation

  • JTextField update problem when called from PropertyChangeEvent

    Hi,
    I'm trying to create forms that can be dynamically loaded with Class.forname(formName).
    Those forms should always inherit some methods that make it easy to pass data to
    them and receive data from them. The idea is that the data comes from a table which
    sends a hashmap (String column/JTextField-name + String Value pairs) with firePropertyChanged
    as soon as a new row is seleceted. The JTextFields in the form are marked with setName("FieldName") that has to correspond to the name of the columns of the table.
    My problem is that I can't update the fields in my form when I'm calling getRow(HashMap)
    from within propertyChangeEvent but that's necessary to keep the forms flexible.
    JTextFieldName.setText(newText) just won't work. But it works when I call getRow(HashMap)
    from the constructor. SwingWorker and threads to update the form didn't help.
    I don't need to call pack() / update() / repaint() on the JFrame, do I ??
    update() / validate() / repaint() etc. didn't work on the JTextField themselves.
    Below is the code for one of the test-forms (just a JPanel that is inserted in a frame)
    with all of it's methods. Does anybody have a solution to this problem ??
    Thanks for taking time for that !!
    Benjamin
    * testTable.java
    * Created on 15. April 2004, 16:12
    package viewcontrol.GUI;
    * @author gerbarmb
    import javax.swing.*;
    import java.awt.*;
    import java.beans.*;
    import java.util.*;
    public class testTable extends javax.swing.JPanel
              implements
                   java.awt.event.KeyListener,
                   java.beans.PropertyChangeListener {
          * public static void main(String[] argv) { testTable tt = new testTable();
          * JFrame jf = new JFrame(); jf.setContentPane(tt); jf.setVisible(true); }
         /** Creates new customizer testTable */
         public testTable() {
              initComponents();
              HashMap hm = new HashMap();
               * Only for debugging, to see that the method getRow() works when
               * called from the constructor.
               hm.put("ttext", "TEst");
               this.getRow(hm);
          * This method is called from within the constructor to initialize the form.
          * WARNING: Do NOT modify this code. The content of this method is always
          * regenerated by the FormEditor.
         private void initComponents() {//GEN-BEGIN:initComponents
              java.awt.GridBagConstraints gridBagConstraints;
              jLabel1 = new javax.swing.JLabel();
              textIn = new javax.swing.JTextField();
              jLabel2 = new javax.swing.JLabel();
              intIn = new javax.swing.JTextField();
              jLabel3 = new javax.swing.JLabel();
              numIn = new javax.swing.JTextField();
              jLabel4 = new javax.swing.JLabel();
              dateIn = new javax.swing.JTextField();
              jLabel5 = new javax.swing.JLabel();
              dateTimeIn = new javax.swing.JTextField();
              jLabel6 = new javax.swing.JLabel();
              jCheckBox1 = new javax.swing.JCheckBox();
              keepValues = new javax.swing.JCheckBox();
              jButton1 = new javax.swing.JButton();
              setLayout(new java.awt.GridBagLayout());
              jLabel1.setText("Text");
              add(jLabel1, new java.awt.GridBagConstraints());
              textIn.setName("ttext");
              textIn.setPreferredSize(new java.awt.Dimension(100, 21));
              textIn.addActionListener(new java.awt.event.ActionListener() {
                   public void actionPerformed(java.awt.event.ActionEvent evt) {
                        textInActionPerformed(evt);
              gridBagConstraints = new java.awt.GridBagConstraints();
              gridBagConstraints.gridwidth = 2;
              add(textIn, gridBagConstraints);
              jLabel2.setText("Integer");
              add(jLabel2, new java.awt.GridBagConstraints());
              intIn.setName("tint");
              intIn.setPreferredSize(new java.awt.Dimension(50, 21));
              add(intIn, new java.awt.GridBagConstraints());
              jLabel3.setText("Number");
              add(jLabel3, new java.awt.GridBagConstraints());
              numIn.setName("tnum");
              numIn.setPreferredSize(new java.awt.Dimension(50, 21));
              add(numIn, new java.awt.GridBagConstraints());
              jLabel4.setText("Date");
              gridBagConstraints = new java.awt.GridBagConstraints();
              gridBagConstraints.gridx = 0;
              gridBagConstraints.gridy = 1;
              add(jLabel4, gridBagConstraints);
              dateIn.setName("tdate");
              dateIn.setPreferredSize(new java.awt.Dimension(50, 21));
              gridBagConstraints = new java.awt.GridBagConstraints();
              gridBagConstraints.gridx = 1;
              gridBagConstraints.gridy = 1;
              add(dateIn, gridBagConstraints);
              jLabel5.setText("DateTime");
              gridBagConstraints = new java.awt.GridBagConstraints();
              gridBagConstraints.gridx = 2;
              gridBagConstraints.gridy = 1;
              add(jLabel5, gridBagConstraints);
              dateTimeIn.setName("tidate");
              dateTimeIn.setPreferredSize(new java.awt.Dimension(80, 21));
              gridBagConstraints = new java.awt.GridBagConstraints();
              gridBagConstraints.gridy = 1;
              add(dateTimeIn, gridBagConstraints);
              jLabel6.setText("Bit");
              gridBagConstraints = new java.awt.GridBagConstraints();
              gridBagConstraints.gridy = 1;
              add(jLabel6, gridBagConstraints);
              jCheckBox1.setName("tbit");
              gridBagConstraints = new java.awt.GridBagConstraints();
              gridBagConstraints.gridy = 1;
              add(jCheckBox1, gridBagConstraints);
              keepValues.setText("keep values");
              gridBagConstraints = new java.awt.GridBagConstraints();
              gridBagConstraints.gridx = 7;
              gridBagConstraints.gridy = 3;
              add(keepValues, gridBagConstraints);
              jButton1.setText("Send");
              jButton1.addActionListener(new java.awt.event.ActionListener() {
                   public void actionPerformed(java.awt.event.ActionEvent evt) {
                        jButton1ActionPerformed(evt);
              gridBagConstraints = new java.awt.GridBagConstraints();
              gridBagConstraints.gridx = 7;
              gridBagConstraints.gridy = 2;
              add(jButton1, gridBagConstraints);
         }//GEN-END:initComponents
         private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
              sendRow();
         }//GEN-LAST:event_jButton1ActionPerformed
         private boolean sendRow() {
              java.util.HashMap hm = new java.util.HashMap();
              Component[] cs = this.getComponents();
              for (int i = 0; i < cs.length; i++) {
                   if (((Component) cs).getName() != null) {
                        if (cs[i] instanceof JCheckBox) {
                             String value = ((JCheckBox) cs[i]).isSelected() ? "1" : "0";
                             hm.put(cs[i].getName(), value);
                        } else if (cs[i] instanceof JCheckBox) {
                             hm.put(cs[i].getName(), ((JTextField) cs[i]).getText());
              } // end for
              firePropertyChange("rowChanged", null, hm);
              return true;
         private void getRow(java.util.HashMap hm) {
              //if (! this.keepValues.isSelected()) {
              Component[] cs = this.getComponents();
              for (int i = 0; i < cs.length; i++) {
                   if (cs[i].getName() != null && hm.containsKey(cs[i].getName())) {
                        Component component = cs[i];
                        String componentName = cs[i].getName();
                        String componentValue = (String) hm.get(component.getName());
                        if (cs[i] instanceof JTextField) {
                             // output for debugging
                             System.out.println("Setting " + cs[i].getName() + " = "
                                       + componentValue);
                             ((JTextField) component).setText(componentValue);
                        } else if (cs[i] instanceof JCheckBox) {
                             // output for debugging
                             System.out.println("JCheckBox found");
                             JCheckBox cb = (JCheckBox) component;
                             boolean selected = (componentValue == null ? false : (componentValue.equals("1")
                                       ? true
                                       : false));
                             ((JCheckBox) component).setSelected(selected);
              } // end for
              /* Uncomment this code snippet to retrieve the text that has been set
              for the components (that means JTextFields)
              This is just for debugging !
              Component[] cs = this.getComponents(); for (int i = 0; i < cs.length;
              i++) { if (cs[i].getName() != null) { if (cs[i] instanceof
              JTextField) { System.out.println("Value of " +cs[i].getName() + " = " +
              ((JTextField) cs[i]).getText()); } } } // end for
         private void textInActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_textInActionPerformed
         }//GEN-LAST:event_textInActionPerformed
         public void keyPressed(java.awt.event.KeyEvent e) {
              if (e.getKeyCode() == java.awt.event.KeyEvent.VK_ENTER) {
                   sendRow();
         public void keyReleased(java.awt.event.KeyEvent e) {
         public void keyTyped(java.awt.event.KeyEvent e) {
         public void propertyChange(java.beans.PropertyChangeEvent evt) {
              if (evt.getPropertyName().equals("newRow")) {
                   final PropertyChangeEvent finalEvt = evt;
                   Runnable makeChanges = new Runnable () {
                        public void run() {
                             getRow((java.util.HashMap) finalEvt.getNewValue());
         // Variables declaration - do not modify//GEN-BEGIN:variables
         private javax.swing.JTextField dateIn;
         private javax.swing.JTextField dateTimeIn;
         private javax.swing.JTextField intIn;
         private javax.swing.JButton jButton1;
         private javax.swing.JCheckBox jCheckBox1;
         private javax.swing.JLabel jLabel1;
         private javax.swing.JLabel jLabel2;
         private javax.swing.JLabel jLabel3;
         private javax.swing.JLabel jLabel4;
         private javax.swing.JLabel jLabel5;
         private javax.swing.JLabel jLabel6;
         private javax.swing.JCheckBox keepValues;
         private javax.swing.JTextField numIn;
         private javax.swing.JTextField textIn;
         // End of variables declaration//GEN-END:variables

    The problem of the change in the form not being comitted is that
    I forgot SwingUtilities.invokeLater(makeChanges); in the bottom
    part in public void propertyChange(java.beans.PropertyChangeEvent evt)
    after having created a new Runnable.
    Changes to the UI often have to be comitted by SwingUtitlities.invokeLater()
    though I don't know that much about Swing yet.
    Thanks to everybody who tried to solve that problem.
    Benjamin

  • Crystal Reports 2008 fails when called from e Web Service under 64bit OS

    I have discovered that Crystal Reports 2008 doesn't work when called from a Web Service running under 64bit Windows platforms (in my case Windows 2003 Server and Windows XP 64bit); practically no object is instantiated. I've tried several solutions without success.
    Before creating a wrapper component to use under COM+, is there anybody who has a better and cheaper solution than creating another component to wrap CR 2008 ?

    Hi Sergio,
    Before I mark this post as assumed answered I would just like to say and re-iterate that at this time there is no one answer and we fully understand your concerns. As you know in CR 6.0 it came in 16 and 32 bit versions because at the time 32 bit was relatively new but 16 bit was the norm. This is also true for 32 to 64 bit, 32 is the norm and 64 bit is relatively new. We know and are well aware 64 bit is the future and we are working as quickly as we can to move in that direction. Because of the complexity of the Product it's not simply a matter of re-compiling all of our dll's in 64 bit format. The core of our data connectivity with our database drivers which are dependant on third party clients must also need to support 64 bit modes. This as well as Printer drivers also need to be 64 compatable, there are a multitude of dependencies that we rely on that must add 64 bit support. As a programmer you are well aware of the issues around Thunking back and forth between 32 to 64 bits, it can cause delays and potentially loss of data which is a whole other issue. Not to mention also that we would have to ship both versions potentially doubling the size of the distribution packages or doubling the size of the dll's to have the ability to work in both modes. Relatively speaking of course, it would not be double the size but the variables would need to be able to allocate 32 or 64 memory blocks.
    The other option is to produce 2 separate versions, this alone is a massive project. Any issue would need to be fixed in separate code streams.
    So I'm sure you can see it's not simply a matter of saying yes we support 64 bit. It's a massive project that is going to take time to do and we have to wait for the third party drivers to commit also.
    Visual Studio .NET 2005 and 2008 is the only option if you want true 64 bit but you will be limited on what DB's you can support and export formats you can export to. They are the only drivers we did convert to 64 bit.
    Thank you for your understanding
    Don

  • Advanced table:not able to view more than 10 rows when called from workflow

    Hi everyone,
    I'm calling a page that contains advanced table and its controller class from two places.
    First one is from a inquiry form, when this page is called it works fine. when there are more than 10 rows, first 10 are shown on page render and when we click on Next link, other rows are shown. This is becuase I have given the records displayed property on adavanced table = 10. I'm fine till here.
    Second one is I'm calling this page again from a workflow notificaiton. There is a link called view more details on the workflow notification , click of this link will open the page with 10 records displayed. But when user tries to click on Next it doesn't work. It just doesn't refresh.
    Its very wierd,. not able to understand what could be wrong when calling from wf notificiton. Its the same page and conroller code used in both the places.
    Please help me!!
    Thanks
    Sunny

    Thanks for your response Kristofer. You are correct, there was a difference in the parameters and the issue is resolved now.

  • Set the default field value to transaction code field, when calling from WD

    Hi all,
    Can we pass the value in a input field of a standard transaction calling from WD application. Suppose we are calling a transaction VA03 in an external window, then how will be pass the value in the VBAK_VBELN screen field.
    Is there any way to pass the value to this transaction field. I have also tried out to set the parameter ID 'AUN' for VA03 transaction VBELN field. But it did not work for me.
    Is there any way to set the default field value to transaction code field, when calling from WD?
    Please suggest, if anyone have any idea.
    Thanks
    Sanket

    Hi,
    I am using the below code to open a standard transaction. It will help you to explain my point more easily.
    DATA: url TYPE string,
              host TYPE string,
              port TYPE string.
    *Call below method to get host and port
      cl_http_server=>if_http_server~get_location(
         IMPORTING host = host
                port = port ).
    *create URL
      CONCATENATE 'http'
      '://' host ':' port
      '/sap/bc/gui/sap/its/webgui/?sap-client=&~transaction=' 'VA03'
       INTO url.
    *get the window manager as we are opening t code in external window.
      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 the url which we created above
      lo_window_manager->create_external_window(
      EXPORTING
      url = url
      RECEIVING
      window = lo_window ).
      lo_window->open( ).
    Note*
    One more query I want to add to this thread, that is there any possibility to call a custom transaction as well?

  • Bring Excel 2007 to the front when called from LabView v9 in Windows 7

    I am building a duplicate system using Windows 7, LabView v9 and Excel v2007.  The original system used WinXP, Excel 2007 and LabView v8.6.  The issue is that the original system was able to bring Excel to the front when called from Labview using the property node -application-> visible.  This new configuration runs Excel, loads the data, runs the macros but does not bring Excel to the front.  The icon blinks in the Win7 taskbar and when selected displays over LabView.  If I minimize the Labview window, Excel is there.  This leads me to conclude that Excel is visible, as requested but will not come to the front until selected from the taskbar.  The only differences, besides the versions, is the original system template files used the .xls extension in and was run in Excel in compatible mode.  At the customers request, the new system uses the .xlsm extension on the Excel template files.  I have tried using application.visible = True in the macro as well.  Could be a setting in Labview?  Could be a setting in Excel? Could be .xls vs. .xlsm? Or an issue with Windows 7 and the newer version of Labview. 
    HP workstation - Labview v9 - Windows 7 - Excel 2007 sp2
    Thank you in advance
    Stephen
    Solved!
    Go to Solution.

    I will try the windowstate change.  Were these done in succession? (i.e. property node -> property node -> property node) Or were they done along the way such as call the ActiveX open and a property node then in a worksheet modification area etc. so there was some time between calls? 
    I am not sure about the API since the discussion there is with regard to DDE.  (Taken from the link document:  If you want to call a DLL that contains ActiveX
    objects, use the Automation
    Open VI with the Property
    Node and the Invoke
    Node.).  I am calling Excel as an application not as a library call unless I am mistaken, which I could certainly be.  Are you thinking that once Excel is active through the Automation Open VI that a DLL call to set the application visible would work?  I may be trying this already but in Excel through the use of the macro I call from LabView.  It contains application.visible = True at the beginning before reading files and plotting data.  
    I may try sprinkling Property node with application->visible in various locations in the LabView diagram as I do update cells after the call to the plot macro.  The puzzle for me is the blinking Excel icon in the task bar.  This means active and running but not visible or something wrong as well.  There are a few #VALUE cells if not all test in the system are run.  Again not a problem in Excel 2007-WinXP-LV8.6
    Thank you again one and all.

  • Environment.Exit hangs when called from an application domain exception handler

    I've implemented a handler for exceptions not thrown in the main GUI thread of my C# WinForms application, as follows:
        AppDomain.CurrentDomain.UnhandledException  += OnUnhandledExceptionThrown;
    This handler is called from a background thread. The last statement in this handler is a call to
    Environment.Exit with the application exit code. However, the application hangs in this call. From within Visual Studio, it hangs and I'm unable to break the application; I have to use Task Manager to terminate Visual Studio. Environment.Exit
    works fine when called from the unhandled exception handler for the GUI thread. Is there a better way to terminate the application in the context of an unhandled exception thrown by a background thread?

    Are you just trying to avoid a crash? Environment.Exit can cause deadlocking if exiting in the wrong kind of scenario; if you're just trying to avoid a crash, use
    GetCurrentProcess with
    TerminateProcess to terminate your own process.  It skips the notification phases that Environment.Exit uses which prevents the common deadlock scenarios.
    WinSDK Support Team Blog: http://blogs.msdn.com/b/winsdk/

  • Stored Procedure Does Not Run Properly When Called From Portlet

    We have a simple Java portlet that calls a PL/SQL stored procedure which we wrote. The stored procedure sends a large number of emails to users in our corporation using the "utl_smtp" package. The stored procedure returns a count of the emails back to the Java portlet when it's finished. This number is displayed in the portlet.
    Our problem:
    The stored procedure functions as expected when run from a PL/SQL block in SQL*Plus, and the Java portlet calls the procedure properly when sending out a smaller number of emails (Less than 200 usually). When we get into a higher number of emails the procedure hangs when called from the portlet, but it STILL functions properly from SQL*Plus. It does not return the number of emails sent
    and the Java portlet is unable to return a SQLException. Also, we have noticed that emails are sent at a much slower pace from the stored procedure when it's called from the portlet.

    Any Ideas?

  • My iphone 4 does not register calls made to it. if i make a call from another phone, i can hear it ringing, but it does not register on the iphone. also, i do not get any messages when this happens. then after a day or two it decides to start working.

    My iphone 4 does not register calls made to it. if i make a call from another phone, i can hear it ringing, but it does not register on the iphone. also, i do not get any messages when this happens. then after a day or two it decides to start working.

    Clean iPhone charging port with clean dry toothbrush. See if better. If still problem clean charging port again with toothbrush and small amount of Isopropyl Alcohol.

Maybe you are looking for

  • Changing data in InfoCube or DSO??

    Hello Gurus, is it possible to change the Data contents either in an InfoCube or in a DSO. I am loading data from R/3 first into the DSO and then into the InfoCube. The data seems to be redundant in the source system and i would like to change certai

  • Will i lose all my information if i change operating systems

    Will I lose all my personal information, documents, music, movies, and apps, if I change operating systems?

  • How to define manager's area of responsibility in SAP

    Hello All,   I am not able to figure out where to define manager's area of responsibility and link the same to SAP user? My requirement is to display all the Orgunit and talent under a particular manager which should be attach4ed to SAP login user ID

  • Error in PIPELINE MATERIAL

    Hi Gurus- when i posted PIPELINE MATERIAL in MIGO with  MVT 201+P the following error coming: "Account Dtermination for entry INT KON---PIP not possible". how to resolve this problem?

  • CS 5 Upgrade

    Hi, We have CS4 Design Standard Installed on a machine and have purchased an upgrade to CS5 Production Premium . I've just noticed that it needs a 64Bit OS . The machine we wish to run it on only has Windows 7 32Bit . Will any of the Apps install on