Program Flow

Hi,
I am working on a program,which has a screen 100 with radiobuttons.
Followed by screen 200 which displays the ALV GRID.Data is filtered & displayed in the ALV.When the Print button of the toolbar is pressed,data needs to be passsed to smartform.after the smartform is displayed,the data is to be saved in the z table.
Please guide me this logic.I am getting confused.
This is very urgent.
Thanks.

Hi Sneha,
One question in Logic Flow: Data is displayed in ALV, then why u need to show in Smart Form?
1. Create one <b>Main Driver Program</b>, where generally u fetch the data.
2. Call Screen 100 with radio button.
3. Filter Data in driver program as per radio button selected in screen 100.
4. Display data in ALV in screen 200.
5. From the main driver program, call smart for and pass data in SF. And Display it.
6. After everything is okey, update data in z table.
Hope, this will solve ur problem.
Thanks,
Chetan Shah

Similar Messages

  • Dialog Box simulation without interrupting program flow

    I'm developing data acquisition/control software and need to give the end
    user flexibility to change the file to which the acquired data is being
    saved during operations. In the past, users have been confused with a
    simple string control that specifies the data file path, so I would prefer
    to move to the popup/dialog box standard to windows. Unfortunately, calling
    a dialog box results in the stoppage of program flow for the caller until
    the dialog box is closed (even though there may be no apparent data flow
    from the popup VI.) and stopping the program flow is not an option for this
    control system (the computer is controlling pressure, temperature, flow
    rates, etc of a very expensive and sensitive bit of hardware, so halting the
    control function for an unknown length of time is unacceptable).
    I am looking for the best way to accomplish this under LabVIEW 6i.
    Using a VI class reference through VI Server, I can essentially detach the
    popup window from the base program execution, spawning a separate
    application and passing the relevant parameters through judicious use of
    global variables. If I call the subroutine via VI server with "Wait until
    done" attribute set to false, the appropriate VI appears, functions
    correctly, and terminates as expected. Unfortunately, it remains visible on
    the screen, an inactive application. I have the VI Properties -> Window
    Appearance -> Customize -> Show Front Panel When Called and the Close
    Afterwards if Originally Closed checkboxes checked on this popup VI. It
    seems that calls through VI Server trigger the "Originally Open" flag, so
    the window does not close as I had expected.
    The way I have found to get around this problem is to use VI Server to call
    an intermediate subroutine whose front panel is not displayed and whose sole
    purpose it to call the subroutine that calls the dialog box. This does what
    I wanted, essentially. When the user wants to change directories, they
    press a button that triggers a call to VI Server to open a separate
    application. This application's front panel is never displayed and only
    calls a sub-VI that performs all the actual work and ends when it is
    completed. As this sub-VI terminates, all visible traces of the subroutines
    disappear and I'm left with just the primary program executing, continuing
    to take and send control signals through this whole process.
    This seems a rather cumbersome way to get a custom dialog box on the screen
    without stopping the program flow of the caller, however. Is there a more
    efficient way to accomplish this?
    Wade C. Eckhoff
    [email protected]

    Wouldn't it be easier to use two parallel independent while loops in the
    main vi, with one taking care of acquisition and the other of user
    interaction.
    When the UI loop is temporarily 'halted' because of the dialogue box poping
    up, the acquiring loop continues without delay.
    Regards
    Harrie Boonen
    www.novonordisk.com
    "Default User" wrote in message
    news:[email protected]...
    > I'm developing data acquisition/control software and need to give the end
    > user flexibility to change the file to which the acquired data is being
    > saved during operations. In the past, users have been confused with a
    > simple string control that specifies the data file path, so I would prefer
    > to move to the popup/dialog box standard to windows. Unfortunately,
    calling
    > a dialog box results in the stoppage of program flow for the caller until
    > the dialog box is closed (even though there may be no apparent data flow
    > from the popup VI.) and stopping the program flow is not an option for
    this
    > control system (the computer is controlling pressure, temperature, flow
    > rates, etc of a very expensive and sensitive bit of hardware, so halting
    the
    > control function for an unknown length of time is unacceptable).
    >
    > I am looking for the best way to accomplish this under LabVIEW 6i.
    >
    > Using a VI class reference through VI Server, I can essentially detach the
    > popup window from the base program execution, spawning a separate
    > application and passing the relevant parameters through judicious use of
    > global variables. If I call the subroutine via VI server with "Wait until
    > done" attribute set to false, the appropriate VI appears, functions
    > correctly, and terminates as expected. Unfortunately, it remains visible
    on
    > the screen, an inactive application. I have the VI Properties -> Window
    > Appearance -> Customize -> Show Front Panel When Called and the Close
    > Afterwards if Originally Closed checkboxes checked on this popup VI. It
    > seems that calls through VI Server trigger the "Originally Open" flag, so
    > the window does not close as I had expected.
    >
    > The way I have found to get around this problem is to use VI Server to
    call
    > an intermediate subroutine whose front panel is not displayed and whose
    sole
    > purpose it to call the subroutine that calls the dialog box. This does
    what
    > I wanted, essentially. When the user wants to change directories, they
    > press a button that triggers a call to VI Server to open a separate
    > application. This application's front panel is never displayed and only
    > calls a sub-VI that performs all the actual work and ends when it is
    > completed. As this sub-VI terminates, all visible traces of the
    subroutines
    > disappear and I'm left with just the primary program executing, continuing
    > to take and send control signals through this whole process.
    >
    > This seems a rather cumbersome way to get a custom dialog box on the
    screen
    > without stopping the program flow of the caller, however. Is there a more
    > efficient way to accomplish this?
    >
    >
    > Wade C. Eckhoff
    > [email protected]
    >
    >
    >

  • Application to visualize program flow

    I'm looking for an easier way to "visualize" what is going on in the source code of a large project, in regards to function calls, method calls, and classes.
    For example, a source directory of a project will have a bunch of files, like this:
    anim.c
    character.c
    direction.c
    game.c
    input.c
    main.c
    player.c
    resources.c
    room.c
    screen.c
    If I didn't know anything about this project, if I wanted to try to understand how it works it would be difficult to start.
    Does anyone know of an application that will read source code and display a tree-like output of the program flow? For example, maybe like this:
    main() [main.c]
    -> create_game() [game.c]
    -> reset_timer() [timer.c]
    -> update_game() [game.c]
    ---> update_world() [world.c]
    ---> is_game_over() [game.c]
    ---> ...
    -> draw_game() [game.c]
    ---> draw_world() [world.c
    ---> ...
    -> destroy_game() [game.c]
    How about for classes and method calls?
    I don't care if it's GUI or CLI, or what programming language it's for. I think a program like this would be incredibly useful, especially in the FOSS community, and would be surprised if something doesn't already exist.

    cflow - For C programs. Nice and simple.
    KCacheGrind - Uses the "callgrind" application. I couldn't find callgrind in the Arch repositories or the AUR, so I gave up.
    codeviz - For C and C++ programs. I got it to produce a beautiful PNG tree of all of my function calls. I probably won't use it. A graphical tree output isn't so useful to me, and it was a bit tricky to actually setup and use. (for example, it requires a patched version of GCC)
    egypt - For C programs. Super duper simple concept, but requires some setup to use. I couldn't figure out how to configure and run it.
    gprof - Part of the GNU Binary Utilities. A little too low level for what I was looking for.
    pycallgraph - For Python programs. I didn't try it.
    doxygen - Is able to create documentation for anything in the world, including your car. I wish someone could tell me, "Type this doxygen command to create a call graph", but until that happens, I just can't seem to figure it out.
    cflow is definitely my favorite. I will do some post processing to the output to remove any functions that I didn't write.
    EDIT: Someone did a similar "review" to mine here, along with mentioning more programs to try out: http://grok2.tripod.com/code_comprehension.html
    Last edited by drcouzelis (2010-10-07 13:13:45)

  • Booleans to control programming flow

    Is it ok to use booleans within an object to control program flow in an Object Oriented approach?
    For eg: I have 2 tables in the database which are related. Some times both the tables need to be updated, other times, just 1 table.
    One approach would be to have 2 separate methods in the Data Acces object which handle these situtions, as this seems to be cleaner. However, another approach would be to send all the data along with a boolean to the Data Access Object and let the Data Access object make the decision of which tables to update by checking the boolean.
    Please tell me which approach is better and more Object oriented.

    1. How often will the Two tables be updated together.(Not a major factor)
    2. Keep both methods you mentioned.
    3. Create a new method that takes the boolean and the data to update.
    and use this in it:
        (boolean)?FirstMethod:SecondMethod;
       If boolean is true then it calls FirstMethod else SecondMethod.
    Anyone else think of anything?

  • ABAP program flow.

    Hi,
    whenever i write abap program, i usually maintain following program flow.  is it right from performance tuning point of view?
    1) include statements
    2) DATABASE TABLES
    3)  VARIABLE DECLARATIONS
    4) SELECTION-SCREEN
    5) FIELD SYMBOLS
    6) INITIALIZATION
    7) AT SELECTION SCREEN
    8) TOP OF PAGE
    9) END OF PAGE
    10) START OF SELECTION
    11) END OF SELECTION
    Please advise
    Regards,
    Santosh

    Hello,
    Just to add to Kathick's explanation. ABAP is an event-driven programming language. The general flow of an ABAP program is controlled by events.
    It is a good -practice to code event processing blocks in the order in which they will be triggered during execution.  However, they do not have to be coded in a sequential order. 
    This is the first thing i learnt in ABAP basics class )
    BR,
    Suhas

  • How to stop the program flow

    Hi all,
    i need to stop the program flow control without entering into the start-of-selection.
    i am using some manual conditions for validating some parameter fields...
    i used Leave list-processing--->but it dosint works
    call selection-screen 1000--->it works but when i click the back button the control goes inside the start-of-selection can any one help me with this....

    If you want to stop the program flow in case one condition is satisfied, you can use STOP or EXIT command. Else, if you want to stop the program and debug it just but BREAK command where ever you want to stop the program. Also, if you want to validate the program selection at the time of entering the selection before the start of selection, you need to add AT SELECTION-SCREEN event block before the start of selection.

  • Don't know how to halt program flow

    I posted a message on the Event Handling forum. Since no one responded, I am refering it to this forum.
    The initial message is at
    http://forum.java.sun.com/thread.jsp?forum=424&thread=543756&tstart=0&trange=15
    I am new to Thread programming.
    I want to pause the current thread from an event handler (from mousePressed(), to be specific), then do some animation that accesses the GUI and then resume program flow.
    I tried various things, but no luck.
    SOMEONE PLEASE GUIDE ME.
    When the animation code is called and the thread is paused (by Thread.sleep()), the animation also pauses.
    When I try using SwingUtilities.invokeAndWait , the following runtime error occurs:
    "Cannot call invokeAndWait from the event dispatcher thread"

    But the problem is that when the computer makes move, it does it so fast that sometimes the user
    doesn't see which part of the panel is changing, wondering whether the program is making a legal
    move. So, after calculating the move but just before implementing it , I want to halt the program's flow,
    then animate (blink) the small region in the JPanel where the moves are going to be made (to draw
    user's attention) and then resume the program to make moveYou're not allowed to pause the event dispatch thread (EDT) - otherwise your program will freeze.
    I would suggest to use an event based solution:
      public void actionPerformed(ActionEvent ev) {
        // move holds information about what happened on the scene
        Move move = logic.calculateMove();
        new MoveClue(move).start();
      public class MoveClue implements ActionListener {
        private Move move;
        private Timer timer;
        private int count;
        public MoveClue(Move move) {
          this.move = move;
        public void start() {
          timer = new Timer(1000, this);
          timer.start();
          // perhaps you should block input to your panel, e.g. utilizing a glasspane
        public void actionPerformed(ActionEvent ev) {
          // display a clue using the information from the move object,
          // e.g change background color of a region
          if (counter++ > 5) {
            timer.stop();
            // unblock your panel
      }

  • ABAP Object program flow

    Hi all,
    I'm starting to play with ABAP Object, and am very comfortable with OO features (coming from Java).
    Currently, I am hesitating on the way to code my program flow. Let me explain:
    Is it common practice to manage the screens flow within methods (with SET SCREEN etc.)?
    I would think that this is kind of bad, since it requires local classes, and is simply kind of weird (to someone coming from Java anyway). Is continuing to handle this via MODULES and such still a good way to go?
    Thanks for any enlightenment you can bring me.

    Hello,
    First, I din't mentioned that you said JAVA is better. I just said the things what u can do in JAVA u can achieve and there is a way in ABAP also. I tihnk u misunderstood my statements. :)..no hard feelings...
    Ok.
    BADI's are kind of Exits. To make it in a simple statement SAP has provided us with a way to enhance the business process.
    For example, assume that a business process goes thru step 1, step 2 and so on. Inbetween step1 and step2 you want to do something. For this SAP has provided some standard interface, which will get the information about the business process in step1 in to it. You can make use of that and customize according to your requirement.
    Send me you mail ID I will forward good document on BADI's.
    Regs,
    Venkat Ramanan N

  • Change variable type during program flow

    Hi there. Please tell me is there a possibility in ABAP to change variable type during program flow? I'd be very thanful for suggestions. Greetings.

    hi,
       Make use of field symbols for that ...
    field-symbols : <fs> type any.

  • Help with program flow and timing a loop please

    I'm working on an application that will display vibration data on several tabs.  1 tab displays the time waveform, another a running RMS value, another an FFT etc.
    On another tab I want the user to have the option of streaming the data to disk for 'x' number of seconds.
    I created a sub-vi with a flat sequence structure.
    The first frame open/creates a file.  The second frame gets the current time in seconds and adds 'x' seconds to it.  The third frame  contains a while loop with a "Get Current Time in Seconds" and a  "Write to Binary File" which executes while the current time is less than the "previous current time plus 'x'".
    This sub-vi is in a while loop that is called when a "capture data" button is pressed.
    My problem is that the rest of the program (waveform, RMS, FFT displays) stops executing when the while loop / sub-vi is executing.
    This can be seen via the "TEST" indicator that doesn't update.
    When the program flow goes back to the rest of the program I get an error 'cause the buffer has over-flown (ed)
    I'm really new at this so any help is greatly appreciated.
    I've attached images of the main vi (Project3.pdf) and the sub-vi containing the Flat Sequence (WriteToDisk.pdf)
    I can attach the actual vis if it helps.
    Thanks,
    Erik
    Attachments:
    Project3.pdf ‏189 KB
    WriteToDisk.pdf ‏85 KB

    The behavior you're seeing is by design. There are two solutions to your problem:
    Place the write to file in a separate loop that runs in parallel to your main loop. Thus, your "Project3" VI would have two loops. One is the data acquisition, the other is the streaming to file. You should not create data dependencies between the loops that would cause one loop to wait until the other is done. You want both running in parallel. You can stop both loops with the same stop button. With this method you can use local variables to get the Time Waveform data as you're doing now.
    Launch the stream to file VI dynamically. This basically uses the VI Server to start a subVI and then immediately return to the caller. The subVI is then running on its own. There are examples that ship with LabVIEW that show you how to do this. You would have to have the subVI monitor something to determine if it should stop should the main program stop.
    The first option would be the easiest to implement in your case. The second is more complex, but leaves you with one loop.

  • Staying in a frame, not returning to main program flow

    I'm creating a Java-program (Swing) that records results of a chess tournament and calculates a new ranking each time a new round is entered, i.e. when the user enters results like
    Kasparov - Fisher 0-1
    Karpov - Kortchnoi remise
    etc.
    Therefore I open a panel+frame with two identical listboxes (with the playernames) and some buttons ("1-0", "0-1", "draw" and "done").
    It should go like this: select a player in box 1, select the opponent in box 2, assign a result to the game, and repeat this procedure until all games are entered, then press "done" to return to the main program (to calculate the new ranking).
    Problem is that the progam-flow returns to the main program as soon as the new panel is displayed. I don't want that!!! I do want that nothing happens in the main program until the user presses "done" in the panel. The current code looks like
    // in the main program:
    public void addGame ()
    // GameDetails is a class that displays the playerlists and resultbuttons
    GameDetails gd = new GameDetails (rnk);
    ----------------- I want that my main program halts here until this GameDetails-thing is closed by the user
    // calculate new ranking, based on newest results
    How must I do that? It's not a matter of setting a focus (the first playerlist gets the focus, that's OK). I'm an experienced C-programmer but sometimes I don't seem to grasp this OO-stuff... anyone can give me a hint?

    If separate dialog window is ok, then the JDialog in modal mode is propably an answer. If shown in modal mode, no other windows for application will receive any user events and the show() method won't return until dialog is closed.
    If however, you like to have one panel active and second not active until first is filled by user, you have to understand how the event-driven UI works.
    In first stage, the UI elements are constructed an collected together in containers - you create JFrame, put there one or more JPanel, JButton and etc. There is nothing displayed nor actuall user interaction code executed. You decide here how things will look like
    In the second stage, you have to construct event listening mechanism - each of UI components may have own ActionListener (or/and others) installed. You have to install them on all elements you need to react on - in your case it will be "done" button. You decide here how active elements will behave.
    Third stage is an actuall application run - it starts from the moment the frame is shown. The UI engine takes over all user actions and distributes it to all UI components, which in reaction redraws themselfs and/or broadcasts proper events to own listeners. This process repeates forever.
    As you can see the clasic "program flow" approach does not have a big use in here. Instead of beeing a "boss" you have to be a "servant" - listen to what user does and behave correctly opening and closing new dors in front of him/her depending on weher he/she appears to want to go.
    So, in your case the proper way will be:
    0. Create whole UI, by adding apropiate containers and components. Make your game panel "disabled" (there are methods for that - setEnabled(false)). The disabled components do not produce events to listeners and have limited reactions on user input. Do not run any user interaction code here!
    1. Create action listener on "Done" button, in which you check input data and enable game panel;
    2. Install apropiate listeners on all active game panel components and do there what is necessary.
    P.S.
    Remember, a class is a rubber stamp which you use to produce class instances - OO beginners often misunderstood that.

  • Programming catching exceptions to control program flow.

    Hello,
    I have the following snippet:
         public List subList(int fromIndex, int toIndex) {
              PGSearchEngineList subList = new PGSearchEngineList();
              for (int index = fromIndex; index < toIndex; index++) {
                   try {
                        subList.add(this.get(index));
                   } catch (IndexOutOfBoundsException e) {
                        return subList;
              return subList;
         }Notice that I use a try catch to catch a IndexOutOfBoundsException and to control program flow. Is this a bad practice?
    Julien Martin.

    I believe I read once that you shouldn't code an exception to deal with a condition that you could reasonably expect to occur. There is some sample code for the value list handler on the j2ee patterns page that deals with search result paging in a little "cleaner" way:
    http://java.sun.com/blueprints/corej2eepatterns/Patterns/ValueListHandler.html
    Hope this helps.
    Amber

  • Controlling program flow and case statements

    Hey all, I was wondering, I if I have 40 nested case statements and I want the program to close after they are all done, is it sufficient to wire the "?" for both true and false of the outermost case to the close routine in order to guarantee that all of them will execute? Or is there an even better way using data flow methods?
    -Dobbs

    I'd recommend state machines better than that way or sequences, to controll dataflow better. Example is attached.
    Attachments:
    untitled.vi ‏33 KB

  • Program Flow using response.write(" "); ???

    Hi,
    Can some one tell me when we write
    response.write("Hello !!!"); in JspDynpage & then the page gets redireced to Jsp page.
    Where can I see output "Hello !!!" ...So that I can tract the flow of program.
    Thanks Regards,
    Sandeep jain

    Do like this. Declare
    private static final int last = 1;
    private static final int initial = 0;
    private static int state = initial;
    doProcessBeforeOutput(){
    IPortalComponentResponse response = (IPortalComponentResponse )this.getResponse();
    switch(state){
    case initial:
    response.write("Calling first jsp");
    this.setJspName("first.jsp");
    break;
    case last:
    response.write("Calling last jsp");
    this.setJspName("last.jsp");
    break;
    doProcessAfterInput(){
    state = last;
    onControllerClick(){
    IPortalComponentResponse response = (IPortalComponentResponse )this.getResponse();
    response.write("Button Clicked");
    Ur Portalapp.xml should look similar to
    <application>
      <application-config>
        <property name="SharingReference" value="com.sap.portal.htmlb"/>
      </application-config>
      <components>
        <component name="MainPage">
          <component-config>
            <property name="ClassName" value="com.sample.MainPage"/>
          </component-config>
         <component-profile>
            <property name="tagLib" value="/SERVICE/htmlb/taglib/htmlb.tld"/>
          </component-profile>
        </component>
       </components>
      <services/>
    </application>
    Regards,
    Harini S

  • Controlling program flow between frames

    Hi.
    I've made this one JFrame from which opens up this new JFrame window that acts as a simple dialog windows. where user can enter the name & say address. There is an "OK" & a "Cancel" button in that window. Pressing "OK" sets a boolean var to true while "Cancel" sets it to false.
    the problem is how do i send this boolean return value back to the calling Jframe class. cause as soon as my dialog is created, the new window has a life of its own & the flow is send back to the old JFrame & doesn't matter what i return, the initial value of the boolean var is returned. how can i halt everything in the backgrond so i return the value after my dialog window dies. Thanks.

    If you use JDialog and make it modal, control won't go back to the frame until you call dispose() on the dialog.

Maybe you are looking for