Calling main vi in sub vi

I have created the project  in Lab view.  Created main  Vi and calling sub vi to perform certain functionality . We have requirement at end of the last sub vi....it should return to main front panel. I have tried calling main vi in  the sub vi to get back to main front panel but it not allowing me to insert main vi as part of sub vi. Could you please help me with solution to get this working
Regards,
Sharanu

There is no need to do anything. When you insert a subVI into a main, execution will automatically return to main when the subVI finishes. If it's not, then is the subVI in some infinite loop and you're stopping with the "Stop sign" on the toolbar? Or, in your main VI, do you have a while loop so that it keeps running? Posting your VI and subVI would go a long way in pinpointing your error. Please do a Save With Options and save into a distribution llb so that all of your code is in one place. Since this is a pretty basic task in LabVIEW, you might want to check into some of the learning resources here.

Similar Messages

  • How to pass control from main controller to sub controller?

    Hi Experts,
    I have created one controller named "available.do" by which I am calling a view "available.htm". On that view I am showing one Button which says Check Availability. On clicking of this button it shows another view "list.htm". But it is showing new view and old view on same page.
    Second I want to add one button on second view "list.htm" which should perform some function. I don't know how I can achieve this functionality?
    Someone has suggested me that for this I have to create sub controller...but i don't know much about it as I am new in BSP.
    Kindly tell me and paste code so that I can solve my both problems.
    <<Text removed>>
    Thanks in Anticipation,
    Virendra Kedia
    Edited by: Matt on Oct 15, 2011 7:25 AM

    Hi,
    I guess you might have below coding in DO_INIT method,
    me->view_main = 'main.htm'.   "Where VIEW_MAIN is the attribute in you main controller of type STRING.
    you should have below coding in DO_REQUEST of main controller.
    DATA: main TYPE REF TO if_bsp_page.
      me->dispatch_input( ).
    *Create main view.
      main = create_view( view_name = me->view_main ).
    *Set desgin attribute.
      main->set_attribute( name = 'design' value = application->design ).
    *Call main page views.
      call_view( main ).
    *Activate  Sub -controller.
      controller_set_active( controller_id = 'sub_cntrl' active = lc_active ). 
      l_cntl_inst ?= get_controller( controller_id = lv_cntl_id ).  "DATA: l_cntl_inst TYPE REF TO cl_bsp_controller.
    *Call sub-controller.
      call_controller( l_cntl_inst ).
    Please check with this.
    Thanks,
    Chandra

  • Calling main method in another class using command line arguements

    Hi
    My program need to use 4 strings command line arguments
    entered in Project properties/Run/Application Parameters
    java programming for beginners // arguments
    The program needs to call main in the second class 4 times using argument 1 the first call, argument 2 the second call on so on.
    So the output wil be
    java
    programming
    for
    beginners
    import java.lang.*;
    public class First extends Second{
      public static void main(String[] args) {
        for(int i = 0; i < args.length; i++){
           Second.main(args); // Error I think
    import java.lang.*;
    public class Second {
    public static void main(String[] args){
    System.out.println(args[0]);
    "First.java": Error #: 300 : method main(java.lang.String) not found in class Second at line 6, column 15
    I am only a beginner with little knowledge of java so can the code be as basic as possible

    Your style looks quite bad for starters..... Hows
    this://import java.lang.*; /* NOT NEEDED */
    public class First extends Second{
    public First(String s) {
    super(s);
    public static void main(String[] args) {
    for(int i = 0; i < args.length; i++){
    new First(s);
    public class Second {
    public Second(String s)
    System.out.println(s);
    NOT NEEDED:
    public static void main(String[] args){
    System.out.println(args[0]);
    }My question to you: Do you understand why my code
    works? (does it do what you want?)I think since this is some kind of lesson, the OP have to implement some way to use the main method of the Second class as it is, that is, with String[] args. I think this lesson is interesting exactly because of this requirenment. But, anyway, I don�t know, that is just my assumption...

  • Material exchane ,copy pricing and conditions from main item to sub item.

    Hi All,
    We are using parts exchange/interchangeability in the transaction ME22N,
    While using ME22N we are exchanging  main item with interchangeable part and while doing so we want to copy pricing and conditions from main item to sub item.
    But its not happening.
    As per sap help its possible, details describe below.
    http://help.sap.com/erp2005_ehp_04/helpdata/en/c2/0a5288b77d11d3bcce00105ab03aee/content.htm
    Price Determination by Copying from Main Item
    In the case of price determination by copying from the main item, the net price of the originally ordered part is still used for the superseding part in a part exchange.
    The system copies all conditions from the main item to all sub-items and takes into account the order quantity for the main item when calculating scale prices. It does not take into account the conditions and scale prices that exist for the interchangeable part.
    You cannot change the conditions, which have been copied from the main item, at sub-item level. It is possible, however, to define additional conditions for each sub-item.
    Prerequisites
    A calculation schema, which can be altered on an individual basis in Customizing, has been supplied for the price determination.
    In the vendor master record, you have set the schema group 09 (interchangeable material).
    But in customizing I didnu2019t find value 09 for schema group .
    Can any buddy through some light on missing pieces which need to be set?
    Thanks
    Regards
    Ritesh

    Hi,
    Can you check few more things and tell me?
    - In this exit, does XVBPA and XVBAP contains all the line items. ( main and sub items ).
    - In Sales order creation time, do these table have VBELN populated when this exit triggers.
    - If you modify XVBPA or XVBAP in this exit, do they get overwritten after that.
    Try this code. See if it works.  Let me know if you still have a problem.
    DATA: wa_hvbpa LIKE vbpa,
          wa_xvbpa like vbpa.
    CLEAR: wa_hvbpa, wa_xvbpa.
    * check if HVBAP and VBAP line items are not same
    IF vbap-posnr <> hvbap-posnr.
    * read the ****-to partner from main-item
      READ TABLE xvbpa INTO wa_hvbpa WITH KEY posnr = hvbap-posnr
                                              parvw = 'WE'.
      IF sy-subrc = 0.
    *   read the line item data for sub-item based on main item
        READ TABLE xvbap WITH KEY posnr = vbap-posnr
                                  uepos = hvbap-posnr.
    * See if current line is the child of that BoM parent
        IF sy-subrc = 0.
          MOVE wa_xvbpa-kunnr TO xvbpa-kunnr.
          MOVE xvbap-vbeln TO wa_xvbpa-vbeln.
          MOVE xvbap-posnr TO wa_xvbpa-posnr.
          MOVE 'WE' TO wa_xvbpa-parvw.
          MODIFY vbpa FROM wa_xvbpa.
        ENDIF.
      ENDIF.
    ENDIF.
    Regards,
    RS

  • Copy down Ship-to Partner from main item to sub-items on Sales Order

    This is my first post on the forums here.  I'd appreciate any help you can give on my issue below.
    I have a requirement to copy down the ship-to partner from the main item to sub-items during sales order create or change.  Currently I have code in include MV45AFZB within user exit USEREXIT_FILL_VBAP_FROM_HVBAP as follows:
    <i>* Need to be able to copy the ship-to of a BoM parent down to the
    respective BoM children if the parent has a different ship-to
    from the header.
    data:  wa_xvbpa like vbpa.
    Clear: wa_xvbpa.
    read table xvbpa into wa_xvbpa with key posnr = hvbap-posnr
                                            parvw = 'WE'.
    A BoM parent line has a different ship-to from the header.
        if sy-subrc = 0.
          read table xvbap with key uepos = hvbap-posnr.
    See if current line is the child of that BoM parent
            If xvbap-uepos = hvbap-posnr.
              move wa_xvbpa-kunnr to xvbpa-kunnr.
              move xvbap-vbeln to wa_xvbpa-vbeln.
              move xvbap-posnr to wa_xvbpa-posnr.
              move 'WE' to wa_xvbpa-parvw.
              modify vbpa from wa_xvbpa.
            endif.
          Endif.</i>
    This isn't working for me.  At one point, I was able to copy the ship-to down to the first sub-item but not any subsequent ones.  I'm sure I need to add some code to another sales order user exit to get this to work, but I'm at a loss at this point.   Has anyone had to do this or something similar before? 
    Thanks very much in advance for your help.
    Angela

    Hi,
    Can you check few more things and tell me?
    - In this exit, does XVBPA and XVBAP contains all the line items. ( main and sub items ).
    - In Sales order creation time, do these table have VBELN populated when this exit triggers.
    - If you modify XVBPA or XVBAP in this exit, do they get overwritten after that.
    Try this code. See if it works.  Let me know if you still have a problem.
    DATA: wa_hvbpa LIKE vbpa,
          wa_xvbpa like vbpa.
    CLEAR: wa_hvbpa, wa_xvbpa.
    * check if HVBAP and VBAP line items are not same
    IF vbap-posnr <> hvbap-posnr.
    * read the ****-to partner from main-item
      READ TABLE xvbpa INTO wa_hvbpa WITH KEY posnr = hvbap-posnr
                                              parvw = 'WE'.
      IF sy-subrc = 0.
    *   read the line item data for sub-item based on main item
        READ TABLE xvbap WITH KEY posnr = vbap-posnr
                                  uepos = hvbap-posnr.
    * See if current line is the child of that BoM parent
        IF sy-subrc = 0.
          MOVE wa_xvbpa-kunnr TO xvbpa-kunnr.
          MOVE xvbap-vbeln TO wa_xvbpa-vbeln.
          MOVE xvbap-posnr TO wa_xvbpa-posnr.
          MOVE 'WE' TO wa_xvbpa-parvw.
          MODIFY vbpa FROM wa_xvbpa.
        ENDIF.
      ENDIF.
    ENDIF.
    Regards,
    RS

  • How to copy Characteristics of main item to sub item after RBATP?

    Hi Experts,
    We are having MTO process, where we are creating sales order
    for configurable material. Then we are triggering RBATP and getting
    confirmation based on product allocations.
    But while creating sub items after RBATP, sales order not updating
    configurable characteristic values from main item (TAPA) to sub item (TAN).
    System is asking to maintain characteristic values for sub item again during
    RBATP manually.
    How we can copied these characteristic values of configurable material from
    main item to sub item automatically?
    Regards,
    Narendra

    Hi Experts,
    We are having MTO process, where sales order for configurable material. For these SO,
    we are triggering RBATP and getting confirmation based on product allocations
    & then accordingly it will consider for further planning in APO. But while
    creating sub items for SO after RBATP, system is not updating configurable
    characteristic values from main item (TAPA) to sub item (TAN) automatically.
    System is asking to maintain these characteristic values for sub item again
    during RBATP manually.
    We need to understand, how we can copy these characteristic values of configurable
    material from main item to sub item automatically?

  • Vendor evaluation - main criterion : Delivery ; Sub criterion : On time del

    hi
    We have following requirement related to Vendor evaluation - main criterion : Delivery ; Sub criterion : On time delivery
    The requirement is:
    Deliveries late by 7 days should be considered as on time.
    pl suggest

    Hi Chintu,
    Thanks for ur reply.
    scores i have configured for qty.variance as,
    2     Qty. reliability                      100
    2     Qty. reliability     5.0-              90
    2     Qty. reliability     10.0-      80
    2     Qty. reliability     20.0-      75
    2     Qty. reliability     40.0-      50
    2     Qty. reliability     50.0-      40
    2     Qty. reliability     75.0-      20
    2     Qty. reliability     80.0-        1
    My dought is, For on on-time delivery we are not maintaining any smoothing factor right?
    So, Which smoothing factor we should consider for on-time delivery?
    I have maintained smoothing factor for
    Timeliness service -  .20
    Quantity Reliability - .30
    Shipping Instructions - .25.
    Thanks in Advance.
    Edited by: SAPr3.HELP on Nov 19, 2009 4:43 AM
    Edited by: SAPr3.HELP on Nov 19, 2009 8:25 AM
    Edited by: SAPr3.HELP on Dec 1, 2009 6:30 AM

  • Credit limit sharing main customer and sub customers

    Dear all
    Credit limit sharing main customer and sub customers. we have hierarchy to identified main cutomer and sub customers and different account groups. now in system we are using main customer payer for all sub customers also. in future we are going to share the credit limit sub dealesr also. wt are the possibilities to complete my requirements.
    Regards
    Venkey

    Hi Venky,
    If i understood correctly. You wan to share main customer credit limit to all sub customer i.e. if main customer is having 5 Lacs Credit Limit the same amt you want to use for all sub customers.
    If this is the scenario then assign the main customer in the sub customer Credit master as a credit account.
    FD32 ---> Control Area Data ---> Status --->  Credit Account ( Under Credit Limit )....
    Process to change the credit account: Perss F6 or from the status view Go to Edit ---> Change Credit acct...
    Hope issue may resolve..
    Regards
    Durga Sana
    Edited by: Durgaprasadsana on May 13, 2010 7:40 AM
    Edited by: Durgaprasadsana on May 13, 2010 7:42 AM

  • Can we call main method in another class?

    Hi...
    can we call main method in another class?
    If no, please tell me the exact reason why can't we call that....

    ok
    can u give that code for me?
    class A {
    public static void main(String [] args){
    System.out.println("In A");
    class B {
    public static void main(String [] args){
    A.main(null);
    }

  • How to call main method in one class from another class

    Suppose i have a code like this
    class Demo
    public static void main(String args[])
    System.out.println("We are in First class");
    class Demo1
    public static void main(String args[])
    System.out.println("We are in second class");
    In the above program how to call main method in demo calss from Demo1 class......???????

    No, i dont know how to call other than main methods from other classes
    And one more doubt i have i.e. Like in C can we see the execution of the program like how the code is being compiled step by step and how the value of the variable changes from step to step like(Add Watch).........

  • Calling main method of a class

    Hi
    I have to call the Main method of a class in some other class becuass that class is accepting command line aurguments.
    I test it and everything is working fine.
               String[] strings = new String[3];
               strings[0] = "E:/practice.cap";
               strings[1] = "-o";
               strings[2] = "E:/practice.txt";
               Main.main(strings);I now want to know is there any drawback of doing this ?
    BR
    regards

    Muhammad Umer wrote:
    Good Explanation. But my question is not to explain the importance of main method in classes :)As far as the Java language and APIs go, there's nothing wrong with calling main just like any other method, because it is just another method. It's only special to the JVM, and to programmers who assume that it's the entry point to the program.
    As far as Java is concerned, you can call as many mains as you want. The only potential problem arises if some particular main is written in a way that relies on it being the entry point to the whole program. That is, if the author wrote it with the assumption that it would only be called by the JVM at startup time, and would not be called arbitrarily from within your code (EDIT: and if proper behavior relies on that assumption being upheld). However, this is just a particular case of a general issue that we always have to be aware of, namely, make sure you understand how a method is intended to be used, and use it in that fashion, or accept the consequences.
    EDIT: However, having said that, it's unusual to call main explicitly, so if you can, I would suggest pulling the functionality that you want out of that main into a different method, and then both your code and the main can call that method. If you cannot do that, then at the point where you call main, clearly document why you're doing it. Otherwise, whoever reads the code a few months or years from now--maybe somebody else, maybe you--will be wondering if the programmer really knew what he was doing, or if that is a mistake. That kind of second-guessing is the source of a lot of maintenance nightmares.
    Edited by: jverd on Nov 3, 2011 8:43 AM

  • Passing values from main report to sub-reports

    - How do we pass values from main report to sub-report?

    Look at this link which shows how to pass values from a subreport to a main report.
    http://www.datamanagementgroup.com/resources/trainerstalk/trainerstalk_howto_share_subreport_data_with_main_report.asp
    You can use the same method to pass values from main report to a subreport.
    1) Create a formula @mainFormula in the main report, as given in item 1 of link.
    2) Place this formulla in a suppressed report footer section above the target subreport.
    3) In the subreport, create a formula @subFormula that declares the same variable name, as given in item 3 of link.
    4) Place @subFormula column in the subreport where you want to display it.

  • Importing Main Folders with Sub-folders

    I am a new Mac user and I am trying to import my photos into iPhoto6.0. I have created main folders with sub-folders (eg. Main Folder = Holiday, Sub-folder = Australia Trip) and would like the sub-folders to appear when I open iPhoto. However, I cannot seem to get the main folder or sub-folder names to appear in iPhoto. The photos just get imported into the library and segregated by year.
    I tried reading the forum, and seem to infer that iPhoto cannot handle sub-folder names. However, when I read iPhoto 6.0 Help page, it states:
    "You can also drag individual photos or an entire folder from the Finder into iPhoto's photo viewing area. If you drag a folder, a film roll is created with the folder's name. If the folder you import contains subfolders, film rolls are created with each subfolder's name."
    I tried the above, but I don't seem to manage to get the film rolls named as described.
    Please help!!
    MacBook   Mac OS X (10.4.8)  

    Could it be confusion with what you are viewing in the iPhoto window?
    iPhoto always shows you a "last roll", which is really more like a smart album than a Film Roll. It is simply a quick way to find the photos from your most recent import session. When I drag in 2 folders to import, it only shows the second folder when I select "last roll." Are you seeing photos from one of your folders, or both of them together?
    Select "Library" from the top of your Source Pane to see your entire library. It doesn't mattter if you already have photos in your library or if you're beginning fresh. Under the "View" menu, select "Film Rolls" so that it is checked. Also under View, select "Sort Photos" > "by Film Roll". Now try to select the name/icon of 2 folders in Finder, then drag over the iPhoto window onto where the thumbnails display your library. (Or display nothing, if your library is empty.) Release when the curser is a green plus sign. When the import is finished you should see the 2 folder names (now as rolls) each with a set of thumbnails below it. Check the slider near the bottom right of the iPhoto window; moving it all the way to the left will give you the smallest thumbnails and allow you to see more photos at once.
    Please try this again and let me know how it goes. If this does not solve it, then I can tell you how to check what's in your library. But the Film Roll view should work.

  • Main Objects and sub-objects

    Hi All,
    Please tell me what is the meaning of 'Main Objects' and 'Sub-objects' in CRM.
    Thanks.

    Dear Nishikant,
    Kindly follow the below blog which is exporting your crystal report to HTML4.0 version.
    If it successfully imported, then  the problem may reside in the mapping of values to the SWF file.
    http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=(J2EE3417200)ID0191682050DB01264035234114071801End?blog=/pub/wlg/15995
    Hope this will help you.
    Regards
    Gokul.N

  • Concatenate main vi and sub vi data

    Is it possible to concatenate the output string of main vi and sub vi data? 

    Yes, both are string data types and i used the string concatenate function in our previous projects.
    I have not yet implemented the logic. My main objective is, in my main vi i have two sub vi's corresponding to two controls. If i click on control-1 sub vi-1 will popup and i will make some changes. And some changes in second sub vi also. Finally i have to concatenate the both sub vi's outputs and main vi output and send to FPGA board.
    Kindly provide the example vi for my requirements.
     

Maybe you are looking for

  • Interactive pattern question

    hey all, i need help, i have a school project, which is making website. i need a tutorial on how to make moving interactive pattern like this http://andy.thlndr.com i appreciate any advice, please help! thks

  • How to convert oracle spatial to Shapefile ?

    I have download the shp2sdo and convert the shapefile for GIS to Oracle spatial.Now i want to convert it back to shapefile.How do to that?Which feature in Oracle i can do that? Hope to get a response.

  • CS3 Bridge gone, so how can I preview PSD files

    I've lost Bridge, it not longer opens and there fore I've no easy way to preview my PSD files on my hard drive.  Can anyone suggest a way to do it without having to open each individual file in PS. Thanks. Judy

  • Adobe Flash Drive

    Which one is needed that is like the one on laptop for Iphone3G?  I went to what I thought was correct from Adobe Flash Drive but believe I have downloaded the wrong one (FMSDOCK) and has questions I can't answer.  It is different from what I have do

  • Converting Bit Rate of iTunes Purchased songs

    I am in the process of converting all my music files to 112 bit to allow for mores space on my iPod. However, the songs I have gotten of iTunes through the music store are protected and it won't allow me to convert them . My method of converting the