Event loop based programming help in c#

Hello everyone . I was reading about node.js and how it does all the work using event loops using a single thread to do all the non-blocking socket I/O . I am trying to implement the same concept in my application which will be doing a lot of socket I/O
including some disk I/O while I will do on a separate thread so that the application doesn't come to its knees . I am going to implement this mode in C# . I have looked around but the answers and solutions given are just too abstract and general . Can you
please help me ?

Have you seen this article (12/25/2014)?
http://www.codeproject.com/Articles/846803/Developing-Applications-With-Express-Framework-And
It uses Visual Studio and includes code and instructions. Also gives you the opportunity to communicate with the author.

Similar Messages

  • Simple example - Break FOR loop inside an event structure based on Front panel event change.

    I am running a for loop inside a state machine architecture that contains a FOR loop. How can I break this For loop based on Event change in front panel ??
    Abhilash S Nair
    Research Assistant @ Photonic Devices and Systems lab
    [ LabView professional Development System - Version 11.0 - 32-bit ]
    LabView Gear:
    1. NI PXI-7951R & NI 5761
    2. The Imaging Source USB 3.0 monochrome camera with trigger : DMK 23UM021
    OPERATING SYSTEM - [ MS windows 7 Home Premium 64-bit SP-1 ]
    CPU - [Intel Core i7-2600 CPU @ 3.40Ghz ]
    MEMORY - [ 16.0 GB RAM ]
    GPU - [ NVIDIA GeForce GT 530 ]
    Attachments:
    Case inside Event 3.vi ‏19 KB
    Case inside Event.ctl ‏6 KB
    Case inside Event 2.ctl ‏6 KB

    Okay. Accpeting that the design is not favorable and not advantageous when my program expands. I have begin to follow producer/consumer programming architecture.
    Please find the attached program which is a simple producer consumer with event structure. I wonder how could I stop looping around the producer and consumer loops over and over again. I am pretty sure that this ENQUEUE ELEMENT loops back to the consumer loop and starts from begining.
    I hope my first program in PC architecture with State machine and Event structure is correct. 
    Abhilash S Nair
    Research Assistant @ Photonic Devices and Systems lab
    [ LabView professional Development System - Version 11.0 - 32-bit ]
    LabView Gear:
    1. NI PXI-7951R & NI 5761
    2. The Imaging Source USB 3.0 monochrome camera with trigger : DMK 23UM021
    OPERATING SYSTEM - [ MS windows 7 Home Premium 64-bit SP-1 ]
    CPU - [Intel Core i7-2600 CPU @ 3.40Ghz ]
    MEMORY - [ 16.0 GB RAM ]
    GPU - [ NVIDIA GeForce GT 530 ]
    Attachments:
    Case inside Event 3.3-ProducerConsumer Event.vi ‏25 KB
    Case inside Event.ctl ‏6 KB

  • I am running Mac OS 10.6.7 I cannot run a java based program from the net when parental controls are set the error is The error is Load: class installer.CheckVersion 13. class not found  Help!

    I am running Mac OS 10.6.7 I cannot run a java based program from the net when parental controls are set the error is The error is Load: class installer.CheckVersion 13. class not found 

    Then, talk to the person running the lab.

  • How to handle the 'folder button' in the path command throug Event loop ?

    Hi everybody.
    Again a stupid question but I can't find the answer.
    My VI has a dynamic event loop, to execute the right code depending on user action.
    Everything is working well but now I wish to do the following :
    I use a 'path command' with the path entry (like for text) and the folder button.
     the user click on the path entry     ->   something A happens.
     the user click on the folder button  ->   something B happens.
    As the folder button and the path entry are the same command, how to differenciate those two events in the event structure ?
    Maybe there is a value in the node, but I can't find it ...
    Thanks for helping !

    You can't do exactly what you are wanting to do. The problem is that you can't trigger an action based on clicking the browse button. To implement that you will need to hide the browse button that LV creates and put down a button of your own that you can then track and respond to independently.
    Mike...
    PS: what is it exactly that you are trying to accomplish?
    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

  • Use of Events in a program

    What is the usage of events like initialization ,start-of-slectio,end-of-selection in a program,
    what if we write a program with out those events
    can we use initialization twice in a program
    like
    initialization
    start-of-selection
    initialization
    end-of-selection
    Thanks in advance

    CLASSICAL REPORT EVENTS :
    INITIALIZATION : TO INITIALISE THE SELECTION SCREEN ELEMENTS
    START- OF-SELECTION: NORMALLY WE WRITE THE REPORT LOGIC HERE
    AT SELECTION-SCREEN : SELECTION SCREEN VALIDATIONS
    WHETHER U ENTERED IS CORRECT OR NOT AT SELECTION SCREEN LEVEL
    AT SELECTION-SCREEN ON FIELD : TO PROVIDE INPUT HELP[S FOR THE FILDS AT SELECTION SCREEN
    FOR EX : MATNR IF U PREESS F4 AT SELECTION SCREEN.
    TOP-OF-PAGE : TO PROVIDE LIST HEADING ( OUTPUT HEADINGS)
    END-OF-PAGE : TO PROVIDE FOOTER I.E., PAGE NUMBERS
    END-OF-SELECTION : TO FREE THE MEMORY , NO NEED OF USING THIS SPECIALLY
    INTERACTIVE EVENTS :
    AT LINE-SELECTION : IT IS USED TO HENDLE SECONDARY LISTS
    AT USER-COMMAND : TO PROVIDE OUR OWN GUI ( PUSH BUTTONS ETC) AT OUTPUT
    AT PF-STATUS : TO PROVIDE FUNCTIONS FOR OUR OWN PROVIDED GUI BUTTONS AT OUTPUT
    LOAD-OF-PROGRAM.
    Triggers the associated event in an internal session after loading a program of type 1, M, F, or S. Also runs the associated processing block once and once only for each program and internal session.
    INITIALIZATION.
    the associated event is executed before the selection screen is displayed.
    START-OF-SELECTION.
    In an executable program, the corresponding event is processed after the selection screen has been displayed and before data is read using a logical database
    GET
    Triggers the associated events when data is read in an executable (type 1) program using a logical database.
    END-OF-SELECTION.
    The END-OF-SELECTION event is triggered in type 1 programs once the logical database has finished reading all data and before the list processor is started.
    END of page and top page
    while displaying the list as the name suggest fired at the top and end of page
    The event are triggered depended on the way the output is generated .
    for eg:
    Initialization : triggered when the report is loaded in memory.
    At selection-screen output : triggered when the selection screen is loaded in memory before being displayed.
    At selection-screen / <field> : before leaving the selection screen.
    start-of-selection : the first event for displaying the report.
    end-of-selection : after the start-of-selection is completed.
    classiscal report events.
    top-of-page : every time a new page is started in the list.
    end-of-page : every time the list data reaches the footer region of the page.
    interactive report events.
    top of page during line selection : top of page event for secondary list.
    at line-selection : evey time user dbl-clicks(F2) on the list data.
    at pF<key> : function key from F5 to F12 to perform interactive action on the list.
    There are 4 events in Dialog programming.(main events)
    PBO - Process Before Output
    PAI -Process After Input
    POV-Process on Value Request
    POH-Process on Help Request
    As the name suggest PBO is process before OUTPUT, ie the the processing before screen is displayed
    and PAI processing after screen is diplayed
    now actually i dont know what your code does
    but still i can figure out that
    During the PBO loop, a loop is executed at it_vbak, where the row index corresponds to the current row of the table control.
    During the PAI loop, the rows of the internal table, whose row index corresponds to the current row of the table control, are overwritten with the contents of the work area(not present here)
    After the PAI loop, user input is processed in the module USER_COMMAND.
    AT SELECTION-SCREEN
    This event is processed before leaving the Selection Screen i.e. when the selection screen has been processed (at the end of PAI once the ABAP runtime environment has passed all the input data from selection screen to the ABAP program).
    This event is used to validate the input provided through selection screen. If an error message occurs in this processing block, the selection screen is redisplayed with all of its fields ready for input. This allows you to check input values for consistency.
    AT SELECTION-SCREEN OUTPUT
    This event gets triggered for the first time when the screen is building up and the screen is about to appear. It gets triggered again and again for every dialog step/the selection screen is refreshed/ enter key is pressed.
    This event is to control the display of the screen at runtime. lilke hiding the fields, making the fields Active/Inactive, to modify the field attributes. It is a PBO Event.

  • VB Scripting to monitor application event log based on specific words.

    Hi All,
    I Have written, vb script to monitor application event log based on specific word in the message. when I have included same script in monitor, after running this script at specific time once in day, I am getting run time error in the server, where it
    supposed to run, could you please check the command where I have highlighted in below script.
    Dim VarSize
    Dim objMOMAPI
    Dim objBag
    Set objMOMAPI = CreateObject("MOM.ScriptAPI")
    Set objBag = objMOMAPI.CreateTypedPropertyBag(StateDataType)
    Set objFSO = CreateObject("Scripting.FileSystemObject")
    Const CONVERT_TO_LOCAL_TIME = True
    Set dtmStartDate = CreateObject("WbemScripting.SWbemDateTime")
    dtmStartDate.SetVarDate dateadd("n", -1440, now)' CONVERT_TO_LOCAL_TIME
    strComputer = "."
    Set objWMIService = GetObject("winmgmts:" _
     & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
    Set colLoggedEvents = objWMIService.ExecQuery _
     ("SELECT * FROM Win32_NTLogEvent WHERE Logfile = 'Application' AND " _
     & "EventCode = '100'")
    For Each objEvent in colLoggedEvents
    If InStr(LCase(colLoggedEvents.Message), "Message :Application A3 has been successfully processed for today") Then
    X= "Success"
    end if
    Next
    if X="Success" then
    call objBag.AddValue("State","GOOD")
    call objMOMAPI.Return(objBag)
    wscript.quit()
    Else
    call objBag.AddValue("State","BAD")
    call objMOMAPI.Return(objBag)
    wscript.quit()
    End If

    By programming standards since as long as I can remember the use of the value of a variable to detect its Boolean state has been used.
    Cast your mind back to strongly typed languages, e.g. Pascal.
    I'll cast back to the very early days of the "C" language where all variables could be treated as "bool" without a cast. The is no more strongly type language than "C". "C" practically invented the standards for all modern languages. 
    When I was writin machine language we also used zero as false but many machines only  tested the high bit for truthieness.  The HP machines and Intel allowed a test to aggregate to the sign bit.  Adding that flag to the test alloed tru for
    an numeric value that was non-zero.  A boool test was also used for a negative e switch.  If you study micro language implementation you will find that this hardware design and the companion compiler design is ... well... by design.  It is a
    way of improving the completeness and usefulness of an instruction set.
    Other langauges may require further decoration due to some mistaken desire to be better than perfect. That is like trying to change number theory by renaming addition to be "gunking" and forcing everyone to use multiplication when adding the same number
    more than once.  A Boolean test os a test of the flag bit with to without aggregation.    Even if we test a bit in a word we still mask and aggregate.  It is always the most primitive operation.  It is also the most useful
    operation when you finally realize that it is like an identity in math.
    Use the language features that are designed in. They can help to make code much more flexible and logical.
    By the way, Pascal also treats everything as Boolean when asked to.
    ¯\_(ツ)_/¯

  • How to override the event loop

    As a windows game developer, I have always overridden the application message loop to make sure that graphics were rendered when the CPU was idle, and still being able to process windows messages like keyboard/mouse events. CPU is then maxed out (except when a forced sleep or v-sync is enabled) to give highest performance on graphics, making a simple clear opengl window render at 3500 frames per second (I know this is idiotic but I'm trying to make a point).
    Now that I'm porting my game engine (c++ code) to cocoa, I  am struggling with how to implement the main loop. I could use a timer but this will fix the framerate and might be slow. It will prevent me to use the CPU to its full extent.
    So: is there some kind of OnIdle event I can override? Or do I have to do the Event loop processing myself? And can anyone tell me how to do something like this? Is there a tutorial or a book or anything I can study to learn about this? I presume this is lower level API.
    Any help is appreciated!
    Dirk.

    etresoft wrote:
    Michael may profess ignorance about MacOS X applications, but he is still 100% correct. You need to study the architecture and find the best way to work with it. The first thing to know is that the CPU is irrelevant. Let the GPU handle your graphics - that is what it does best. You do want your CPU to be as idle as possible. Approach it from a device-driver or event-driven perspective.
    Just to clarify that I'm not a total noob trying to write his first program: of course I will not overly use the CPU if not necessary. I completely agree with what you guys say about maximizing CPU usage. My game engine on windows will put the CPU to sleep when it's not necessary making my engine perform very good with almost no CPU usage.
    But... when I want to test if changes to my engine/shaders/... improve or degrade performance of the renderings, I want to be sure that everything is maxed out so that I can be sure that the difference is correct. On maxed out CPU/GPU, I will notice the difference when framerate goes for example from 2000 to 1900 while this will not be visible when just at 60 fps and a lot of free time. I will see 60 fps even when my code is worse. That's why I need to be able to test this.
    Anyway, as I said, I completely agree and I will certainly do my very best to make sure that CPU is not overly used. So my question remains: how can I make sure that I have everything I need at the time I need it while I will do my best to make sure nothing more is used?
    Timer-events at 1/60th of a second is not the answer...
    Using threads for these things is not the answer... I use them for other things (loading from disk/processing data/generating data)
    But are there other options?
    Can you point me to where I can learn more about the architecture and its possibilities?

  • Event Loop in SO and failover

    Hi, All Forte Experts
    I have 2 questions:
    1. Would any one tell me where can I put the event loop block in a
    Service Object?
    I tried to put it in the Init to get a timer.tick event, but the SO
    hanged to wait there.
    How can I do this to let the SO do something at certain time?
    2. I have SO doing failover. Can one sleeping SO get any kind of
    information when it becomes alive
    after the running SO dies?
    Thanks a lot for your help.
    Alex
    Carpe Diem, Seize the Day !
    Alex Lee (Li Zhongling)
    Forte, Java/CORBA Group
    International Business Corporation
    Bangalore 560010, India
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

    Hi,
    Thank you all a lot for your help.
    For the second question, I explain the situation here. I have a failover
    LockManager SO which contains a LockList. When the first running SO dies, I
    want the second one to become alive and restore the state of the first one( I
    mean the LockList should not be lost). Then I tried to do it in this way:
    1. As Daniel Nguyen suggested in Re:Retaining state on failover of SO
    (Jan.19,1999), I put one shared object holding one Locklist on the Router
    partition. Let the running SO always refresh its contents.
    2. I make the SO Transactionaln with Transaction Dialog Duration. On the
    client, every time I start a transaction to add or remove lock through SO, I
    try to catch the exception "AbortException" (which means the SO dies). To
    handle the exception, I use Releaseconnection, then force the backup SO get the
    locklist from the shared object on Router partition. In this way, the backup SO
    becomes alive and also restore the state.
    I think this works. I will also try your suggestion ASAP. However, would you
    please tell me how to control the secondary SO not to start and later to start
    it? Every time I try to run the app, all the partition will start. And I guess,
    I can not new it.
    Thanks.
    Rds
    Alex
    Alex,
    1) as Arpad mentioned in his posting, you can start task a method which
    contains your event loop from the init method.
    as for
    2), what I've done in the past is to start both primary and secondary SOs,
    where the primary SO's event loop begins at start up, but the secondary SO
    is dormant.. I created a "monitoring" SO which listens for remote access
    exceptions (or distributed access exceptions) and on the death of the first
    SO, the second SO's event loop is started. The other option is to not start
    the secondary SO until the primary one fails, but there is a lag time for
    the SO to come up.
    j
    Carpe Diem, Seize the Day !
    Alex Lee (Li Zhongling)
    Forte, Java/CORBA Group
    International Business Corporation
    Bangalore 560010, India
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

  • Problem using local variable in event loop

    I have a state machine from which I want to monitor various controls, including "Start" and "Stop" buttons.  Not every state needs to monitor the controls.  At present, most states run timed loops.  In the first state that reads the front panel, I have an Event structure (inside a While loop) that monitors the various controls' Change Value events.  For numeric controls, I update variables (in shift registers) as needed.  The "Start" button is used to end the While loop controlling the Event structure, allowing the State to exit to the next state.
    My problem comes in subsequent states that employ this same idea.  Here, I put a Local Variable bound to the Start button and use the same code, but it frequently happens that when I enter this particular state, I cannot "turn on" the control -- I push the button, but it stays off.  Curiously, if it was On when I enter, I can turn it off, but then I'm stuck not being able to turn it on.
    I mocked up a very simply routine that illustrates this.  There are two sequences (corresponding to the two states).  Both use an Event loop with a local variable bound to my Stop button (really this is an LED control with custom colors).  I've deliberately moved the "initialization" (the declaration of the control in the block diagram) out of the Event loops -- putting it inside the first loop modifies the behavior in another strange way.
    Here's my thinking on how I would expect this to work:  The code outside Event Loop 1 should have little effect.  Assume the Stop button is initially Off.  You will "sit" in Event Loop 1 until you push the Stop button, changing its value to True; this value will be passed out of the Event case and cause the first While loop to exit.  You now enter the second sequence.  As I understand the Exit tunnel, it defaults to "False", so I'd expect to stay in the second Event loop until I turn the Stop button from On to Off, which will pass out a False, and keep me in the While for one more button push.  However, this doesn't happen -- I immediately exit, as though the "True" value of the Stop local variable is being seen and recognized by the Event loop (even though it hasn't changed, at least not in the context of this second loop).
    An even more curious thing occurs if I start this routine with the Stop button turned on.  Now I start in my Event loop waiting for a change, but this time the change will be from On to Off, which won't cause an exit from the frame.  This will be reflected by having the While loop count increment.  We should now be in the state of the example above, i.e. in an Event loop waiting for the control to be pushed again, and turned On.  However, clicking the control has no effect -- I cannot get it to "turn on".
    Where am I going astray in my thinking?  What is it about this method of doing things that violates the Labview paradigm?  As far as I can tell, what I'm doing is "legal", and I don't see the flaw in my reasoning, above (of course not -- otherwise I'd have fixed it myself!).  Note that because I'm using local variables inside Event loops (and I'm doing this because there are two places in my code where I want to do such testing), the Stop control is not latching (as required).  Is there something that gets triggered/set when one reads a latched control?  Do I need to do this "manually" using my local variable?
    I'll try to attach the simple VI that illustrates this behavior.
    Bob Schor
    Attachments:
    Simple Stop Conundrum.vi ‏14 KB

    altenbach wrote:
    Ravens Fan wrote:
    NEVER have multiple event structures that share the same events. 
    Actually, that's OK.  NOT OK is having multiple event structures in the same sequence structure.
    See also: http://forums.ni.com/ni/board/message?board.id=170&message.id=278981#M278981
    That's interesting.  I had always thought I read more messages discouraging such a thing rather than saying it was okay.  Your link lead me to another thread with this message. http://forums.ni.com/ni/board/message?board.id=170&message.id=245793#M245793.  Now that thread was mainly concentrating on registered user events which would be a different, but related animal. 
    So if you have 2 event structures they each have their own event queue?  So if you have a common event, one structure pulls it off its event queue and it does not affect the other structure's event queue?  I guess the inherent problem with this particular VI was that the second event structure locked the front panel.  Since the code never got to that 2nd event structure because the  first loop never stopped because the change was from true to false.  After reading your post and the others, I did some experimentation and turned off the Lock front panel on the 2nd structure, and that prevented the lockup of the program.
    Overall, the example VI still shows problems with the architecture and I think your answer should put the original poster on the right track.  I think as a rule I would probably never put the same event in multiple structures, I feel there are better ways to communicate the same event between different parts of a program,  but I learned something by reading your reply and about how the event structures work in the background.  Thanks.

  • I am working on a windows based program thru Chrome on my Mac. It asked me to cont/alt/delete - how do I get the Mac to respond?

    I am working on a windows based program thru chrome on my mac - how do I control/alt/delete on the mac?

    Control key - Alt (also known as the Option key) and Delete key. However remember Chrome is not an Apple product so if that doesn't work you also might want to seek help on a Google forum that supports Chrome.

  • Events in ABAP Programming

    Hi,
    Can anybody please list out the exact differences between the events 'LOAD-OF-PROGRAM', 'INITIALIZATION' and 'AT SELECTION-SCREEN OUTPUT'.
    Thanks in advance,
    Sujit.

    Hi,
    <u><b>LOAD-OF-PROGRAM:</b></u> When an ABAP program is loaded in an internal session, the runtime environment triggers the LOAD-OF-PROGRAM event, and the corresponding event block is executed.
    The processing block LOAD-OF-PROGRAM has approximately the same function in an ABAP program with type 1, M, F, or S as the constructor method of a class in ABAP Objects.
    Programs wiht type 1, M, F, or S can be loaded into an internal session in two ways:
    Program calls
    Whenever you call a program using SUBMIT or a transaction code, a new internal session is opened. The LOAD-OF-PROGRAM event is therefore called in each program call.
    External procedure calls
    The first time you call an external procedure (subroutine or function module), the main program of the procedure that you called is loaded into the internal session of the calling program. The eventLOAD-OF-PROGRAM is triggered and the corresponding processing block is executed before the procedure that you called. However, subsequent calls from the same calling program to a procedure in the same subroutine pool or function group do not trigger the LOAD-OF-PROGRAM event.
    so it's before the program is loaded in the memory for execution.
    <u><b>INITIALIZATION:</b></u>
    This event occurs before the standard selection screen is called. You can use it, for example, to initialize the input fields of the standard selection screen. This is the only possible way to change the default values of parameters or selection criteria defined in logical databases. To change a selection criterion, you must fill at least the components <seltab>-SIGN, <seltab>-OPTION, and <seltab>-LOW of the selection table <seltab>, otherwise it remains undefined.
    If you want to initialize input fields of the logical database, you need to find out the names of the fields. To do this for the logical database SAPDB<ldb>, use Transaction SLDB or choose Tools
    ABAP Workbench, followed by Development   Programming environ.   Logical databases. You
    can also display the technical information for the required field on the selection screen. To do
    this, call the F1 help for the required field and then choose Technical info. In the field Scrn Field
    of the following dialog box, you then see the name of the field used in the program.
    <u><b>AT SELECTION-SCREEN OUTPUT</b></u>
    event is triggered. This event block allows you to modify the selection screen directly before it is displayed.

  • How to raise an event from a program

    Hi,
    I am creating a workflow for HR, the person will request a basic pay change than, this will start the workflow. For this i am making a screen from where i need to triger the event for the workflow.
    Does anybody has any idea? of how to raise an event from a program. or has anybody worked on a scenario like this
    Khusro Habib

    You can also use the FM SAP_WAPI_CREATE_EVENT which is a little newer I think. (I don't have access to a system today so that may not be the exact name of the FM but if you search SE37 under SAPWAPIEVENT* you should find it.
    the parameters will be the event name, and the object key.  The object key will be the key field of the workflow object you are using. 
    For example if you were using the saled document object then the object key would be the sales document number.  Carefull how you enter the object key, it can be a little tricky on whether or not you need the leading zeros in the input parameter. 
    Hope this helps.
    Brent

  • Which is the mandatory event in report program?

    which is the mandatory event in report program?
    Plz its urgent

    Hi,
    Its true, there is no mandatory event in a report program as such. You use events to organize your statements and control the flow of your program.
    For eg, following are some of the events used with their purpose :
    First event -
    Initialization : triggered when the report is loaded in memory.
    At selection-screen output : triggered when the selection screen is loaded in memory before being displayed.
    At selection-screen : before leaving the selection screen.
    start-of-selection : the first event for displaying the report.
    end-of-selection : after the start-of-selection is completed.
    classiscal report events.
    top-of-page : every time a new page is started in the list.
    end-of-page : every time the list data reaches the footer region of the page.
    interactive report events.
    top of page during line selection : top of page event for secondary list.
    at line-selection : evey time user dbl-clicks(F2) on the list data.
    at pF<key> : function key from F5 to F12 to perform interactive action on the list.
    at user-command
    And If the program contains no explicitly defined event blocks, all the statements in the program form the entire event block START-OF-SELECTION, which need not be defined explicitly but is taken by default.
    Hope it helps.

  • Freely programmed help in ALV

       HI:ALL
          How to achieve  Freely programmed help in ALV?

    Hi,
    On APPLY buttton action, write the below code
    *Fire the event to indicate that data selection is done
    wd_comp_controller->fire_vh_data_selected_evt( ).
    wd_comp_controller->value_help_listener->close_window( ).
    *Raise Event
       cl_fpm_factory=>get_instance( )->raise_event_by_id( EXPORTING   iv_event_id   = '<custom event name>').
    And in PROCESS_EVENT of your webdynpro component(where Freely Programmed search help is implemented) write the code as per your requirement to set the values back to the table.
    CASE IO_EVENT->MV_EVENT_ID.
              WHEN '<CUSTOM EVENT NAME>'.
                        write code as per your requirement.
    ENDCASE.
    Thanks
    KH

  • How to trigger an event in the program

    Hi,
    I have a program. The purpose of the program is to retrieve the data matching the selection criteria and downlod the same to a file.
    In the selection screen, I have a parameter called 'EVENT'. Here, user enters some event name. Generally, they enter the 'Background job processing events'.
    So, my requirement is... once the files are successfully downloaded, the program should trigger the 'EVENT' specified in the selection screen at run time.
    Can someone help me in this regard. How to trigger an EVENT in the program. Is there any Function Module or Method available in SAP which triggers the EVENT at runtime.
    And is there any table available in SAP which stores all the events available in SAP. Because, whenever the user enters an EVENT in the selection screen, we should check whether the event is valid or not. So, if there is any table available which has all the events then, it will be easy I guess. or is there any other way to validate the EVENT name.
    Please help me. Thanks in advance,
    Best Regards,
    Paddu.

    Hello Paddu,
    have a look at tables
    - btcsev, btcsed (system events)
    - btcuev, btcued (user events)
    and use function BP_EVENT_RAISE.
    kind regards
    Walter Habich

Maybe you are looking for

  • In sales order for the condition type MWST, **Tax code** is displaying wron

    Hi In sales order for the condition type MWST, *Tax code* is displaying wrongly at header level i.e. FF instead of AO (under account determination tab) AO tax is 0% but for FF it is 19% I have checked with the Access sequence it is picking access 08

  • Windows XP mode with Virtual PC will not install / two problems

    Hello!  I posted this on the Microsoft Windows Answers forums and a moderator there suggested I post it here instead.  I also searched here for similiar problems but did not find anyone having the exact same problem as I am having.  Also for some rea

  • Windows or Linux

    Hello, I've been doing all my OCS test setups under Linux, but the time for actually rolling a production setup to the company is approaching. Oracle just released OCS 9.0.4.1.1 for Windows, and having no particular loyalties to either Windows or Lin

  • Help..Error

    java:10: not a statement Label 1 = new Label1("Enter number and click component"); java:10: ' ; ' expected Label 1 = new Label1("Enter number and click component"); java: 52: illegal start of expression public void display(Graphics g){ java:78: ' ; '

  • What is the approved cuda card list of mac videocards?

    What is the approved cuda card list of mac videocards? Can the list be modified manually to make certain cards valid for open GL?