Event Handler/Cr​eate User Event bug

This is a problem I've run into a few times on my system (Win2k) so I finally went back and reproduced it step by step since it wasn't too hard. It causes LabVIEW to crash and exit without saving.
- Create an Event Handler
- Place 'Register Events', wire output to dynamic event terminal
- Place 'Create User Event', wire output to 'Register Events'/User Event
- Place an Empty String Constant [""], wire to input of 'Create User Event'
- Set empty string property -> Visible Items > Label = True
- Rename label from "Empty String Constant" to other such as "Event"
OR
- Create a cluster constant with something in it
OR
- Place a boolean constant
- Set boolean property -> Visible Items > Label = True
- Name label something su
ch as "Event"
- 'Add Event Case...' to the Event Handler, select Dynamic / : User Event
- Delete the constant wired to 'Create User Event'.
- Place a constant of a different data type and wire it to the input of 'Create User Event'
LabVIEW immediately disappears (all changes are lost) and this error is displayed:
================================
LabVIEW.exe has generated errors and will be closed by
Windows. You wlil need to restart the program.
An error log is being created.
================================
If there is a more appropriate place to post things of this nature that don’t really add to the discussion group, but need to be brought to the attention of NI, please post a URL or submittal method. Thanks...

Thanks for the detailed request. We are aware of this exact issue, and the problem was actually fixed for LabVIEW 7.0 for Mac/Unix. Unfortunately, it did not get fixed for the initial release of LabVIEW 7.0 for Windows, but we have plans to include the fix in the first LabVIEW patch for 7.0.
Also, the Discussion Forum is great for notifications of this kind. For future reference, you also have the options of emailing NI engineers directly, or calling us with suspected bug fixes, if you would like more direct communication.
Thanks again, and have a great day!
Liz Fausak
Applications Engineer
National Instruments
www.ni.com/support

Similar Messages

  • Post Process Event Handler not getting user's CURRENT_STATE for a UDF field

    I have a post process event handler in OIM R2 BP04 , which runs on Trusted Reconciliation and it compares user's ("CURRENT_USER") state and ("NEW_USER_STATE") and based on that derives a business logic.
    The problem that i am  facing is that, it is not able to get the User's ("CURRENT_USER") state for a UDF(EMAIL_LIST) field and it is coming as null,and  hence is breaking the business logic.The same Event Handler is working on TEST and QA ( 4 node cluster)environments and is not working on PROD environment( 4 node cluster).
    The different thing that was done on was that during the initial recon the event Handler was not present  and after the initial load of the users i have manually executed the database sql query which have updated the "EMAIL_LIST field manually for all the users
    I think  that since during the initial recon as the  EMAIL_LIST was not populated and was  populated  through the SQL update for all the users, the orchestration inter event data does not contain email list, and so it is coming as null.
    But i am seeing the same behavior for new records as well, which are created and  then updated after event handler is registered.
    Please reply, if you have encountered something similar.
    Thnx
    Akshat

    Yes i need the old state, which is
                        Identity[] oldUserStatesIdntArr =
                            (Identity[])(Identity[])interEventData.get("CURRENT_USER");

  • OIM 10g Event Handler : Integrated with User Groups.User Members

    I have created custom event handler and integrated it with User Groups.User Members data object.
    here is my code od event handler class:
    public class GroupEventHandler extends tcBaseEvent {
         public GroupEventHandler() {
              this.setEventName("Event Handler Sample");
         protected void implementation() throws Exception {
              System.out.println("============@@@@@@@@ IN EVENT HANDLER ");
              try
              String groupKey = this.getDataObject().getString("Groups.Key");
              writeToFile(groupKey);
              catch (Exception e)
                   e.printStackTrace();
    But I am getting this exception :
    ERROR [ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)' XELLERATE.SERVER - Class/Method: tcTableDataObj/getString encounter some problems: Column 'GROUPS.KEY' not found
    com.thortech.xl.dataaccess.tcDataSetException: Column 'GROUPS.KEY' not found
         at com.thortech.xl.dataaccess.tcDataSet.getColumnIndex(Unknown Source)
         at com.thortech.xl.dataaccess.tcDataSet.getString(Unknown Source)
         at com.thortech.xl.dataobj.tcTableDataObj.getString(Unknown Source)
         at oim.GroupEventHandler.implementation(GroupEventHandler.java:19)
         at com.thortech.xl.client.events.tcBaseEvent.run(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.runEvent(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.eventPostInsert(Unknown Source)
         at com.thortech.xl.dataobj.tcUSG.eventPostInsert(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.insert(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.save(Unknown Source)
         at com.thortech.xl.dataobj.tcTableDataObj.save(Unknown Source)
         at com.thortech.xl.ejb.beansimpl.tcGroupOperationsBean.addMemberUsers(Unknown Source)
         at com.thortech.xl.ejb.beans.tcGroupOperationsSession.addMemberUsers(Unknown Source)
         at com.thortech.xl.ejb.beans.tcGroupOperations_ejm77u_EOImpl.addMemberUsers(tcGroupOperations_ejm77u_EOImpl.java:1671)
         at Thor.API.Operations.tcGroupOperationsClient.addMemberUsers(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at Thor.API.Base.SecurityInvocationHandler$1.run(Unknown Source)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         at weblogic.security.Security.runAs(Security.java:41)
         at Thor.API.Security.LoginHandler.weblogicLoginSession.runAs(Unknown Source)
         at Thor.API.Base.SecurityInvocationHandler.invoke(Unknown Source)
         at $Proxy66.addMemberUsers(Unknown Source)
         at com.thortech.xl.webclient.actions.UserGroupMembersAction.assignMemberUsers(Unknown Source)
         at com.thortech.xl.webclient.actions.UserGroupMembersAction.assignGroupMembers(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:280)
         at com.thortech.xl.webclient.actions.tcLookupDispatchAction.execute(Unknown Source)
         at com.thortech.xl.webclient.actions.tcActionBase.execute(Unknown Source)
         at com.thortech.xl.webclient.actions.tcAction.execute(Unknown Source)
         at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
         at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
         at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at com.thortech.xl.webclient.security.SecurityFilter.doFilter(Unknown Source)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3592)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2202)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2108)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1432)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)

    Anyone have idea about why "Groups.Key" not found exception thrown here..
    I have assigned this event handler at postinsert event of User Groups.User Members Data Object.

  • Need SSIS event handler for long running event

    Hi,
    I have a long running table load task that I would like to monitor using an event handler. I have tried the progress and information events but neither generates a message during the actual table load. Is there a way to invoke an
    event during the SSIS data flow task when it 1%, 2% done?
    thanks
    oldmandba

    Do you now how many rows the source table have ? You can run SELECT statement on the destination to find out how many data has been inserted.
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • Enhance standard class with event handler method

    In trying to enhance a standard class with a new event handler class, I find that the ECC 6.0 EHP4 system does not appear to recognise the fact the method is an event handler method.  The specific example is a new method to handle the event CL_GUI_ALV_GRID->USER_COMMAND. 
    I notice that the flag called Active has not been ticked - see image below.  Perhaps this is the reason why the event handler is not being triggered.
    Note that there is an event handler for the same event in the standard class which obviously is executed as expected.  Any ideas on limitations in the system or I am missing a step?
    Thanks
    John

    Thank you for your replies.
    There is a bug in the ALV handler of a standard SAP class (when executed in ITS WebGUI) and I was hoping to create a custom event handler as an Enhancement to execute some custom code to sort of "handle the bug". 
    I agree - ideally it should be done in a Z class but that will not give me access to the object methods and attributes of the enhanced class.
    Cheers,
    John

  • PostProcess event handler for trusted recon -11G Release2

    Hi all,
    I am disabling a user in post process eventhandler bulkExecution method. When the event handler is triggered does the user is already created at OIM? Do I modify the already created user? Or all changes done to any user during the orchestration process are commited at finalization... Can anyone tell me how things goes at the db side?
    Thanks in advance
    BR
    Aliye

    Post process event handler is fired after the user is created in database. You can verify by retrieving the usr_key attribute of user profile which is generated in database. So if you are disabling a user using post-process event handler, it means user is already created in database. As far as orchestration framework is concerned user is created during orchestration period and all event handlers and access policies are evaluated after that.
    regards,
    GP

  • Override event handler for document events in LiveCycle

    I would like to have an email notification when a user opens a policy-protected DRM pdf. Is there a way to override the event handler for Document Open events?
    Or perhaps there is a way to access the event database- where can I find this information?

    Thank you so much for your reply. I have created an external authorization and am following the steps outlined here: http://help.adobe.com/en_US/livecycle/9.0/programLC/help/index.htm?content=001479.html
    I have deployed my jar and restarted JBoss. However, now when I try to create a new policy using my external authorization, I do not see an option to add it on the create new policy page. I see only sections for Users and Groups, General Settings, Advanced Settings, and Unchangeable Advanced Settings. Could you please tell me how to add the external authorization?
    Also, in the component.xml file, I followed the sample and kept this line: <component-id>com.adobe.livecycle.samples.externalauthorization</component-id>
    Should that be changed? If so, to what?
    Thanks.

  • Project Server 2010 - Triggering event handler on click event of PDP

    Hi,
    We are trying to trigger an event handler/ process on click event of PDP page (similar to Project Details Page). Users do not have rights to checkin the project.
    So just on click event of pdp - an event handler or process should trigger.
    Could you please suggest me best possible way for the same? Thanks.
    Best Regards,
    Abhijit
    +91 8600577750

    There may be multiple reasons for this.
    1. SharePoint timer Job is malfunctioning:
    For this try restarting SharePoint timer Job. through SP Powershell:
    Stop SPTimerv4 , Start SPTimerv4
     2: SharePoint Cache is full:
    Reset SharePoint Cache by deleting all XML files ( except cache.ini
    )  in SharePoint Cache located in System Drive\ProgramData\Microsoft\SharePoint\Config\<GUID>
    3: Check if Microsoft Project Server Event Service is running in Services.msc, try restarting it.

  • Javascript event handling

    The following code is being executed three times in the
    following sequence:
    1) On initialization of my Flex application, initCallback()
    is called
    2) When I broadcast a 'getUserPreferencesFromCookie' event,
    handleGetUserPreferenceCookie() is called.
    3) When I broadcast a 'writeUserPreferencesCookie' event,
    handleWriteUserPreferenceCookie() is called.
    // Callback when flash is initialized
    var initCallback = function()
    // Add all event listeners
    FABridge.flash.root().getPreferences().addEventListener(
    "getUserPreferencesFromCookie",
    handleGetUserPreferenceCookie);
    FABridge.flash.root().getPreferences().addEventListener(
    "writeUserPreferencesCookie",
    handleWriteUserPreferenceCookie);
    FABridge.flash.root().getPreferences().faBridgeInitialized();
    // Listen for flash initialization (i.e. the Main application
    is created)
    FABridge.addInitializationCallback("flash", initCallback);
    // Event handler for Get User Preferences Cookie Events
    events
    var handleGetUserPreferenceCookie = function(readEvent)
    alert("Getting Cookie for user: " +
    readEvent.getUsername());
    if (readEvent.getUsername())
    var theCookie = readCookie(readEvent.getUsername());
    alert("Returned from readCookie: '" + theCookie + "'");
    var preference = FABridge.flash.root().getPreferences();
    if (preference)
    if (preference.setPreferenceCookie)
    preference.setPreferenceCookie(theCookie);
    else
    FABridge.flash.root().getPreferences().setPreferenceCookie(null);
    // Event handler for Write User Preferences Cookie Events
    events
    var handleWriteUserPreferenceCookie = function(writeEvent)
    alert("Creating Cookie for User");
    if (writeEvent)
    alert("Write event is defined");
    var username = writeEvent.getUsername();
    if (username)
    // Create a cookie given the username and the XML
    createCookie(writeEvent.getUsername(),
    writeEvent.getData());
    alert("Returned from creating cookie");
    else
    alert("Write event is undefined");
    alert("Write cookie method completed");
    Here is the problem:
    handleGetUserPreferences() completes as expected (i.e. the
    cookie string is set into my preferences object). The readEvent is
    a custom event that extends flash.events.Event. However, when
    writeUserPreferenceCookie is called, the line
    writeEvent.getUsername() fails. writeEvent is the same type of
    event as readEvent. And when I say 'fails' I mean that the method
    goes no further. I never see the 'Write cookie method completed'
    alert. There are no errors in the Javascript Error Console.
    I've checked the writeEvent on the action script side. The
    username has been set into the event the same way that it was set
    into the readEvent. I cannot see why I can get data out of the
    readEvent but not the writeEvent.
    ANY help would be much appreciated.
    -Julie

    Just because the forums are a little slow on a weekend...
    JavaScript functions should be declared in the HEAD of an HTML page. I wasn't aware that a function declared in the BODY writes to a new document, so I've also learned something out of this.
    Take this and work on it to place the output where you want it:<html><head><script type="text/javascript"><!--
      function clickfunction()
        //if (registration.purpose[0].checked==true)
          document.getElementById("stuffHere").innerHTML = "Name of School/ College: <input type=text name=sname><br>Grade / Year:<input type=text name=grade>";
    !--></script></head>
    <body>
      <table>
        <tr>
          <td><font size = "" color="purple">Age:</font></td>
          <td><input type = "text" name = "age" size = "10" maxlength = "3"></td>
        </tr>
        <tr>
          <td><font size = "" color = "purple">Select the best reason
            <br>to use the Library:</font></td>
          <td><input type = "radio" name = "purpose" value = "school" onClick = "clickfunction()">
            <font size = "" color = "purple" >School / College</font><br>
              <input type = "radio" name = "purpose" value="work">
                <font size = "" color = "purple">Work</font><br>
              <input type = "radio" name="purpose" value="personal">
                <font size = "" color = "purple">Personal</font>
          </td>
          <!--// SET AN ID ON THE ELEMENT! //-->
          <td id="stuffHere"></td>
        </tr>
      </table><br>
      <form>
        <input type="Submit" name="register" value="Register" align="MIDDLE">
        <input type="reset" name="clear" value="Clear Form" align="MIDDLE">
      </form>
    </body></html>db
    -- next time, no JavaScript questions, please!
    edit What you wanted to do was<div id="div1" style = 'display:none;'>and in the functiondocument.getElementById("div1").style.display = "block";Edited by: Darryl.Burke

  • An event handler for several subclasses.

    I've been trying to write an event handler that is parameterized by a window
    being passed to it. The event handler is intended to handle the exception event
    that occurs when the window completes. I have had problems trying to write this.
    The scenario is as follows.
    I have a task that listens to events that respresent requests for a window being
    opened. On receiving these, it starts the window, also as an asynchronous task.
    The windows that may be opened (say window classes B, C, and D) are all
    subclasses of window class A. The event handler that I register for (after
    instantiating the window) takes a window of class A as parameter. It responds to
    the exception events for the Display() method of window passed in.
    Now the problems I have encountered are as follows :
    To allow the event handler to respond to the exception event of a window of
    class A, class A has the exception event defined for it. To allow me to start a
    window of class B where completion = event, I also have to define the same
    exception event. This hides the return and exception for class A. The
    implications of this in the event handler is that the event cannot be trapped
    unless I cast the parameter passed in into class B on the ' when return_event '
    line. This makes the event handler specific to class B.
    (This situation is also presumable caused by the fact that each subclasses
    overrides the Display method of window class A, and the exception event is
    defined for the Display method.)
    An alternative approach I tried was using interfaces. I defined the exception
    event as an event on an interface. This was defined with the same parameters as
    the exception events of classes B, C, and D would have (ie. the exception
    event had two parameters - one of type GenericException, and one of ErrorMgr). I
    then made classes B, C, and D implement the interface. The event handler
    parameter would be the interface rather than class A. However class B would not
    compile as the GenericException parameter for the event in the interface uses
    the input mechanism, but the GenericException parameter for the exception event
    in the display event of classes B, C, and D uses copy input. I have ben unable
    to find a way to change the mechanism for event parameters.
    Has anybody got any ideas as to how I may be able to achieve the goals of an
    event handler that can respond the exception event of a number of subclasses.
    Thanks
    Steve Elvin
    Systems Developer
    Frontline Ltd.
    UK.
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

    Steve,
    Try this. Have a method in your super class A , say StubDisplay
    which processes the event loop.
    Also make this method return Exception and/or completion events you
    desire.
    Instead of overriding Display() in your sublclasses, override this
    StubDisplay method.
    You need not have to redefine the exception/completion events in
    your sublclasses B,C ..because they naturally inherit from the super class
    A.
    Using interfaces may not be a good idea in this case because, you
    will be forced to implement them in your subclasses even if you dont
    need them in some specific cases.
    Good luck!
    Ajith Kallambella M.
    Forte Systems Engineer,
    Internationational Business Corporation.
    From: [email protected][SMTP:[email protected]]
    Reply To: [email protected]
    Sent: Wednesday, May 13, 1998 4:42 AM
    To: [email protected]
    Subject: An event handler for several subclasses.
    I've been trying to write an event handler that is parameterized by a
    window
    being passed to it. The event handler is intended to handle the exception
    event
    that occurs when the window completes. I have had problems trying to write
    this.
    The scenario is as follows.
    I have a task that listens to events that respresent requests for a window
    being
    opened. On receiving these, it starts the window, also as an asynchronous
    task.
    The windows that may be opened (say window classes B, C, and D) are all
    subclasses of window class A. The event handler that I register for (after
    instantiating the window) takes a window of class A as parameter. It
    responds to
    the exception events for the Display() method of window passed in.
    Now the problems I have encountered are as follows :
    To allow the event handler to respond to the exception event of a window
    of
    class A, class A has the exception event defined for it. To allow me to
    start a
    window of class B where completion = event, I also have to define the same
    exception event. This hides the return and exception for class A. The
    implications of this in the event handler is that the event cannot be
    trapped
    unless I cast the parameter passed in into class B on the ' when
    return_event '
    line. This makes the event handler specific to class B.
    (This situation is also presumable caused by the fact that each subclasses
    overrides the Display method of window class A, and the exception event is
    defined for the Display method.)
    An alternative approach I tried was using interfaces. I defined the
    exception
    event as an event on an interface. This was defined with the same
    parameters as
    the exception events of classes B, C, and D would have (ie. the
    exception
    event had two parameters - one of type GenericException, and one of
    ErrorMgr). I
    then made classes B, C, and D implement the interface. The event handler
    parameter would be the interface rather than class A. However class B
    would not
    compile as the GenericException parameter for the event in the interface
    uses
    the input mechanism, but the GenericException parameter for the exception
    event
    in the display event of classes B, C, and D uses copy input. I have ben
    unable
    to find a way to change the mechanism for event parameters.
    Has anybody got any ideas as to how I may be able to achieve the goals of
    an
    event handler that can respond the exception event of a number of
    subclasses.
    Thanks
    Steve Elvin
    Systems Developer
    Frontline Ltd.
    UK.
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

  • OID resource goes to Disabled Status after running the post process event handler

    Hi,
    We have an event handler on post update operation. The event handler using the user manager API to do some modification. We are using the "Lock()" function of User Manager API to lock the user based on attribute value. After running the event handler though the user gets locked as expected, it also disables the OID resource after that. We have other resources along with OID but they are not affected with event handler. Only the OID user is triggering the disable operation on locking the user on event handler. We have used the OID 11g Connector for implementation.
    If you manually lock the user in user interface it's not going to disable status.
    How we can stop to disable the OID User Account.
    Thanks

    No.If you lock the user in Console it's not going disable status.
    Thanks

  • Xcontrols and dynamic User Events

    Hi all,
    I'm trying to build a XControl with an Event Structure that accepts User Events generated by a separate parallel loop on the block diagram.
    A monitoring loop with its own Event Strucure on the block diagram seems to handle the User Events generated by my producer loop but the XControl seems to ignore the User Events.
    Example LabView 8.5.1 project is attached
    Any ideas?
    Attachments:
    XControl.zip ‏75 KB

    Hi Anne,
    > Dynamic user event is registered to the event structure, and many dynamic user events come in very fast, about every 30 ms.
    The 30ms rate is not unreasonably fast as long as the processing for the event(s) can be completed in less than 30ms.
    What tasks are you doing in the User Event?
    For tasks that may take time to complete (like logging) you could queue up the data and send it to a consumer loop.
    > It freezes up the user interface, no response to mouse and keyboard, even after all user events finish execution.
    My *guess* here is that you got stuck in an event that never completed.
    steve
    Help the forum when you get help. Click the "Solution?" icon on the reply that answers your
    question. Give "Kudos" to replies that help.

  • Error management in an event handler in a powershell form

    Hi guys
    I wrote a powershell form using event handler. It ask for a name and a IP adress and other things
    In the event handler,
    - if the user leave the name blank, I open a message box saying it should not be empty
    - if the user enter a wrong ip adress, I open a message box saying it should be like x.x.x.x
    If both occurs, it displays 2 message box.
    But I would like to display only the first message box of the first error and then exit the handler, to avoid displaying many messages.
    How to exit from a handler  and stay in the form  (not like the cancel button handler which close the form with a form.close() statement)
    I tried break statement or exit without success
    thanks
    ML

    Hi guys
    This is the code I wrote today. I may give also the full code of the interface, but it reach 1300 lines.
    $Retry variable lets me control the first error in the interface to display the message box.
    It's not finished yet, I need to add something like "formclose" if $Retry is false.
    I use semicolons because for me, it's easier to read :-).
    I'm sorry I don't understand the explanation in your link.
    http://msdn.microsoft.com/en-us/library/system.componentmodel.canceleventargs%28v=vs.110%29.aspx
    What would happen if I type
    $_.Cancel = $true
    instead of $Retry = 1, it will exit immediately from the handler ? I can't try now, I'm came back home
    Thanks
    ML
    function IsIP($value) {
    $match = "\b(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}\b"
    return $value -match $match
    function IsURL([string]$Url)
    if($Url -eq $null) {return $false}
    else {return $Url -match "^(ht|f)tp(s?)\:\/\/[0-9a-zA-Z]([-.\w]*[0-9a-zA-Z])*"+`
    "(:(0-9)*)*(\/?)([a-zA-Z0-9\-\.\?\,\'\/\\\+&amp;%\$#_]*)?$"}
    function toBinary ($dottedDecimal){
    $dottedDecimal.split(".") | %{$binary=$binary + $([convert]::toString($_,2).padleft(8,"0"))}
    return $binary
    #Provide Custom Code for events specified in PrimalForms.
    $handler_WinFactoryGUI_Load=
    #TODO: Place custom script here
    $HardwareCombo.SelectedIndex = 0 # Default values of Combo boxes
    $WindowsEditionCombo.SelectedIndex = 0
    $ServerName.Select()
    $handler_cancel_Click=
    #TODO: Place custom script here
    $WinFactoryGUI.Close()
    $Handler_Server_Info_Leave=
    #TODO: Place custom script here
    $Handler_DNS_Config_Leave=
    #TODO: Place custom script here
    $Handler_GenerateIso_Click=
    #TODO: Place custom script here
    $Retry = $false
    # ServerName
    $ServerName2Install = $ServerName.Text
    if ($ServerName2Install -eq "") {$MSg = "Server name is missing"; $Retry = $true}
    # Windows Version
    $TabWindowsVersion = @("2008R2STD","2008R2ENT","2008R2DTC","2012R2STD","2012R2DTC")
    $i = $WindowsEditionCombo.SelectedIndex
    $WindowsVersion = $TabWindowsVersion[$i]
    if (! $Retry) {
    # OperIP : mandatory
    $OperIP = $OperIP1.Text + "." + $OperIP2.Text + "." + $OperIP3.Text + "." + $OperIP4.Text
    $OperMask = $OperMask1.Text + "." + $OperMask2.Text + "." + $OperMask3.Text + "." + $OperMask4.Text
    $DefaultGateway = $Gateway1.Text + "." + $Gateway2.Text + "." + $Gateway3.Text + "." + $Gateway4.Text
    $Msg = ""
    $OperIPOK = IsIP($OperIP); if (! $OperIPOK) { $Msg = $Msg + "OperIP is invalid`n";$Retry = $true }
    $OperMaskOK = IsIP($OperMask); if (! $OperMaskOK) { $Msg = $Msg + "OperMask is invalid`n";$Retry = $true }
    $DefaultGatewayOK = IsIP($DefaultGateway); if (! $DefaultGatewayOK) { $Msg = $Msg + "DefaultGateway is invalid`n";$Retry = $true}
    $ipBinary = toBinary $OperIP
    $smBinary = toBinary $OperMask
    #how many bits are the network ID
    $netBits=$smBinary.indexOf("0")
    #validate the subnet mask
    if(($smBinary.length -ne 32) -or ($smBinary.substring($netBits).contains("1") -eq $true)) {$Msg = "Subnet Mask is invalid!";$Retry = $true}
    else {
    #validate that the IP address
    if(($ipBinary.length -ne 32) -or ($ipBinary.substring($netBits) -eq "00000000") -or ($ipBinary.substring($netBits) -eq "11111111")) {$Msg = "IP Address is invalid!";$Retry = $True}
    # TechIP : optional
    if (!$Retry) {
    if (($TechIP1.Text -eq "") -and ($TechIP2.Text -eq "") -and ($TechIP3.Text -eq "") -and ($TechIP4.Text -eq ""))
    $TechIP = "0.0.0.0"
    $TechMask = "0.0.0.0"
    else
    $TechIP = $TechIP1.Text + "." + $TechIP2.Text + "." + $TechIP3.Text + "." + $TechIP4.Text
    $TechMask = $TechMask1.Text + "." + $TechMask2.Text + "." + $TechMask3.Text + "." + $TechMask4.Text
    $TechIPOK = IsIP($TechIP)
    if (! $TechIPOK) { $Msg = $Msg + "TechIP is invalid`n";$Retry = $true }
    $TechMaskOK = IsIP($TechMask)
    if (! $TechMaskOK) { $Msg = $Msg + "TechMask is invalid`n";$Retry = $true }
    # DNS domain
    if (! $Retry) {
    $DnsDomainSrv2Install = $DnsDomain.Text
    if ($DnsDomainSrv2Install -eq "") {$Msg = $Msg + "DNS Domain is invalid`n";$Retry = $true }
    # DNS Suffixes
    if (! $Retry) {
    $DnsSuffixes2Install = $DnsSuffixes.Text.replace("`n",":")
    if ($DnsSuffixes2Install[$DnsSuffixes2Install.Length] -eq ":") {
    $DnsSuffixes2Install = $DnsSuffixes2Install.Substring(0,$DnsSuffixes2Install.Length-1)
    if ($DnsSuffixes2Install -eq "") {$Msg = $Msg + "DNS suffixes list is invalid`n";$Retry = $true }
    # DNS adresses
    if (! $Retry) {
    if ($DNSIP11.Text -ne "") {
    $DNSIP1 = $DNSIP11.Text + "." + $DNSIP12.Text + "." + $DNSIP13.Text + "." + $DNSIP14.Text
    $DNSIP1POK = IsIP($DNSIP1) ; if (! $DNSIP1POK) { $Msg = $Msg + "DNS IP 1 is invalid`n";$Retry = $true } else { $DNSAddrList = $DNSIP1}
    if ($DNSIP21.Text -ne "") {
    $DNSIP2 = $DNSIP21.Text + "." + $DNSIP22.Text + "." + $DNSIP23.Text + "." + $DNSIP24.Text
    $DNSIP2POK = IsIP($DNSIP2) ; if (! $DNSIP2POK) { $Msg = $Msg + "DNS IP 2 is invalid`n";$Retry = $true } else {$DNSAddrList = $DNSAddrList + ":" + $DNSIP2}
    if ($DNSIP31.Text -ne "") {
    $DNSIP3 = $DNSIP31.Text + "." + $DNSIP32.Text + "." + $DNSIP33.Text + "." + $DNSIP34.Text
    $DNSIP3POK = IsIP($DNSIP3) ; if (! $DNSIP3POK) { $Msg = $Msg + "DNS IP 3 is invalid`n";$Retry = $true } else {$DNSAddrList = $DNSAddrList + ":" + $DNSIP3}
    if ($DNSIP41.Text -ne "") {
    $DNSIP4 = $DNSIP41.Text + "." + $DNSIP42.Text + "." + $DNSIP43.Text + "." + $DNSIP44.Text
    $DNSIP4POK = IsIP($DNSIP4) ; if (! $DNSIP4POK) { $Msg = $Msg + "DNS IP 4 is invalid`n";$Retry = $true } else {$DNSAddrList = $DNSAddrList + ":" + $DNSIP4}
    else { $Msg = $Msg + "At least, one Dns server IP must be provided`n";$Retry = $true }
    # Hardware
    $TabHardware = @("VM","HP","MS")
    $i = $HardwareCombo.SelectedIndex
    $Hardware = $TabHardware[$i]
    # vCenter
    $vCenterName = "parameter.not.used"
    # Flags
    #""_;_;_;1;_;http://m011ML-SCCM.pocx86.tstwinx.net:8530;1"""
    if (! $Retry) {
    $Flag = ""
    if ($CheckBoxPED.Checked -eq $true) {$Flag = $Flag + "1;"} else {$Flag = $Flag + "_;"}
    if ($CheckBoxOmnivision.Checked -eq $true) {$Flag = $Flag + "1;"} else {$Flag = $Flag + "_;"}
    if ($CheckBoxBackup.Checked -eq $true) {$Flag = $Flag + "1;"} else {$Flag = $Flag + "_;"}
    if ($CheckBoxNagiosInstall.Checked -eq $true) {$Flag = $Flag + "1;"} else {$Flag = $Flag + "_;"}
    if ($CheckBoxInstallSRM.Checked -eq $true) {$Flag = $Flag + "1;"} else {$Flag = $Flag + "_;"}
    $WsusUrl2Configure = $WsusUrl.Text;
    if ($WsusUrl2Configure -eq "") {$WsusUrl2Configure = "_"}
    else {
    $WsusURLOK = IsUrl($WsusUrl2Configure)
    if (! $WsusURLOK) {$Msg = $Msg + "WSUS Url is Invalid`n";$Retry = $true }
    $Flag = $Flag + $WsusUrl2Configure
    if ($CheckBoxHPSA.Checked -eq $true) {$Flag = $Flag + ";1"} else {$Flag = $Flag + ";_"}
    $Flag = """""$Flag"""""""
    if ($Retry) {[System.Windows.Forms.MessageBox]::Show($Msg,"Status",0);$Msg = ""}
    else { $WinFactoryCall = "start-process ""cmd.exe"" ""/c .\GenBootImage.cmd "
    $WinFactoryCall = $WinFactoryCall + $ServerName2Install + " " + $WindowsVersion + " " + $OperIP + " " + $OperMask + " " + $DefaultGateway + " " + $TechIP + " " + $TechMask
    $WinFactoryCall = $WinFactoryCall + " " + $DNSAddrList + " " + $DnsDomainSrv2Install + " " + $DnsSuffixes2Install + " " + $Hardware + " " + $vCenterName + " " + $Flag + " -wait"
    write-host $WinFactoryCall
    $OnLoadForm_StateCorrection=
    {#Correct the initial state of the form to prevent the .Net maximized form issue
    $WinFactoryGUI.WindowState = $InitialFormWindowState
    ML

  • About CL_GUI_ALV_GRID's event-handling & PAI/PBO

    Hi, all,
    I met a problem when using CL_GUI_ALV_GRID's event-handling.
    I created a simple event-handling-class with an event-handling-method for DOUBLE-CLICK event of CL_GUI_ALV_GRID. And the event-handling-method, only makes some changes to the contents of itab to be shown in ALV_GRID.
    The problem is: In my idea, after event-dispatch and event-handling in PAI, subsequent PBO will be called. Since SET_TABLE_FOR_FIRST_DISPLAY is called in PBO, I would saw the changed itab shown. BUT, I saw the contents of the itab remaining unchanged.
    * PAI module, DISPATCH the event
      CASE OK_CODE.
        WHEN OTHERS.
          CALL METHOD cl_gui_cfw=>dispatch.
      ENDCASE.
    I debugged, and found that, after event-handling-method, PBO module doesn't execute.
    That's my wondering, after the preceding PAI, shouldn't the subsequent PBO appear? OR is event-handling different from other user actions?
    Many thanks.

    Hi,
    for double click you need explicit handler ,
    just check it.
    REPORT  ZTEST1234    MESSAGE-ID ZZ                           .
    DATA: G_GRID TYPE REF TO CL_GUI_ALV_GRID,  "First
          G_GRID1 TYPE REF TO CL_GUI_ALV_GRID. "Second
    DATA: L_VALID TYPE C,
          V_FLAG,
          V_DATA_CHANGE,
          V_ROW TYPE LVC_S_ROW,
          V_COLUMN TYPE LVC_S_COL,
          V_ROW_NUM TYPE LVC_S_ROID.
    DATA: OK_CODE LIKE SY-UCOMM,
          SAVE_OK LIKE SY-UCOMM,
          G_CONTAINER1 TYPE SCRFNAME VALUE 'TEST', "First Container
          G_CONTAINER2 TYPE SCRFNAME VALUE 'TEST1',"Second container
          GS_LAYOUT TYPE LVC_S_LAYO.
    DATA:BEGIN OF  ITAB OCCURS 0,
         VBELN LIKE LIKP-VBELN,
         POSNR LIKE LIPS-POSNR,
         LFDAT like lips-vfdat,
         BOX(1),
         HANDLE_STYLE TYPE LVC_T_STYL,
         END OF ITAB.
    *       CLASS lcl_event_handler DEFINITION
    CLASS LCL_EVENT_HANDLER DEFINITION .
      PUBLIC SECTION .
        METHODS:
    **Hot spot Handler
        HANDLE_HOTSPOT_CLICK FOR EVENT HOTSPOT_CLICK OF CL_GUI_ALV_GRID
                          IMPORTING E_ROW_ID E_COLUMN_ID ES_ROW_NO,
    **Handler to Check the Data Change
        HANDLE_DATA_CHANGED FOR EVENT DATA_CHANGED
                             OF CL_GUI_ALV_GRID
                             IMPORTING ER_DATA_CHANGED
                                       E_ONF4
                                       E_ONF4_BEFORE
                                       E_ONF4_AFTER,
    **Double Click Handler
        HANDLE_DOUBLE_CLICK FOR EVENT DOUBLE_CLICK OF CL_GUI_ALV_GRID
                                         IMPORTING E_ROW E_COLUMN ES_ROW_NO.
    ENDCLASS.                    "lcl_event_handler DEFINITION
    *       CLASS lcl_event_handler IMPLEMENTATION
    CLASS LCL_EVENT_HANDLER IMPLEMENTATION.
    *Handle Hotspot Click
      METHOD HANDLE_HOTSPOT_CLICK .
        CLEAR: V_ROW,V_COLUMN,V_ROW_NUM.
        V_ROW  = E_ROW_ID.
        V_COLUMN = E_COLUMN_ID.
        V_ROW_NUM = ES_ROW_NO.
        MESSAGE I000 WITH V_ROW 'clicked'.
      ENDMETHOD.                    "lcl_event_handler
    *Handle Double Click
      METHOD  HANDLE_DOUBLE_CLICK.
        CLEAR: V_ROW,V_COLUMN,V_ROW_NUM.
        V_ROW  = E_ROW.
        V_COLUMN = E_COLUMN.
        V_ROW_NUM = ES_ROW_NO.
        IF E_COLUMN = 'VBELN'.
          SET PARAMETER ID 'VL' FIELD ITAB-VBELN.
          CALL TRANSACTION 'VL03N' AND SKIP FIRST SCREEN.
        ENDIF.
        IF E_COLUMN = 'POSNR'.
          MESSAGE I000 WITH 'Click on POSNR row number '  E_ROW.
          "with this row num you can get the data
        ENDIF.
      ENDMETHOD.                    "handle_double_click
    **Handle Data Change
      METHOD HANDLE_DATA_CHANGED.
        CALL METHOD G_GRID->REFRESH_TABLE_DISPLAY
          EXCEPTIONS
            FINISHED = 1
            OTHERS   = 2.
        IF SY-SUBRC <> 0.
          MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                     WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
      ENDMETHOD.                    "HANDLE_DATA_CHANGED
    ENDCLASS.                    "LCL_EVENT_HANDLER IMPLEMENTATION
    *&             Global Definitions
    DATA:      G_CUSTOM_CONTAINER TYPE REF TO CL_GUI_CUSTOM_CONTAINER,"Container1
                G_HANDLER TYPE REF TO LCL_EVENT_HANDLER, "handler
                G_CUSTOM_CONTAINER1 TYPE REF TO CL_GUI_CUSTOM_CONTAINER. "Container2
    *- Fieldcatalog for First and second Report
    DATA: IT_FIELDCAT  TYPE  LVC_T_FCAT,
          X_FIELDCAT TYPE LVC_S_FCAT,
          LS_VARI  TYPE DISVARIANT.
    *                START-OF_SELECTION
    START-OF-SELECTION.
      SELECT VBELN
             POSNR
             FROM LIPS
             UP TO 20 ROWS
             INTO CORRESPONDING FIELDS OF TABLE ITAB.
    END-OF-SELECTION.
      IF NOT ITAB[] IS INITIAL.
        CALL SCREEN 100.
      ELSE.
        MESSAGE I002 WITH 'NO DATA FOR THE SELECTION'(004).
      ENDIF.
    *&      Form  CREATE_AND_INIT_ALV
    *       text
    FORM CREATE_AND_INIT_ALV .
      DATA: LT_EXCLUDE TYPE UI_FUNCTIONS.
    "First Grid
      CREATE OBJECT G_CUSTOM_CONTAINER
             EXPORTING CONTAINER_NAME = G_CONTAINER1.
      CREATE OBJECT G_GRID
             EXPORTING I_PARENT = G_CUSTOM_CONTAINER.
    "Second Grid
      CREATE OBJECT G_CUSTOM_CONTAINER1
             EXPORTING CONTAINER_NAME = G_CONTAINER2.
      CREATE OBJECT G_GRID1
             EXPORTING I_PARENT = G_CUSTOM_CONTAINER1.
    * Set a titlebar for the grid control
      CLEAR GS_LAYOUT.
      GS_LAYOUT-GRID_TITLE = TEXT-003.
      GS_LAYOUT-ZEBRA = SPACE.
      GS_LAYOUT-CWIDTH_OPT = 'X'.
      GS_LAYOUT-NO_ROWMARK = 'X'.
      GS_LAYOUT-BOX_FNAME = 'BOX'.
      GS_LAYOUT-CTAB_FNAME = 'CELLCOLOR'.
      GS_LAYOUT-STYLEFNAME = 'HANDLE_STYLE'.
      CALL METHOD G_GRID->REGISTER_EDIT_EVENT
        EXPORTING
          I_EVENT_ID = CL_GUI_ALV_GRID=>MC_EVT_MODIFIED.
      CREATE OBJECT G_HANDLER.
      SET HANDLER G_HANDLER->HANDLE_DOUBLE_CLICK FOR G_GRID.
    *  SET HANDLER G_HANDLER->HANDLE_HOTSPOT_CLICK FOR G_GRID.
      SET HANDLER G_HANDLER->HANDLE_DATA_CHANGED FOR G_GRID.
    data: ls_outatb like line of itab,
          v_index type sy-tabix.
    DATA: LS_EDIT TYPE LVC_S_STYL,
            LT_EDIT TYPE LVC_T_STYL.
    LOOP AT ITAB INTO ls_outatb WHERE POSNR = '000010'.
        V_INDEX = SY-TABIX.
        LS_EDIT-FIELDNAME = 'VBELN'.
        LS_EDIT-STYLE = CL_GUI_ALV_GRID=>MC_STYLE_DISABLED.
        LS_EDIT-STYLE2 = SPACE.
        LS_EDIT-STYLE3 = SPACE.
        LS_EDIT-STYLE4 = SPACE.
        LS_EDIT-MAXLEN = 8.
        INSERT LS_EDIT INTO TABLE LT_EDIT.
        INSERT LINES OF LT_EDIT INTO TABLE ls_outatb-handle_style.
        MODIFY ITAB INDEX V_INDEX FROM ls_outatb  TRANSPORTING
                                          HANDLE_STYLE.
      ENDLOOP.
    * setting focus for created grid control
      CALL METHOD CL_GUI_CONTROL=>SET_FOCUS
        EXPORTING
          CONTROL = G_GRID.
    * Build fieldcat and set editable for date and reason code
    * edit enabled. Assign a handle for the dropdown listbox.
      PERFORM BUILD_FIELDCAT.
    * Optionally restrict generic functions to 'change only'.
    *   (The user shall not be able to add new lines).
      PERFORM EXCLUDE_TB_FUNCTIONS CHANGING LT_EXCLUDE.
    **Vaiant to save the layout
      LS_VARI-REPORT      = SY-REPID.
      LS_VARI-HANDLE      = SPACE.
      LS_VARI-LOG_GROUP   = SPACE.
      LS_VARI-USERNAME    = SPACE.
      LS_VARI-VARIANT     = SPACE.
      LS_VARI-TEXT        = SPACE.
      LS_VARI-DEPENDVARS  = SPACE.
      CALL METHOD G_GRID->REGISTER_EDIT_EVENT
        EXPORTING
          I_EVENT_ID = CL_GUI_ALV_GRID=>MC_EVT_MODIFIED.
    **Calling the Method for ALV output for First Grid
      CALL METHOD G_GRID->SET_TABLE_FOR_FIRST_DISPLAY
        EXPORTING
          IT_TOOLBAR_EXCLUDING = LT_EXCLUDE
          IS_VARIANT           = LS_VARI
          IS_LAYOUT            = GS_LAYOUT
          I_SAVE               = 'A'
        CHANGING
          IT_FIELDCATALOG      = IT_FIELDCAT
          IT_OUTTAB            = ITAB[].
    **Calling the Method for ALV output for Second Grid
       CALL METHOD G_GRID1->SET_TABLE_FOR_FIRST_DISPLAY
    *    EXPORTING
    *      IT_TOOLBAR_EXCLUDING = LT_EXCLUDE
        CHANGING
          IT_FIELDCATALOG      = IT_FIELDCAT
          IT_OUTTAB            = ITAB[].
    * Set editable cells to ready for input initially
      CALL METHOD G_GRID->SET_READY_FOR_INPUT
        EXPORTING
          I_READY_FOR_INPUT = 1.
    ENDFORM.                               "CREATE_AND_INIT_ALV
    *&      Form  EXCLUDE_TB_FUNCTIONS
    *       text
    *      -->PT_EXCLUDE text
    FORM EXCLUDE_TB_FUNCTIONS CHANGING PT_EXCLUDE TYPE UI_FUNCTIONS.
    * Only allow to change data not to create new entries (exclude
    * generic functions).
      DATA LS_EXCLUDE TYPE UI_FUNC.
      LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_COPY_ROW.
      APPEND LS_EXCLUDE TO PT_EXCLUDE.
      LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_DELETE_ROW.
      APPEND LS_EXCLUDE TO PT_EXCLUDE.
      LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_APPEND_ROW.
      APPEND LS_EXCLUDE TO PT_EXCLUDE.
      LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_INSERT_ROW.
      APPEND LS_EXCLUDE TO PT_EXCLUDE.
      LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_MOVE_ROW.
      APPEND LS_EXCLUDE TO PT_EXCLUDE.
      LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_COPY.
      APPEND LS_EXCLUDE TO PT_EXCLUDE.
      LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_CUT.
      APPEND LS_EXCLUDE TO PT_EXCLUDE.
      LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_PASTE.
      APPEND LS_EXCLUDE TO PT_EXCLUDE.
      LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_PASTE_NEW_ROW.
      APPEND LS_EXCLUDE TO PT_EXCLUDE.
      LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_UNDO.
      APPEND LS_EXCLUDE TO PT_EXCLUDE.
    ENDFORM.                               " EXCLUDE_TB_FUNCTIONS
    *&      Form  build_fieldcat
    *       Fieldcatalog
    FORM BUILD_FIELDCAT .
      DATA: L_POS TYPE I.
      L_POS = L_POS + 1.
      X_FIELDCAT-SCRTEXT_M = 'Delivery'(024).
      X_FIELDCAT-FIELDNAME = 'VBELN'.
      X_FIELDCAT-TABNAME = 'ITAB'.
      X_FIELDCAT-COL_POS    = L_POS.
      X_FIELDCAT-NO_ZERO    = 'X'.
      X_FIELDCAT-EDIT      = 'X'.
      X_FIELDCAT-OUTPUTLEN = '10'.
      APPEND X_FIELDCAT TO IT_FIELDCAT.
      CLEAR X_FIELDCAT.
      L_POS = L_POS + 1.
      X_FIELDCAT-SCRTEXT_M = 'Item'(025).
      X_FIELDCAT-FIELDNAME = 'POSNR'.
      X_FIELDCAT-TABNAME = 'ITAB'.
      X_FIELDCAT-COL_POS    = L_POS.
      X_FIELDCAT-OUTPUTLEN = '5'.
      APPEND X_FIELDCAT TO IT_FIELDCAT.
      CLEAR X_FIELDCAT.
        L_POS = L_POS + 1.
        X_FIELDCAT-SCRTEXT_M = 'Del Date'(015).
      X_FIELDCAT-FIELDNAME = 'LFDAT'.
      X_FIELDCAT-TABNAME = 'ITAB'.
      X_FIELDCAT-COL_POS    = L_POS.
      X_FIELDCAT-OUTPUTLEN = '10'.
      APPEND X_FIELDCAT TO IT_FIELDCAT.
      CLEAR X_FIELDCAT.
      L_POS = L_POS + 1.
    ENDFORM.                    " build_fieldcat
    *&      Module  STATUS_0100  OUTPUT
    *       text
    MODULE STATUS_0100 OUTPUT.
      SET PF-STATUS 'MAIN100'.
      SET TITLEBAR 'MAIN100'.
      IF G_CUSTOM_CONTAINER IS INITIAL.
    **Initializing the grid and calling the fm to Display the O/P
        PERFORM CREATE_AND_INIT_ALV.
      ENDIF.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
    *       text
    MODULE USER_COMMAND_0100 INPUT.
      CASE SY-UCOMM.
        WHEN 'BACK'.
          LEAVE TO SCREEN 0.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    Regards
    vijay

  • Need Help with Event Handler Code - Doesnt come up in Event Handler Manager

    Hello there,
    Below is the code snippet that I am using to create a event handler:
    package com.oracle.events;
    import com.thortech.util.logging.Logger;
    import com.thortech.xl.client.events.tcBaseEvent;
    import com.thortech.xl.dataobj.tcDataObj;
    import com.thortech.xl.util.logging.LoggerModules;
    public class tcCheckOvrallProvStatusUDFs extends tcBaseEvent
         private static Logger logger = Logger.getLogger(LoggerModules.XL_JAVA_CLIENT);
         public tcCheckOvrallProvStatusUDFs()
              setEventName("Generating tcCheckOvrallProvStatusUDFs");
    * @Override
    * @throws Exception
         protected void implementation() throws Exception {
              tcDataObj data = getDataObject();
              String OIDProvStatus = data.getString("usr_udf_oidusrprovstatus");
    String EBSProvStatus = data.getString("usr_udf_ebstcausrprovstatus");
              if (OIDProvStatus.equals("Provisioned") && EBSProvStatus.equals("Provisioned")) {
                   setOverAllProvStatus(data);
         * @param data
         * @throws Exception
         private void setOverAllProvStatus(tcDataObj data) throws Exception
              data.setString("usr_udf_ovrrscprovstatus", "Provisioned");
    Its a simple code that I am using to populate value of a UDF field depending on the value of other 2 fields. I want to trigger it on Post-Insert and Post-Update events.
    But even if I restart the OIM server after placing the successfully compiled file (0 errors, 0 warnings) into the EventHandlers folder of OIM_HOME; it doesnt show up in the Design Console -> Development Tools -> Business Rule Definition -> Event Handler Manager. :( In order to create a event handler i need that file to show up in the lookup of event handlers/adapters. This JAR file doesnt come up over there.
    Is there anything missing within the code ?
    What else needs to be specified?
    Please provide some guidance.
    Thanks,
    - jhb.

    Now I have placed this JAR file in JAVATasks folder - made an entity adapter - in the event handler manager - i gave the class name/event handler name as 'setUDFValue' and the package as 'project5'. But now im getting it 'DOBJ.EVT_NOT_FOUND - Event Handler not found' error.
    package project5;
    import java.util.Hashtable;
    import Thor.API.Exceptions.tcAPIException;
    import java.util.Hashtable;
    import java.util.HashMap;
    import com.thortech.xl.util.config.ConfigurationClient;
    import Thor.API.tcResultSet;
    import Thor.API.tcUtilityFactory;
    import Thor.API.Operations.tcUserOperationsIntf;
    import java.lang.System;
    import Thor.API.Exceptions.tcUserNotFoundException;
    import java.util.Properties;
    import javax.mail.Message;
    import javax.mail.Session;
    import javax.mail.Transport;
    import javax.mail.internet.InternetAddress;
    import javax.mail.internet.MimeMessage;
    public class setUDFValue {
    private static final String SMTP_HOST_NAME="mail.smtp.host";
    public setUDFValue() {
    // public static void main(String[] args) {
    // setUDFValue.setvalue("jatinbhatt");
    // setUDFValue.sendemail("[email protected]","[email protected]");
    public static void setvalue(String UserID) {   
    try
    System.setProperty("XL.HomeDir", "F:/oim/oimserver/xellerate");
    System.setProperty("log4j.configuration",
    "F:/oim/oimserver/xellerate/config/log.properties");
    System.setProperty("java.security.policy",
    "F:/oim/oimserver/xellerate/config/xl.policy");
    System.setProperty("java.security.auth.login.config",
    "F:/oim/oimserver/xellerate/config/auth.conf");
    System.out.println("Startup...");
    System.out.println("Getting configuration...");
    ConfigurationClient.ComplexSetting config = ConfigurationClient.getComplexSettingByPath("Discovery.CoreServer");
    System.out.println("Login...");
    Hashtable env = config.getAllSettings();
    tcUtilityFactory ioUtilityFactory = new tcUtilityFactory(env,"xelsysadm","oimadmin1");
    System.out.println("Getting utility interfaces...");
    tcUserOperationsIntf moUserUtility = (tcUserOperationsIntf)ioUtilityFactory.getUtility("Thor.API.Operations.tcUserOperationsIntf");
    HashMap userMap = new HashMap();
    String str1 = null;
    String str2 = null;
    userMap.put("Users.User ID",UserID);
    userMap.put("Users.Status", "Active");
    tcResultSet userResultSet = null;
    try {
    userResultSet = moUserUtility.findAllUsers(userMap);
    } catch (tcAPIException e2) {
    // TODO Auto-generated catch block
    e2.printStackTrace();
    for (int i=0; i<userResultSet.getRowCount(); i++)
    userResultSet.goToRow(i);
    str1 = userResultSet.getStringValue("USR_UDF_OIDUSERPROV");
    str2 = userResultSet.getStringValue("USR_UDF_EBSUSERPROV");
    // System.out.println(userResultSet.getStringValue("USR_UDF_OIDUSERPROV"));
    // System.out.println(userResultSet.getStringValue("USR_UDF_EBSUSERPROV"));
    if (str1.equals("Provisioned") && (str2.equals("Provisioned") || str2.equals("NA")))
    userMap.put("USR_UDF_OVRRSCPROVSTATUS","Provisioned");
    moUserUtility.updateUser(userResultSet,userMap);
    moUserUtility.close();
    }catch (Exception e){
    e.printStackTrace();
    ERROR:
    ERROR RMICallHandler-63 XELLERATE.SERVER - Class/Method: tcDataObj/ runEvent encounter some problems: project5.setUDFValue
    java.lang.ClassCastException: project5.setUDFValue
         at com.thortech.xl.dataobj.tcDataObj.runEvent(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.eventPostUpdate(Unknown Source)
         at com.thortech.xl.dataobj.tcUSR.eventPostUpdate(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.update(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.save(Unknown Source)
         at com.thortech.xl.dataobj.tcTableDataObj.save(Unknown Source)
         at com.thortech.xl.ejb.beansimpl.tcUserOperationsBean.updateUserData(Unknown Source)
         at com.thortech.xl.ejb.beansimpl.tcUserOperationsBean.updateUser(Unknown Source)
         at com.thortech.xl.ejb.beans.tcUserOperationsSession.updateUser(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.evermind.server.ejb.interceptor.joinpoint.EJBJoinPointImpl.invoke(EJBJoinPointImpl.java:35)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.interceptor.system.TxRequiredInterceptor.invoke(TxRequiredInterceptor.java:50)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.interceptor.system.SecurityRoleInterceptor.invoke(SecurityRoleInterceptor.java:47)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.InvocationContextPool.invoke(InvocationContextPool.java:55)
         at com.evermind.server.ejb.StatelessSessionEJBObject.OC4J_invokeMethod(StatelessSessionEJBObject.java:87)
         at tcUserOperations_RemoteProxy_6ocop18.updateUser(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.evermind.server.rmi.RmiMethodCall.run(RmiMethodCall.java:53)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)
    Thanks,
    - jhb.

Maybe you are looking for

  • Function Module - Generic Extraction : Not able to solve

    Hi Guys,        I have created a function module. The function module is working well. But when i start the extraction. It does not stops. It starts loading same data package again and again. It is becoming an endless loop. I have ot ask basis person

  • LiveType to DVD Studio Menu

    I am working on a project that needs to have some text that looks like it is being typed on papyrus and scrolls up the screen on the DVD menu. The DVD contains standard definition NTSC video and the DVD menu in question is set to "Letterbox Pan & Sca

  • Laserjet 2605dn

    I only need to print in Black and White, so how can I do this? Unless I put all the cartridges, the printer won't work. I replaced the black one but not the color ones (they are empty) and I get a "REPLACE SUPPLIES" message. Please help!!!  The print

  • There is a CSS error with Mozilla Thimble currently - showing a big white box over the code area. Can you correct this?

    I guess this is a question for mozilla dev.

  • TWO computer sync on Creative Zen

    !I just got a replacement Zen from Crtv. I have a work computer, and a laptop for home/travel use. ) I only want to sync what I direct manually onto the zen, that said, CAN I use both computers to add/delete music depending on where I am, or does it