Translation of Control Parameters in Event Handlers?

On SAP EM, is it possible to 'translate' the control or info parameters depending on the language loggued?
We are working on the web interface of SAP OER.
Thanks for your answer.

Hello Bernard,
there is no standard concept for that in EM.
Only possibility that is used in many projects:
You can use BADI /SAPTRX/BADI_EH_S method AFTER_GET_DATA_DISP if you use the Web Dynpro UI. If you have access to the text tables from where the Parameters where originally filled you could retrieve them in the logon language. They are changed for display.
In principle you can change in this BADI method all EH data before it is displayed.
Best regards,
Steffen

Similar Messages

  • How to expose and code the event handlers of a base class?

    I have created a class that inherits NumericUpDown. When I instantiate an object from that class, I can make it visible and have it appear on my form just like any other NUD. How can I get that instantiated object to expose the event handlers of its base
    class, the NUD in this case, so that, for example, I can tell the client what action to take when the value of the instantiated object changes?
    Thanks for your help.

    I am not sure exactly what you mean.  Are you adding your NUD controls to the Form at design time from the toolbox or adding them in code at run time?  If you are adding them to the form from the toolbox then you access the events the same way
    you would a standart NUD control.   If it is at runtime and you have a fixed amount of them you are going to add then you can declare them Class Scoped using the
    WithEvents keyword which will let you access all their events.
    Public Class Form1
    Private WithEvents Nud1 As New NUD
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    Me.Controls.Add(Nud1)
    End Sub
    Private Sub Nud1_ValueChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles Nud1.ValueChanged
    Me.Text = Nud1.Value.ToString
    End Sub
    End Class
    Public Class NUD
    Inherits NumericUpDown
    'Your custom code to make it work how you want...
    End Class
     If this is not what you are doing then you may need to explain a bit more and show the code you are using so we understand better.
    If you say it can`t be done then i`ll try it

  • Problems with .chart-plot-background and event handlers

    Hello. I'm trying to add event handlers to my chart so that the user can be allowed click within the chart itself to perform certain actions like dragging, zooming, etc. To avoid having to deal with handling mouse clicks that lie outside the chart itself (for example on the axes), I've found that:
    .chart-plot-background
    is the Region that gives me the entire chart and nothing else. However, when I attach mouse listeners to this Region, the event is only registered on half of the cells in the chart. If you've seen the default JavaFX Chart background layout, you know that it contains alternating rows of cells with slightly different coloring. I've found that only the rows with the lightest gray coloring actually register a mouse click on them, which makes me believe the dark grey cells are not part of the .chart-plot-background, but something else on top.
    To me, this feels like an oversight in how the regions of the chart are defined. Why can I not get a listener to work on the whole chart and nothing else? Currently the only workaround seems to be to take the Region:
    .chart-content
    instead, and compute the difference between this region and the .chart-plot-background in order to manually suppress mouse clicks that lie outside .chart-plot-background.
    Anyone have suggestions? Is this worth issuing on the JavaFX Jira?

    Hello,
    I'm not an expert on controls, but here is my guess based on your description: when you register an event handler on a "background" node, it is called only when the mouse hovers over the background node - I suppose the light gray is the background with the light gray cells being transparent and dark grey cells being filled. So the behavior seems correct - you can't expect the events to be delivered to background when it is covered by other nodes. I think you really should register the handler on the entire chart and filter out the events you don't want to handle. This however should not require much of computing the difference between the regions, it should be possible to do just something like
    if (!background.contains(event.getX(), event.getY())) {
        return;
    Provided that the background doesn't reach under the axes as well. Note that if there are any different transforms between the background and the node with the handler registered on it, you may need to recompute the coordinates by
    background.sceneToLocal(event.getSceneX(), event.getSceneY());
    And use the contains method on that.

  • Parallel event handlers disabling events while handling

    Hi, I have an application where there are multiple event handlers in multiple while loops that are driven from the same front panel.  The front panel controls are designed to provide diferent motion control moves for different axes under control.  All events that trigger these moves are fired by the same event handler for the same axes of motion. Hence, for safety reasons, I do not want some of these controls to be executable while certain other move profiles are executing. Sounds simple to implement right?
    When I use traditional prop nodes like disable to disable the front panel controls, the event queue still acquires the event and then subsequently executes it.   I want to be able to clear this event queue so that no other events from a certain group of my front panel controls can be executed simultaneousy.  However, I do not want to disable all front panel controls since I have other buttons that are capable of controlling other indepenedent things and safety functions like stopping.
    It is like I need a disable events property or soemthing that can be done programmatically. Can someone please advise me on what makes sense to do here?
    Attachments:
    evntdisable.vi ‏119 KB

    There is no way to interact directly with the event queue that LV maintains. If you need to do that you need to utilize the queue functions that LV provides and create your own event queue. However, if all you need is prevent interactions while an event in being processed, value change events have a setting that is (set by default) called: Lock Panel Until Handler Completes. And for other kinds of events, there's an option in the event structure's event-definition dialog box that perhorms the same action.
    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

  • Event Handlers and Callbacks:  Best way to handle?

    I'm writing an actionscript class. I'm wondering how to deal
    with call backs and event handlers within my class. In particular,
    I'm wondering how I might structure my class so that developers
    using it can choose which arguments get passed to the callback
    function as they code. I've been googling and haven't found any
    particularly useful information on this.
    As far as I can tell, it would appear that the parameters
    passed to any callback function are determined at the time I write
    my class as this anonymous function example illustrates.
    var myObj:Object = new MyClass('foo', 'bar');
    myObj.onLoad = function(arg) {
    // the args passed to this anonymous function are dictated
    by the actionscript defnining MyClass
    I have also seen an approach using named functions and a
    class method for setting the event handler which allows a developer
    to pass some object to be used for scoping the named function but
    this also results in the parameters for the callback being
    predetermined by the actionscript that defines the class
    function myLoad(arg) {
    // the args passed to this function are also dictated by the
    actionscript defining MyClass
    var myObj:Object = new MyClass('foo', 'bar');
    myObj.setOnLoadHandler(this, 'myLoad');
    As far as I can tell, neither approach would let a developer
    specify any parameters for the callback functions (onLoad() in the
    first example, myLoad() in the second example). Which of these
    approaches is considered 'best practice'? Also, what would I do if
    I wanted to specify that the callback should operate on a
    particular movieclip on my timeline? How can I pass that
    movieclip's parameter to the callback function?

    You can download the Library from this link. Inside is an example that shows how to handle windows messages/events.
    http://zone.ni.com/devzone/cda/epd/p/id/4394

  • 10g: Data Binding in event handlers?

    I'm trying to use data binding in my event handlers so that I can have a definitive source for the Strings that name things like this. I can see that the page is getting generated with the proper names on the elements in the page, but I always get an UnhandledEventException when I trigger the event. The idea is something like this:
            <submitButton text="Refresh" event="${ pageBean.controlRefreshEventName }" >
            </submitButton>
            <submitButton text="Hide Controls" event="${ pageBean.controlHideEventName }" >
            </submitButton>
        <handlers>
            <event name="${ pageBean.controlRefreshEventName }">
                <method class="com.avega.portlets.view.EventHandler"
                        method="handleControlFormSubmit"/>
            </event>
            <event name="${ pageBean.controlHideEventName }">
                <method class="com.avega.portlets.view.EventHandler"
                        method="handleControlFormSubmit"/>
            </event>
        </handlers>
    ...Now in my EventHandler I would be able to use the getXXXName methods when checking for which submit button was hit. Except I'm getting an exception instead.
    (BTW, I only have the two event tags because I wasn't sure how to concatenate the el expressions with a space...)

    No, there's no indication that anything is wrong until I cause the event and get the UnhandledEventException.
    However, I did the an experiment with the following tags, the first in a plain JSP, the second in a UIX page, and it seems that this is the normal way of handling a non-existant bean reference. Both cases printed 'text' in the page and did not complain that 'noBean' didn't exist. It seems you get an error when you reference a non-existant property on an existing bean, but no error if the bean itself doesn't exist. Anyway, UIX doesn't appear to be any different from JSP in this regard.
    <c:out value="${ noBean.noProperty } text" />
    <styledText text="${ noBean.noProperty } text" />

  • How to Deploy the Event Handlers OIM 11g

    Hi
    I have developed the code for post process event handler using OIM 11 G API. The OIM not invoking the EventHandlers while updating the users attribute or creating the users attribute.
    I have done the following task to develop and deploy the OIM 11g Event handlers. They are
    1) Implementing the PostProcessHandler interface and provide the implementation of execute method.
    Sample Class
    public class SamplePostProcessEventHandler implements PostProcessHandler {
         private Logger logger=Logger.getLogger("TEST-LOGGER");
         public SfsuPostProcessEventHandler()
              logger.debug("Invoking Event Handler Plugin");
         @Override
         public boolean cancel(long arg0, long arg1,
                   AbstractGenericOrchestration arg2) {
              // TODO Auto-generated method stub
              return false;
         @Override
         public void compensate(long arg0, long arg1,
                   AbstractGenericOrchestration arg2) {
              // TODO Auto-generated method stub
         @Override
         public EventResult execute(long processid, long eventid, Orchestration orchestration) {
              // TODO Auto-generated method stub
              logger.debug("Operation "+orchestration.getOperation());
              logger.debug("Parameters "+orchestration.getInterEventData());
              logger.debug("Parameters "+orchestration.getParameters());
              EventResult result=new EventResult();
              return result;
         @Override
         public BulkEventResult execute(long arg0, long arg1, BulkOrchestration arg2) {
              // TODO Auto-generated method stub
              return null;
         @Override
         public void initialize(HashMap<String, String> arg0) {
              // TODO Auto-generated method stub
    2) Create the Jar File SamplePostProcessEventHandler.jar
    3) Create the Plugin.xml file
    Sample File
    <?xml version="1.0" encoding="UTF-8"?>
    <oimplugins>
    <plugins pluginpoint="oracle.iam.platform.kernel.spi.EventHandler">
    <plugin pluginclass="test.eventhandlers.SamplePostProcessEventHandler" version="1.0" name="SamplePostProcessEventHandler">
    </plugin>
    </plugins>
    </oimplugins>
    4) Create the directory lib and copy the SamplePostProcessEventHandler.jar file into this directory
    5) Creating the Zip file with the following directory structure.
    plugin.xml
    lib/SamplePostProcessEventHandler.jar
    6) Register the plugin
    ant -f pluginregistration.xml register
    7) Creating the Custom Events xml file called EventHandlers.xml
    <?xml version='1.0' encoding='UTF-8'?>
    <eventhandlers>
    <action-handler class="test.eventhandlers.SamplePostProcessEventHandler" entity-type="User" operation="CREATE" name="SamplePostProcessEventHandler" stage="postprocess" order="LAST" sync="TRUE"/>
    <action-handler class="test.eventhandlers.SamplePostProcessEventHandler" entity-type="User" operation="MODIFY" name="SamplePostProcessEventHandler" stage="postprocess" order="LAST" sync="TRUE"/>
    </eventhandlers>
    8) Importing the Above XML into the MDS Schema Using the weblogicImportMetadata.sh file
    Directory Structure of the Event Handler Schema File
    /home/oracle/eventhandler/db/EventHandlers.xml
    weblogic.properties file parameters
    wls_servername=oim_server1
    application_name=oim
    metadata_from_loc=/home/oracle/eventhandler
    9) Finnally Running the PurgeCache.sh All
    10) Restarted the OIM Server.
    11) Testing
    I have logged into the OIM Admin Console >> Search the User > Update the First Name. The event handlers are not invoked any create or update operation. I am not able to see the log entries into the log file.
    My Log Entry Configuration.
    log File Configuration :
    /u01/app/wl-10.3.5.0/Oracle/Middleware/user_projects/domains/oim_domain/config/fmwconfig/servers/oim_server1/logging.xml
    <log_handler name='test-handler' level='FINEST' class='oracle.core.ojdl.logging.ODLHandlerFactory'>
    <property name='logreader:' value='off'/>
    <property name='path' value='/u01/app/wl-10.3.5.0/Oracle/Middleware/user_projects/domains/oim_domain/servers/oim_server1/logs/test-event.log'/>
    <property name='format' value='ODL-Text'/>
    <property name='useThreadName' value='true'/>
    <property name='locale' value='en'/>
    <property name='maxFileSize' value='5242880'/>
    <property name='maxLogSize' value='52428800'/>
    <property name='encoding' value='UTF-8'/>
    <logger name="TEST-LOGGER" level="FINEST" useParentHandlers="false">
    <handler name="test-handler"/>
    <handler name="console-handler"/>
    </logger>
    Is there anything is missing while deploying the event handlers.
    Help is Greatly appreciated.

    Change as per the following :
    1. Put the event hander in the /home/oracle/eventhandler /metadata/metadata directory and
    2. Change the following in the weblogic properties
    application_name=OIMMetadata
    metadata_from_loc to =/home/oracle/eventhandler/metadata
    This will work.

  • Ensure event handlers are unhooked - Visual webpart

    Hi ,
    I have a visual webpart which has buttons and Images.
    On click of these images and button an event handler is initiated to execute some function.
    Now how and where should i dispose these event handlers.
    I want the event handler to be hooked untill the user is viewing that webpart in that page.Once the user closes or moves to another page i want to unhook the event.
    Where should i use the logic of unhooking event.
    I have User control class which is loded in the webpart class.
    Thanks in Advance.
    Pallavi

    Hi,
    Once a Visual Web Part is inserted into a page, we will be able to use it after the page loaded, the buttons or other controls can be clicked at that time.
    When we close the page, the Visual Web Part will also be gone, the controls in it will also be inaccessible, then the functions written in the click event of these controls will
    also can be executed.
    If this is not you really mean, more details about your requirement would be welcome.
    Best regards,
    Patrick
    Patrick Liang
    TechNet Community Support

  • ALV Grid event handlers

    Hello Friends;
    I have a problem with event handlers. I have defined events for double_click, data_change and hotspot_click. At first run of the program everything runs fine but when I make a change at the screen (like pressing Enter or entering a value at a screen field) the handlers seem to be called a couple of times. For example at a hotspot click I call an accounting document display and when I want to return with back button the program seems to be stuck at document display. Actually it calls event handler over and over again. How can I solve this problem? Can refreshing grid be a solution?
    Thx in advance
    Ali

    Hello Ali
    The problem is that after handling the hotspot event the current cell is still on the field with the hotspot. Thus, when you push ENTER the ALV grid checks the current cell which has a hotspot defined which, in turn, raises event HOTSPOT_CLICK.
    Therefore, you have to move the current cell to another cell that has no hotspot defined. Have a look at the implementation of the event handler method. The hotspot is on field KUNNR. After calling transaction XD03 I shift the current cell to field BUKRS.
    If you comment these lines you will see the same behaviour of the report as you described.
    *& Report  ZUS_SDN_TWO_ALV_GRIDS
    REPORT  ZUS_SDN_ALVGRID_EVENTS.
    DATA:
      gd_okcode        TYPE ui_func,
      gt_fcat          TYPE lvc_t_fcat,
      go_docking       TYPE REF TO cl_gui_docking_container,
      go_grid1         TYPE REF TO cl_gui_alv_grid.
    DATA:
      gt_knb1          TYPE STANDARD TABLE OF knb1.
    PARAMETERS:
      p_bukrs      TYPE bukrs  DEFAULT '1000'  OBLIGATORY.
    *       CLASS lcl_eventhandler DEFINITION
    CLASS lcl_eventhandler DEFINITION.
      PUBLIC SECTION.
        CLASS-METHODS:
          handle_hotspot_click FOR EVENT hotspot_click OF cl_gui_alv_grid
            IMPORTING
              e_row_id
              e_column_id
              es_row_no
              sender.
    ENDCLASS.                    "lcl_eventhandler DEFINITION
    *       CLASS lcl_eventhandler IMPLEMENTATION
    CLASS lcl_eventhandler IMPLEMENTATION.
      METHOD handle_hotspot_click.
    *   define local data
        DATA:
          ls_knb1     TYPE knb1,
          ls_col_id   type lvc_s_col.
        READ TABLE gt_knb1 INTO ls_knb1 INDEX e_row_id-index.
        CHECK ( ls_knb1-kunnr IS NOT INITIAL ).
        SET PARAMETER ID 'KUN' FIELD ls_knb1-kunnr.
        SET PARAMETER ID 'BUK' FIELD ls_knb1-bukrs.
        CALL TRANSACTION 'XD03' AND SKIP FIRST SCREEN.
    *   Set active cell to field BUKRS otherwise the focus is still on
    *   field KUNNR which will always raise event HOTSPOT_CLICK
        ls_col_id-fieldname = 'BUKRS'.
        CALL METHOD go_grid1->set_current_cell_via_id
          EXPORTING
            IS_ROW_ID    = e_row_id
            IS_COLUMN_ID = ls_col_id.
      ENDMETHOD.                    "handle_hotspot_click
    ENDCLASS.                    "lcl_eventhandler IMPLEMENTATION
    START-OF-SELECTION.
      SELECT        * FROM  knb1 INTO TABLE gt_knb1
             WHERE  bukrs  = p_bukrs.
    * Create docking container
      CREATE OBJECT go_docking
        EXPORTING
          parent                      = cl_gui_container=>screen0
          ratio                       = 90
        EXCEPTIONS
          OTHERS                      = 6.
      IF sy-subrc <> 0.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    * Create ALV grid
      CREATE OBJECT go_grid1
        EXPORTING
          i_parent          = go_docking
        EXCEPTIONS
          OTHERS            = 5.
      IF sy-subrc <> 0.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    * Set event handler
      SET HANDLER:
        lcl_eventhandler=>handle_hotspot_click FOR go_grid1.
    * Build fieldcatalog and set hotspot for field KUNNR
      PERFORM build_fieldcatalog_knb1.
    * Display data
      CALL METHOD go_grid1->set_table_for_first_display
        CHANGING
          it_outtab       = gt_knb1
          it_fieldcatalog = gt_fcat
        EXCEPTIONS
          OTHERS          = 4.
      IF sy-subrc <> 0.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    * Link the docking container to the target dynpro
      CALL METHOD go_docking->link
        EXPORTING
          repid                       = syst-repid
          dynnr                       = '0100'
    *      CONTAINER                   =
        EXCEPTIONS
          OTHERS                      = 4.
      IF sy-subrc <> 0.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    * ok-code field = GD_OKCODE
      CALL SCREEN '0100'.
    END-OF-SELECTION.
    *&      Module  STATUS_0100  OUTPUT
    *       text
    MODULE status_0100 OUTPUT.
      SET PF-STATUS 'STATUS_0100'.
    *  SET TITLEBAR 'xxx'.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
    *       text
    MODULE user_command_0100 INPUT.
      CASE gd_okcode.
        WHEN 'BACK' OR
             'END'  OR
             'CANC'.
          SET SCREEN 0. LEAVE SCREEN.
        WHEN OTHERS.
      ENDCASE.
      CLEAR: gd_okcode.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    *&      Form  BUILD_FIELDCATALOG_KNB1
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM build_fieldcatalog_knb1 .
    * define local data
      DATA:
        ls_fcat        TYPE lvc_s_fcat.
      CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
        EXPORTING
    *     I_BUFFER_ACTIVE              =
          i_structure_name             = 'KNB1'
    *     I_CLIENT_NEVER_DISPLAY       = 'X'
    *     I_BYPASSING_BUFFER           =
    *     I_INTERNAL_TABNAME           =
        CHANGING
          ct_fieldcat                  = gt_fcat
        EXCEPTIONS
          inconsistent_interface       = 1
          program_error                = 2
          OTHERS                       = 3.
      IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      READ TABLE gt_fcat INTO ls_fcat
           WITH KEY fieldname = 'KUNNR'.
      IF ( syst-subrc = 0 ).
        ls_fcat-hotspot = abap_true.
        MODIFY gt_fcat FROM ls_fcat INDEX syst-tabix.
      ENDIF.
    ENDFORM.                    " BUILD_FIELDCATALOG_KNB1
    Regards
      Uwe

  • How to expose event handlers of the TextBox in a NumericUpDown?

    The NumericUpDown control contains a TextBox object that I have exposed by creating a class that inherits from NUD and references the TextBox as the second control in the Base class, like this:
    Public Class clsNumericUpDownExt
    Inherits NumericUpDown
    Private TheTextBox As TextBox = MyBase.Controls(1)
    Event NewLeave()
    Public ReadOnly Property TextBox As TextBox
    Get
    Return TheTextBox
    End Get
    End Property
    End Class
    In the form, I instantiate an object from this class and display it in a tab control on the form, like this:
    Public WithEvents dynNudTime As clsNumericUpDownExt = New clsNumericUpDownExt
    'In the form's Load event:
    Dim loc As System.Drawing.Point = New System.Drawing.Point(177, 19)
    Dim fnt As System.Drawing.Font = New System.Drawing.Font("Microsoft Sans Serif", 30)
    tabTimer.Controls.Add(dynNudTime)
    With dynNudTime
    .Width = 240
    .Location = loc
    .Font = fnt
    .Maximum = 86399
    .Visible = True
    End With
    Since it was declared WithEvents, I can see the event handlers of the NUD base class of the object in the form, so I can code an action for, let's say, the ValueChanged event. Is there a way to see the event handlers of the TextBox, so that I can code an
    action for, say, the TextChanged event?
    Thanks!

     Well, you could add a public event to the NUD class and raise the event when the text of the textbox is changed.  You would need to do this for each event you want to handle from the textbox.
     In this example i added a custom event that will pass the NUD control as the sender and the Text as the 2nd argument.
    Public Class Form1
    Private WithEvents nud As New clsNumericUpDownExt
    Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
    Me.Controls.Add(nud)
    End Sub
    Private Sub nud_TBoxTextChanged(ByVal sender As Object, ByVal TheText As String) Handles nud.TBoxTextChanged
    Me.Text = TheText
    End Sub
    End Class
    Public Class clsNumericUpDownExt
    Inherits NumericUpDown
    Public Event TBoxTextChanged(ByVal sender As Object, ByVal TheText As String)
    Private WithEvents TheTextBox As TextBox = CType(MyBase.Controls(1), Windows.Forms.TextBox)
    Private Sub TheTextBox_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles TheTextBox.TextChanged
    RaiseEvent TBoxTextChanged(Me, TheTextBox.Text)
    End Sub
    End Class
    If you say it can`t be done then i`ll try it

  • Tracking ID for different event handlers set

    In the following link i send the file with the image purpose:
    http://www.sendspace.com/file/cxbd8l
    Dear experts,
    We need to give Visibility for the next process, conformed by three visibility process, show more detailed in the following explanation:
    1. First Visibility process -> purchasing scenario
         Purchase Order -> Confirmation -> Goods Receipt -> Invoice Verification
    Note: In this scenario we need to modify the rule set (don´t include inbound delivery) and modify the standard functions (Create Z), of expected events and Goods receipt.
    2. Second Visibility process -> Stock transport order Scenario
    Stock transport order (PO) -> Outbound Delivery -> Shipment -> Goods receipt -> Invoice Verification (Planned delivery costs).
    Note: In this scenario we need to create a Z function to planned delivery costs and create the Z events according to the Planned delivery costs we want to control.
    3. Third Visibility process -> Second Stock transport order scenario
    Stock transport order (PO) -> Outbound Delivery -> Goods receipt -> Invoice Verification (Planned delivery costs).
    Note: In this scenario we need to create a Z function to planned delivery costs and create the Z events according to the Planned delivery costs we want to control.
    After this introduction, the question is how we can see an entire operation (the combination of the three scenarios), I mean, when we ingress to /SAPTRX/EH_LIST transaction, and execute this, the transaction show an event handler level (Same way /SAPTRX/EH_SET, event handler set level), but my grouping fields are according to Event handler (example: Bussines process type), but we don´t have a u201CProcess Unique IDu201D, that combine the different Application Object Types involved (In this process, PCM10_ITEM, TRA10_DELIV, TRA10_ROAD).
    In the following image I show an example of the point exposed (think in /SAPTRX/EH_LIST transaction):
    Appl.Obj.type             PROCESS UNIQUE ID
    PCM10_ITEM                123456
    TRA10_DELIV              123456
    TRA10_ROAD              123456
    Ok for do this; we expect to follow the next steps:
    1.     Define a field in the Tracking documents (Purchase order, Stock transport order, shipment and outbound delivery), where we ingress the same value (Process value ID) at the moment of execute the indicated transaction:
    a.     ME21N -> PO and stock transport order.
    b.     VT01N -> Shipment.
    c.     VL01N -> Outbound delivery.
    2.     Define a new Info Parameter both in the application system and in event management system.
    3.     Create Z function for expected event extractors and Info parameter Extractors (These functions have to look and save the info parameter defined previously).
    4.     Because this field doesn´t exist in any report, we think to create an enhancement in the /SAPTRX/EH_LIST transaction with the objective of don´t create a new report for only one new field (It require an ABAP program).
    According with this explanation, it´s correct our analysis? We forget any step to get our purpose?
    We appreciate a lot your help in this issue.

    Hello,
    Kevin thanks a lot by your answer, the question is how to associate three event handlers, but i don´t know about the number range, i appreciate a lot if you can explain to me more detailed, how i can define this number range and what tables has associated in order to define de Function module for "Control parameter extractor". I appreciate too if you can explain me how the system assign the same number in the three event handlers.
    According to this, I appreciate a lot if you confirm  to me, the followings steps that cover this requirement (I propose two different scenarios, the second scenario was adjusted after your explanation):
    SCENARIO 1 -> Using a custom number range.
    1. Define a custom number range.
    2. Define a new Control Parameter both in the application system and in event management system. Assign the control parameter to the list and create the event handler set.
    3. Create Z function for "expected event extractors" and "Control parameter Extractors" (These functions have to look and save the control parameter defined previously).
    4. In this case, cause its defined a common event handler set, we can execute the /SAPTRX/EH_SET transaction and look the operation consolidated.
    SCENARIO 2 -> Including information in one additional field in the ECC transactional documents
    1.     Define a field in the Tracking documents (Purchase order, Stock transport order, shipment and outbound delivery), where we ingress the same value (Control parameter) at the moment of execute the indicated transaction:
    a.     ME21N -> PO and stock transport order.
    b.     VT01N -> Shipment.
    c.     VL01N -> Outbound delivery.
    2. Define a new Control Parameter both in the application system and in event management system. Assign the control parameter to the list and create the event handler set (with relation type -> 2 control parameter).
    3. Create Z function for "expected event extractors" and "Control parameter Extractors" (These functions have to look and save the control parameter defined previously, in this case according with the extractor (PCM10_ITEM or TRA10_ROAD), the function has to find in the respective field in any case (it means in the PO its the field XXX in the shipment its the field YYY, but in event management the "control parameter" its the same).
    4. In this case, cause its defined a common event handler set, we can execute the /SAPTRX/EH_SET transaction and look the operation consolidated.
    According with this explanation, it´s correct my analysis? I forget any step to get our purpose?
    I appreciate a lot again your help in this issue.

  • Try/catching errors occuring in synchronous event handlers

    Hi,
    I know that using try/catch in flash player it is possible to catch only synchronous errors, but recently I ran into code in our application which I strongly believe is synchronous but it behaves as if it wasn't.
    In example below I create event listener and inside try/catch I dispatch event. Handler function throws error. Executing code stops when error is thrown, so message "after throwing error" won't be logged, but try/catch block catches nothing and code executes as if nothing happened after event dispatch.
    Dispatching event on element executes handler method immediately so it is synchronous execution. Event call stack which is displayed in debug versions of flash player, shows every function from creation of class to execution of handler.
    Generally flash applications relays heavily on events and in my case it caused ours users projects to be irreversibly corrupted, because of this continuing to work after error, which I even can't properly detect and handle, cause it's going throught 5 or more event handlers and adding try/catch to each handler would create enormous chaos in my code. So my question is why does flash player behaves like this? Are there any ways to tell compiled SWF file to treat such cases as synchronous calls, f.e. compilation parameters?
    package
        import flash.display.Sprite;
        import flash.events.Event;
        import flash.events.EventDispatcher;
        import flash.text.TextField;
        public class TestApp extends Sprite
            public var cTextField:TextField;
            public function TestApp()
                cTextField = new TextField();
                cTextField.width = 300;
                cTextField.height = 200;
                addChild(cTextField);
                onAppCreated();
            protected function onAppCreated():void
                var eventName:String = "my_event";
                var caughtError:Boolean = false;
                var dispatcher:EventDispatcher = new EventDispatcher();
                dispatcher.addEventListener(eventName, handler);
                try
                    dispatcher.dispatchEvent(new Event(eventName));
                } catch (error:Error)
                    caughtError = true;
                cTextField.text += caughtError ? "caught error\n" : "error wasn't caught\n";
            protected function handler(event:Event):void
                cTextField.text += "before throwing error\n";
                throw new Error("throw error");
                cTextField.text += "after throwing error\n";

    Okay, nobody bit.  Sorry. 
    The only way to really figure out what is going on is to look at a running example with a C++ debugger.  I'm particularly curious about whether this problem happens in a specific browser/os combination (we may be working around a quirk of that platform), or if it's something that happens everywhere.
    The most effective way to proceed is going to be to file a bug with a simplified, executable example (source and compiled SWF, ideally) that demonstrates the problem.  This will help me route the bug to a developer and get you an answer in the shortest time possible. 
    You can file a bug here:
    http://bugbase.adobe.com/
    If you reply here with the bug number, I'll get it assigned to an engineer.
    Thanks!

  • Event Handlers Invoked Everytime for update on User Profile.(OIM 11g)

    Hi,
    We had Custom event handlers for generating some fields on user form.
    Everytime there is update on user profile on any field, All the event handlers fired, (As seen from logs).
    I want to fire particular event handlers on particular update. Like if first name is updated then only display name event handler should fire. (not all)
    How can i achieve this???

    Here is my code..it is working fine for creation of the user. but when i am updating the user i am getting all null values except the updated one.
    Example if there are 5 fields in that i am updating 2 .apart from those 2 fields the other 3 are coming as null which is making validation to fail.
    package flatfilevalidation;
    import java.io.Serializable;
    import java.util.Date;
    import java.util.HashMap;
    import oracle.iam.platform.context.ContextAware;
    import oracle.iam.platform.kernel.ValidationException;
    import oracle.iam.platform.kernel.ValidationFailedException;
    import oracle.iam.platform.kernel.spi.ValidationHandler;
    import oracle.iam.platform.kernel.vo.BulkOrchestration;
    import oracle.iam.platform.kernel.vo.Orchestration;
    import oracle.iam.identity.usermgmt.api.UserManagerConstants.AttributeName;
    import Thor.API.*;
    import Thor.API.Exceptions.tcAPIException;
    import Thor.API.Operations.*;
    import java.util.Iterator;
    import java.util.List;
    import java.util.Set;
    import oracle.iam.identity.usermgmt.api.UserManagerConstants;
    import oracle.iam.identity.usermgmt.vo.User;
    import oracle.iam.passwordmgmt.utils.MLSUtils;
    import oracle.iam.platform.Platform;
    import oracle.iam.platform.kernel.vo.OrchestrationTarget;
    import oracle.iam.upgrade.changes.jaxb.Entity;
    public class FFValidation implements ValidationHandler {
    int count;
    tcUserOperationsIntf userOperationsService;
    Entity ent = null;
    @Override
    public void validate(long arg0, long arg1, Orchestration orchestration)
    throws ValidationException, ValidationFailedException {
    System.out.println("entered the Validation methode");
    HashMap<String, Serializable> parameters = orchestration.getParameters();
    System.out.println("****************************************************************");
    User user = getUser(orchestration);
    Object passwdOrchParam = parameters.get(UserManagerConstants.AttributeName.EMPLOYEE_NUMBER.getId());
    System.out.println("***************************"+passwdOrchParam+"*************************************");
    System.out.println("orch.getParameters() ============================ " + parameters);
    String ceo="CEO";
    String trainee="Trainee";
    String Emp="EMP";
    String Contractor="Contractor";
    //int Skypecount,Empcount,phonecount;
    String Role= getParameterValue(parameters, "Role");
    String Designation = getParameterValue(parameters, "Designation");
    Long Manager =getManagerid(parameters, "USR_MANAGER_KEY");
    Date EndDate =getDate(parameters, "End Date");
    String EmpNo=getParameterValue(parameters, "Employee Number");
    String skypeid=getParameterValue(parameters, "SkypeId");
    String Mobile=getParameterValue(parameters, "Mobile");
    String skypeidDb="usr_udf_skypeid";
    String MobileDb="usr_mobile";
    String EmpDB="usr_emp_no";
    //validating SkypeID
    uniquevalidate(skypeid,skypeidDb);
    //Validating Employee Number
    uniquevalidate(EmpNo,EmpDB);
    //Validating Employee Number
    uniquevalidate(Mobile,MobileDb);
    //CEO Validation
    if(Designation.equals(ceo)){
    if(Manager!=null){
    String msg="ManagerID not required";
    System.out.println("ManagerID not required ");
    throw new ValidationFailedException(msg);
    //Cotractor Validation
    if(Role.equals(Contractor) && Designation.equals(ceo)) {
    System.out.println(Designation.equals(ceo));
    String msg="Contractor Cannot be CEO";
    System.out.println("Contractor Cannot be CEO");
    throw new ValidationFailedException(msg);
    if(Role.equals(Contractor)&& EndDate==null) {
    String msg="Contractor Endate is not provided";
    System.out.println("Contractor Endate is not provided");
    throw new ValidationFailedException(msg);
    //Trainee Validation
    if(Role.equals(trainee) && Designation.equals(ceo)) {
    System.out.println(Designation.equals(ceo));
    if(Designation.equals(ceo)) {
    String msg="Trainee Cannot be CEO";
    System.out.println("Trainee Cannot be CEO");
    throw new ValidationFailedException(msg);
    //manager validation
    if(!Designation.equals(ceo)){
    if(Manager==null){
    String msg="ManagerID Can not be Null";
    System.out.println("ManagerID Can not be Null");
    throw new ValidationFailedException(msg);
    //Employee Validation
    if(Role.equals(Emp)){
    if(EndDate!=null) {
    String msg="Employee End Date Should be empty";
    System.out.println("Employee End Date Should be empty");
    throw new ValidationFailedException(msg);
    @Override
    public void validate(long arg0, long arg1, BulkOrchestration arg2)
    throws ValidationException, ValidationFailedException {
    System.out.println("**************Inside BulkOrchestration****************");
    HashMap<String, Serializable> parameters = arg2.getParameters();
    System.out.println("orch.getParameters() ============================ " + parameters);
    @Override
    public void initialize(HashMap<String, String> arg0) {
    private String getParameterValue(HashMap<String, Serializable> parameters,
    String key) {
    String value = (parameters.get(key) instanceof ContextAware) ? (String) ((ContextAware) parameters
    .get(key)).getObjectValue()
    : (String) parameters.get(key);
    System.out.println("VALUE::" + value);
    return value;
    private boolean isNullOrEmpty(String str) {
    return str == null || str.isEmpty();
    private Long getManagerid(HashMap<String, Serializable> parameters,
    String key) {
    System.out.println(parameters);
    Long managerLogin = (parameters.get(AttributeName.MANAGER_KEY.getId()) instanceof ContextAware)
    ? (Long) ((ContextAware) parameters.get(AttributeName.MANAGER_KEY.getId())).getObjectValue()
    : (Long) parameters.get(AttributeName.MANAGER_KEY.getId());
    System.out.println("managerLogin "+managerLogin);
    return managerLogin;
    private Date getDate(HashMap<String, Serializable> parameters,
    String key) {
    System.out.println("date "+ parameters);
    Date date = (parameters.get(AttributeName.ACCOUNT_END_DATE.getId()) instanceof ContextAware)
    ? (Date) ((ContextAware) parameters.get(AttributeName.ACCOUNT_END_DATE.getId())).getObjectValue()
    : (Date) parameters.get(AttributeName.ACCOUNT_END_DATE.getId());
    System.out.println("EndDate "+date);
    return date;
    void uniquevalidate(String idvalue,String idDbvalue){
    userOperationsService = Platform.getService(tcUserOperationsIntf.class);
    HashMap<String, String> UMAttr = new HashMap<String, String>();
    String msg="Entered Value is not unique" + idvalue;
    System.out.println("idvalue="+ idvalue);
    System.out.println("idDbvalue="+ idDbvalue);
    if(idvalue!=null){
    try {
    System.out.println("in try block");
    UMAttr.put(idDbvalue, idvalue);
    tcResultSet USAttr = userOperationsService.findUsers(UMAttr);
    System.out.println(USAttr);
    System.out.println("User set count ========================= " + USAttr.getRowCount());
    count=USAttr.getRowCount();
    if(count>0)
    throw new ValidationFailedException(msg);
    catch (tcAPIException e) {
    e.printStackTrace();
    private User getUser(Orchestration orchestration)
    if(orchestration.getTarget() != null && orchestration.getTarget().getEntityId() != null)
    return new User(orchestration.getTarget().getEntityId());
    HashMap orchParams = orchestration.getParameters();
    User user = new User(null);
    Set orchParamNames = orchParams.keySet();
    String orchParamName;
    for(Iterator i$ = orchParamNames.iterator(); i$.hasNext(); user.setAttribute(orchParamName, orchParams.get(orchParamName)))
    orchParamName = (String)i$.next();
    MLSUtils.setStringValuesForMLSAttributes(user);
    System.out.println("+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"+user);
    return user;
    }

  • UiXML event handlers - how to define once across pages

    I have a number of event handlers which will be used by several of my pages. Is there a way of including the definitions in each of those pages having only defined them once?
    Cheers
    Ian

    The simplest approach is to override AbstractPageBroker.getEventHandler() - but
    that requires that the page broker have global knowledge of all your pages.
    So, what follows is a way to add a single element to any of your pages that will
    add event handlers (in this case, a single handler).
    It's a little less trivial than I'd assumed, but I've included here actual functional
    source code to implement the whole thing. This is a very, very silly example;
    it lets you add a single element to a page:
    <page xmlns="http://xmlns.oracle.com/uix/controller">
      <scream xmlns="http://www.example.org/scream"/>
    ...With this element, the "scream" event will be handled by, well, screaming.
    Silly, yes; but it demonstrates the technique. Exactly the same technique
    would also let you execute code immediately before and/or immediately after
    a page renders (e.g., automatically register data providers). Here's the code;
    it's four classes, but they're all small.
    ScreamUIExtension[b]
    package scream;
    import oracle.cabo.ui.UIExtension;
    import oracle.cabo.ui.laf.LookAndFeel;
    import oracle.cabo.share.xml.ParserManager;
    public class ScreamUIExtension implements UIExtension
      public void registerSelf(ParserManager manager)
        manager.registerExtension("http://www.example.org/scream",
                                  new ScreamParserExtension());
      public void registerSelf(LookAndFeel laf)
    }[b]ScreamParserExtension
    package scream;
    import java.util.Dictionary;
    import org.xml.sax.Attributes;
    import oracle.cabo.share.xml.BaseParserExtension;
    import oracle.cabo.share.xml.LeafNodeParser;
    import oracle.cabo.share.xml.NodeParser;
    import oracle.cabo.share.xml.ParseContext;
    import oracle.cabo.servlet.ui.UINodePageDescription;
    public class ScreamParserExtension extends BaseParserExtension
      public NodeParser startExtensionElement(
        ParseContext context,
        String       namespaceURI,
        String       localName,
        Attributes   attrs)
        if ("scream".equals(localName))
          return new LeafNodeParser()
            protected Object getNodeValue(
              ParseContext context,
              String       namespaceURI,
              String       localName,
              Attributes   attrs)
              return "This doesn't matter in this example...";
        return null;
      public Object elementEnded(
        ParseContext context,
        String       namespaceURI,
        String       localName,
        Object       parsed,
        Dictionary   attributes)
        Object value = attributes.get("scream");
        if (value == null)
          return parsed;
        if (!(parsed instanceof UINodePageDescription))
          logWarning(context,
                     "The \"scream\" elements may only be used inside of <page>");
          return parsed;
        return new ScreamPageDescription((UINodePageDescription) parsed);
    ScreamPageDescription
    package scream;
    import oracle.cabo.servlet.ui.UINodePageDescription;
    import oracle.cabo.servlet.ui.UINodePageDescriptionProxy;
    import oracle.cabo.servlet.BajaContext;
    import oracle.cabo.servlet.event.EventHandler;
    import oracle.cabo.servlet.event.TableEventHandler;
    public class ScreamPageDescription extends UINodePageDescriptionProxy
      public ScreamPageDescription(UINodePageDescription uinpd)
        _uinpd = uinpd;
      public EventHandler getEventHandler(BajaContext context)
        TableEventHandler teh = new TableEventHandler();
        teh.registerEventHandler("scream", new ScreamEventHandler());
        teh.setDefaultEventHandler(getPageDescription().getEventHandler(context));
        return teh;
      protected UINodePageDescription getPageDescription()
        return _uinpd;
      private final UINodePageDescription _uinpd;
    ScreamEventHandler
    package scream;
    import oracle.cabo.servlet.BajaContext;
    import oracle.cabo.servlet.Page;
    import oracle.cabo.servlet.event.EventHandler;
    import oracle.cabo.servlet.event.EventResult;
    import oracle.cabo.servlet.event.PageEvent;
    public class ScreamEventHandler implements EventHandler
      public EventResult handleEvent(
        BajaContext   context,
        Page          page,
        PageEvent     event)
        System.out.println("SCREAM!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
        return null;
    }Now, to register these, you'll want a WEB-INF/uix-config.xml like so:
    <configurations xmlns="http://xmlns.oracle.com/uix/config">
      <application-configuration>
        <ui-extensions>
          <extension-class>scream.ScreamUIExtension</extension-class>
        </ui-extensions>
      </application-configuration>
    </configurations>If you did want to add pre- or post-rendering code, just override
    different methods inside your PageDescription class.
    Final note: all of this should work unmodified in 9.0.2 except for
    the uix-config.xml; you'd have to use the older, deprecated WEB-INF/web.xml
    UIX configuration parameters in 9.0.2.

  • Can you share FP Controls between different Event Structures

    I'm creating a program that will either read real-time data from an VNA on the GPIB bus, or read a saved s2p (Agilent) file and analyze it. The FP consists of 5 graphs, and various controls which handle events like printing, changing filters, or exiting. on the BD I have a case structure controlled by an operator selection pop-up. I tried using the same FP controls in the event structures I have setup in each case, as only one event structure would ever be executing at any given time, but the program doesn't seem to like it ast run-time. I've worked around the issue by creating "duplicate" controls and using the property setting to make them visible/disabled, etc., but the is seriously congesting my BD.
    Anyone know a way to share controls with seperate event structures?

    It sounds like the root problem is the overall structure of your program. I highly recommend that you check out the Queued Message Handler project template in LabVIEW 2012, that will show you how to utilize a single event structure and pass events to a consumer loop. If you program is too large to consider an architecture change at this stage of the game, then there is a workaround for your problem.
    What is most likely happening is that you have the event structures all set to lock the front panel until the event completes. However the case structure that you have wrapped around these event structures is causing all but one of these event structures to be unreachable thus preventing you from handling the event. Again, as I stated above, the "RIGHT WAY" to fix this is to select a better program structure but the "kluge work-around" fix is this: Dynamically register for the value change event on all of the controls you are trying to trap events for. Dynamic events can be deregistered and re-registered at run time. This will allow only the event structure in the active owning case structure to be registered for the events, thus no other event structures will get in your way.
    Disclaimer: This advice is given based on very minimal information and a great deal of speculation and may not be correct. Please include your code if you need further assistance.
    Charles Chickering
    Architecture is art with rules.
    ...and the rules are more like guidelines

Maybe you are looking for