How to handle event structures for two buttons and two counters.

     *I have two buttons A and B, and have to compare the difference in hits between them.  So do I place an event structure within a while loop for each button (2 buttons, 2 event structures, 2 while loops), or does it need to be one event structure with cases for both buttons whithin one while loop? 
     *How do I pass the values of buttons A and B's hit counters out of the while loop in order to calculate the differences between them after each increment, not just the final count after the stop button is hit? 
     *How would I make one stop button work to handle both buttons A and B?   I tried to place the actual stop button in one button A's structure and its global in B's structure, but It wont seem to let me use a local variable for a latchable control
Checker

You should probably have not started a new thread and waited until your question in the original thread was answered. You can modify altenbach's example for a second button. You have a single event structure with a new event for the second button. You have a second shift register to track the number of times the second button is pressed. Inside the while loop but outside the event structure, you just have a subtract function in or to report the difference. do not modify the posted example for the stop button. It works perfectly as is.

Similar Messages

  • How to handle Event when a radio button in selection screen is clicked

    Hi all,
       What is the Event generated when a radio button is clicked in the selection Screen. My requirement is .If one radio button is clicked a field in selection screen should be greyed.
       Here I used AT SELECTION-SCREEN OUTPUT. but this event is generated only if i press 'ENTER' after clicking the radio button in the selection screen.
       Is there any other way to process this radio button event?
    Thanks&Best Regards,
    Vishnu

    hi,
    try like this
    TABLES : kna1,lfa1.
    SELECTION-SCREEN:BEGIN OF BLOCK blk1 WITH FRAME TITLE text-002.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS : rad_but1 RADIOBUTTON GROUP one DEFAULT 'X' USER-COMMAND ucom.
    SELECTION-SCREEN COMMENT 3(26) text-003.
    SELECT-OPTIONS : kunnr FOR kna1-kunnr.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS : rad_but2 RADIOBUTTON GROUP one .
    SELECTION-SCREEN COMMENT 3(26) text-004.
    SELECT-OPTIONS : lifnr FOR lfa1-lifnr.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN:END OF BLOCK blk1.
    AT SELECTION-SCREEN OUTPUT.
      LOOP AT SCREEN.
        IF rad_but1 = 'X'.
          IF screen-name = 'KUNNR-LOW' OR screen-name = 'KUNNR-HIGH' .
            screen-input = '1'.
            MODIFY SCREEN.
          ENDIF.
          IF screen-name = 'LIFNR-LOW' OR screen-name = 'LIFNR-HIGH'.
            screen-input = '0'.
            REFRESH lifnr.
            MODIFY SCREEN.
          ENDIF.
        ENDIF.
        IF rad_but2 = 'X'.
          IF screen-name = 'KUNNR-LOW' OR screen-name = 'KUNNR-HIGH'.
            REFRESH kunnr.
            screen-input = '0'.
            MODIFY SCREEN.
          ENDIF.
          IF screen-name = 'LIFNR-LOW' OR screen-name = 'LIFNR-HIGH'.
            screen-input = '1'.
            MODIFY SCREEN.
          ENDIF.
        ENDIF.
      ENDLOOP.
    reward if usefull....

  • How to create new structure for SOP?

    How to create new structure for SOP? and transfer data for long term planning?

    hi dear
    For SOP there are two types
    1. Standard SOP : this the standard SOP  configured by SAP consider the Level by Level planning and planning done for product group .
    2. Flexible planning SOP: this option is given, so that Rough planning/SOP planning can be done as per the client requirement.e.g planning structure can be sales orgn., distribution channel, division, plant, material
    For configuring the flexible planning SOP follow steps
    1. Define info structure in IMG
    where u define the characteristic and Key field
    2. Set parameters for info structures and key figures
    Sales & Operations Planning >Master Data>Set parameters for info structures and key figures
    where u define  Planning method
    Consistent planning
    Level-by-level planning
    Delta planning
    and aggregation type
    1. Average calculated
    2. Total created
    3. No aggregation
    3. create Planning type with reference to info structure
    Regards
    Suresh

  • How to use event structure of event data nodes event filter nodes in programming

    hi,
    I need manual of how to use 'event structure' events of 'event data nodes' and 'event data filters'...please help me....
    Regards
    Ravindranath

    I'm not really sure what you are looking for here.  Did you do a search in the LabVIEW help for Event Structure?
    The Event Data Node just returns information about the event, like control data, control reference, what caused the event, etc.
    The Event Data Filters are just used in Filter Events.  This allows you to discard an event or change the data that the event will recieve.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Event structures for dummies

    After all the great help with data handling, I thought I would ask a question about event structures.
    I have a main VI that sits around and lets me read in files and change variables. Once I am happy, I press start which fires up some sub VI that start running in the background. I have tried this using event structures. But then disaster strikes!! One of my variables is wrong and I need to stop/reset the sub VIs (without stopping the main program). However, my subVI is running in a timed loop continuously, within the event structure, so it's stuck. Attached is a very simplified VI of what I mean.
    I basically want to run a program, set up some variables, set off a background subVI, update/reset if needs be and then press the big continue button to the next stage whilst the subVI is still chugging.
    Any suggestions from the Guru's? I do not think event structures are the way forward
    "When I read about the horrors of drinking, I gave up reading"
    Attachments:
    event structures for idiots.vi ‏90 KB

    The important thing about event structures is to use them in the right way. For example as a rule of thumb, don't put into an event handler anything that will take more than about 200 msec or so to complete. Why? Studies have shown that 200 msec is the longest delay you can generate without the user noticing the delay (obviously YMMV).
    One good solution (as corys pointed out) is the Producer/Consumer Loop - but there are a variety of others. For example, I have created applications where pressing a button launched a long task as a separate process running in the background. When it finished it passed data back to the GUI using another event, queue or some other mechanism.
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • How to handle Events in OO abap.

    Hii all as im new to SAP and  ABAP , i want to know , what are events all about and how to handle events?
    Like how to guide double click to call a transaction , or to create a hot sopt and then , calling the transaction...........
    Please Help.

    Hi Chandan,
    possibly you are not just new to ABAP but new to obeject oriented programming in general. In oo, you use events to trigger methods that are registered as 'listeners' for the event.
    As I have no idea on your current knowledge, I don't know what I could recommend to start with.
    My personal approach is first to have a task I want to complete and then find and understand the methods to get there.
    Regards,
    Clemens

  • How to handle Tree structure in bdc

    Hi Experts,
          How to handle Tree structure in bdc, can any one have any idea regarding this.
        In the top most of the tree i  have  :  Occupational Health under that Identification is there .
          Occupational Health
                           Identification
    Regards,
    Sudhakar Reddy.A

    Hi Experts,
    Thanks Parvatha reddy for your reply.
    Can any one provide BAPI for this T.Code EHSQCATOH  or can any one tell me how to handle Tree structure .
    Regards,
    Sudhakar Reddy .A

  • How to implement Case Structure for multiple inputs to Pic Ring?

    So I have a reasonably simple program which I am almost completeed with. Basically the data of an array is read and then is indexed and a new array is created from the indexed data. And then I use Match Pattern to see if elements in the new array match certain words. And if they do then a number value is allocated to a Pic Ring at the end. And depending on the final number value the Pic Ring changes from one pic to another.
    However, I have the problem that I will be using multiple Match Pattern functions to compare elements in the final array, but I can't attach multiple Match Patterns and their subsequent logic statements to a single Pic Ring, only one. I've been trying to work this out by implementing a Case Structure or Event Structure. But the Event Structure isn't working and with the Case Structure, it is very messy with multiple True/False Case Structures inside of each other. Anyway, hopefully this all makes some sense. I'm attaching the VI program to this post. Thanks.
    Attachments:
    ArrayTest2.vi ‏495 KB
    ArrayTest2.vi ‏495 KB

    Obviously, you can only display one picture.  So then the question becomes which picture to show.  Therefore, you will have to create some sort of preference of one pattern over another.
    I would use a FOR loop so that you can loop through your available patters and their possible results.  Use the Conditional Terminal on the FOR loop so that you can stop the loop on the first match.  Then you just wire up the selected value for the ring outside of the loop.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • How to use Batch operation for two xsodata services?

    Hi All,
    I have two xsodata services. How to use submit batch for two xsodata services
    Thanks,
         Mj

    Gateway Batch Calls from SAPUI5

  • How does the event structure work & ...

    How does the event structure work & and how to modify the case example if you want to change the name of the case? I haven't a look at the manual but nothing about event structure is mentioned.

    I know how it works.. =P

  • How to create a calendar for two years in GL

    how to create a calendar for two years in GL

    Hi,
    - Login into Oracle EBS and select a responsiblity with GL Superuser drants (e.g. General Ledger Super User)
    - Navigate to Setup + Financials + Calendars and open the GUI Accounting (Navigation for R12)
    - Query the used calendard (used from jour Set of Books/ Ledger via the GUI
    - Enter for each Period (= Period Type 13, 16, 18,...) one Record, have a look to the existing data, used the same logic.
    In the GUI, defined the calendar for 2 Years
    Dirk

  • Hello! My name is Vadim. I'm from Russia. I'd like to buy two iPhones 5, 64 GB: for my wife and myself. But I have a question to you. Will it work in Russia? How much will it cost for me? And how much will delivery cost to Russia? Thank you very much.

    Dear Sir or Madame,
    My name is Vadim. I'm from Russia. I'd like to buy two iPhones 5, 64 GB online, from your official website Apple: for my wife and myself. But I've a question to you. Will it (iPhone 5, 64 GB) work in Russia? How much will they cost for me? And how much will the delivery from America to Russia cost?
    Yours sincerely,
    Vadim Fedotov.

    iPhone 5 is not available unlocked in US  and
    Apple Store online does not ship outside the Country it operates
    You are best served waiting for the iPhone 5 to be announced in Russia
    through your Apple Approved carriers

  • How to create authorisation object for save button please help in abap

    how to create authorisation object for save button please help in abap

    Hi
    In general different users will be given different authorizations based on their role in the orgn.
    We create ROLES and assign the Authorization and TCODES for that role, so only that user can have access to those T Codes.
    USe SUIM and SU21 T codes for this.
    Much of the data in an R/3 system has to be protected so that unauthorized users cannot access it. Therefore the appropriate authorization is required before a user can carry out certain actions in the system. When you log on to the R/3 system, the system checks in the user master record to see which transactions you are authorized to use. An authorization check is implemented for every sensitive transaction.
    If you wish to protect a transaction that you have programmed yourself, then you must implement an authorization check.
    This means you have to allocate an authorization object in the definition of the transaction.
    For example:
    program an AUTHORITY-CHECK.
    AUTHORITY-CHECK OBJECT <authorization object>
    ID <authority field 1> FIELD <field value 1>.
    ID <authority field 2> FIELD <field value 2>.
    ID <authority-field n> FIELD <field value n>.
    The OBJECT parameter specifies the authorization object.
    The ID parameter specifies an authorization field (in the authorization object).
    The FIELD parameter specifies a value for the authorization field.
    The authorization object and its fields have to be suitable for the transaction. In most cases you will be able to use the existing authorization objects to protect your data. But new developments may require that you define new authorization objects and fields.
    http://help.sap.com/saphelp_nw04s/helpdata/en/52/67167f439b11d1896f0000e8322d00/content.htm
    To ensure that a user has the appropriate authorizations when he or she performs an action, users are subject to authorization checks.
    Authorization : An authorization enables you to perform a particular activity in the SAP System, based on a set of authorization object field values.
    You program the authorization check using the ABAP statement AUTHORITY-CHECK.
    AUTHORITY-CHECK OBJECT 'S_TRVL_BKS'
    ID 'ACTVT' FIELD '02'
    ID 'CUSTTYPE' FIELD 'B'.
    IF SY-SUBRC <> 0.
    MESSAGE E...
    ENDIF.
    'S_TRVL_BKS' is a auth. object
    ID 'ACTVT' FIELD '02' in place 2 you can put 1,2, 3 for change create or display.
    The AUTHORITY-CHECK checks whether a user has the appropriate authorization to execute a particular activity.
    This Authorization concept is somewhat linked with BASIS people.
    As a developer you may not have access to access to SU21 Transaction where you have to define, authorizations, Objects and for nthat object you assign fields and values. Another Tcode is PFCG where you can assign these authrization objects and TCodes for a  profile and that profile in turn attached to a particular user.
    Take the help of the basis Guy and create and use.
    Regards
    ANJI

  • How do I disable transparency for the menubar and addressbar in firefox?

    How do I disable transparency for the menubar and addressbar in firefox? (This does not mean disable windows aero or transparency in windows 7. A workaround has been posted. Stop spamming threads with disable transparency and aero everytime someone asks about this.)
    It is difficult to read.
    Edit:
    Is there a setting to tone down the Aero usage of the in Firefox 5 so it looks more like Firefox 3.6. Is there a way to do this in the preferences or inside about:config?
    I know what Aero is and how to turn it off.
    The 2nd reply has images attached show why it is difficult to read. An light spot on a desktop background or an icon can make it very difficult to read. This is the #1 reason why I keep going back to 3.6.

    If you are up to tweaking some CSS code in a style see
    "Color Toolbar(s) to identify profile (DM*)" -- in http://userstyles.org/styles/9514, and you must read all of the description material understand what has to be done.
    It is a style, and playing with the code is what styles are about. You will have to copy the section of code in the description to the bottom of the style for it to be complete to remove additional Aero effects, and choose two or three colors for the toolbars.

  • How to handle user preference which has "_" and " " in the name

    Hi Experts,
    I have a question how to handle value which has like "_" and "space" etc in user preference.
    If setting "a_b-c d", I could not retrieve this because it's escaped in database.
    So this code can't get value even though I can set it.
    Is there any restriction of name? Is there any documentation how to code user prefernece which has non alphabet and number in the name?
    I know it's possible to handle the data like adding escaped data. But I don't think this is the best way to retrieve the data. Because nobody confirm it's not problem in the future.
    Could you tell me the best way to get these user preference?
    Thanks in advance,
    Masaaki Tada
    Here is a sample.
    <%@ page contentType="text/html;charset=Shift_JIS" %><%@ page language="java" import="com.plumtree.remote.portlet.*, com.plumtree.remote.prc.*, java.util.*" %>
    <%
    /** * UserInfo - Simple Page * Display User Information*/
    // VariablesIPortletContext oPortletContext = null;IPortletRequest oPortletRequest = null;IPortletUser oPortletUser = null;IPortletResponse oPortletResponse = null;IRemoteSession s;IUserManager oUser;
    /* Get Portlet Objects */
    try{oPortletContext = PortletContextFactory.createPortletContext(request, response);oPortletRequest = oPortletContext.getRequest();oPortletUser = oPortletContext.getUser();oPortletResponse = oPortletContext.getResponse();} catch (Exception e) {oPortletContext = null;oPortletRequest = null;oPortletUser = null;oPortletResponse = null;}
    String val = oPortletRequest.getSettingValue( SettingType.User, "a_b-c d" );String hoe = oPortletRequest.getSettingValue( SettingType.User, "abcd" );out.println( "a_b-c d: " + val );out.println( "abcd : " + hoe );
    oPortletResponse.setSettingValue( SettingType.User, "a_b-c d", "aiueo" );oPortletResponse.setSettingValue( SettingType.User, "abcd", "bbbb" );%>

    Plumtree recommends that user preference names have only alphanumeric characters in them (a-z, A-Z, 0-9). Any non-alphanumeric characters will be encoded by the EDK.
    I strongly suggest that you change your user pref name to something that's alphanumeric. However, if that is not possible, you can use the following workaround: in the web service editor, enter the encoded name for the user pref. There are several ways to get the encoded name.
    One way is to encode the pref manually, yourself. Plumtree uses the %u encoded format: each non alphanumeric character is converted into %uxxxx, where xxxx is the Unicode representation of the character. For all ASCII characters, just look at the ASCII hex chart. For example, character "-" has a hex value of 2d. So, a preference name "jane_pref" would be encoded to "jane%u002dpref", and you'd enter the latter value on the preferences page in the web service editor.
    The other way to find out the encoded value is to set a preference programmatically and use the HTTP tunnel tool to look at HTTP traffic between the portal server and remote server. The remote server will be sending a HTTP header to the portal server (the header name will probably be CSP-User-Pref) and inside the header you should see the pref name, encoded with %u. Just copy it out of there and into the web service editor.
    Hope this helps,
    Jane

Maybe you are looking for

  • Delete a .txt from usr/sap/tmp directory

    Hello, Does anyone knows how to delete a file from the following SAP directory? /USR/SAP/TMP/file.txt Thanks in advance, CL

  • Error while loading a String on a TextField

    Hi, I have a TextField set for Numeric values, now when I do setString () and pass a number as String it gives an error,. It works perfectly on a emulator but on the real device it gives a exception. I dont know the stacktrace beause I dont know how

  • Partners in Header and Item level

    Hi, I am creating a credit memo through the following steps. 1. Create rebate agreement in VBO1. 2. Create sales order in VA01. 3. Release through VKM4. 4. Create delivery through VL01n. 5. Post goods issue. 6. Create billing document through VF01. 7

  • IterateOverReachableObjects and soft/weak/phantom references

    Hi, what are soft/weak/phantom references for the JVM TI call IterateOverReachableObjects? Are those reference-objects 1. ... "normal" objects having references and beeing traversed by this function (OR) 2. ... interpreted as references with hiding t

  • 3.2 Server Stuck Offline & Wake on LAN issues

    Got through installation and getting started guide running 1 VM Server and a separate VM Manager   I was able to shutdown the Server from the Manager GUI; however, when trying to restart the Server from the Manager I received an error: OVMAPI_4005E N