OIM11g event handlers - entity type as Role

Hi ,
I have a quick question. In OIM11g, can we have event handlers attached at role level.
When a role is created/deleted in OIM, I need to perform some operations.
Can someone suggest if its possible?? If yes, what is the entity-type I have to use. I havent seen enough documentation for the same.
Regards
Vicky

check this :
Re: OIM 11g Role Membership Event Handlers.

Similar Messages

  • OIM11g - Event handlers - picking up external libraries

    Hi all,
    I seem to be running into an issue with event handlers. I have to refer to some other custom libraries within them and they don't seem to be accessible by the event handlers.
    I've put the libraries in JavaTasks and ThirdParty but I'm still getting NoClassDef found and in the worst case the Orcherstration engine seems to break preventing me from even logging into OIM and meaning I have to remove the event handler metadata manually.
    Does anyone know how the event handler classpath works and where I can put libs such that event handlers can use them?
    Thanks.
    Wayne.

    From the WebLogic Administrator screen, you can go to the servers for your OIM Server, or SOA Server, whichever will be accessing the jar. Under the server start tab, add in the path in the classpath section for your jar file. User forward slashes. Now when your server starts, it will load those jar files and they should be accessible.
    -Kevin

  • OIM entity adapters vs event handlers

    Hi everyone
    What is the difference between running code in a pre-insert entity adapters and pre-insert event handler?
    I have an adapter that generates and emails random user password but it has some undesirable actions such as running multiple times even though trusted reconciliation has failed. Are event handlers more suitable for this task?
    Thanks in advance

    event handler:A resource object's provisioning process contains tasks that must be completed automatically. When this occurs, you must assign an event handler or an adapter to the resource object. An event handler is a software routine that provides the processing of this specialized information
    adapter :An adapter is a specialized type of event handler that generates Java code, which enables Oracle Identity Manager to communicate and interact with external resources.
    Edited by: sk on Sep 9, 2010 2:53 AM

  • How to remove event handlers for a content type currently in use?

    Hi,
    We had a SP 2007 solution that managed event handlers as described in
    Brian Wilson's blog regarding event handlers. We then did a in-place upgrade to SP 2010. It so happend that we wanted to remove some of our old event handlers and this is where our problem started. We managed to delete event handlers
    (SPEventReceiverDefinitions) for
    Site and List by using the ui from Brian Wilsons feature "Manage Event Handlers" (ref the link above), but not anyone at all for
    Content Types... It simply wouldn't be deleted
    (remove was grayed out in the ui). 
    We then tried to do it by code. Below is a code snippet illustrating how we tried to delete the event handlers for content types:
    using (SPWeb web = properties.Feature.Parent as SPWeb)
    string targetClassName = "targetClassName.";
    web.AllowUnsafeUpdates = true;
    // Removing Content Type event handlers
    foreach (SPContentType ct in web.ContentTypes)
    for (int i = ct.EventReceivers.Count - 1; i >= 0; i--)
    if (ct.EventReceivers[i].Class.StartsWith(targetClassName))
    ct.EventReceivers[i].Delete();
    ct.Update(true);
    web.Update();
    The Content Types are not sealed and are
    not readonly. When debugging, we can see that the
    Delete() method are called on one of the Content Types we wanted to delete event handlers for. We noted that the
    ct.EventReceivers.Count remains the same, before and after Delete() is called. We did not get any exceptions when running this code.
    When running the code a second time and debugging again, we see that the very same Content Type still has the very same event handler attached... As in, it wasn't deleted....
    We also tried to delete the event handlers through PowerShell as described
    here in the post by Per Jakobsen. However, the script did not really seem to find any EventReceivers... We tried to write the
    $site.AllWebs | % {$_.Lists} | % {$_.ContentTypes} | % {$_.EventReceivers} list to file, but it was empty.. We did however get a long list when writing $site.AllWebs | % {$_.Lists} | % {$_.ContentTypes} to file. We could then in
    that file see the event handler references we want to remove registered to our Content Types, as we did during code debugging earlier on. So PowerShell might still be the way to go here...
    So, does anyone know if there is a way to force this delete through, either by code, PowerShell or some other means? Any help regarding this matter would be very much appreciated :)

    Hi,
    For your information, there's two versions (at least) exists for each content types. One is Site Content Type - exists in Root web and another is list content type. Once you add a content type to a list, a copy of the site content type is taken and stored
    in the list. If you update the site content type, it may or may not affect the list conten type. So make sure you are updating the both - site content and list content type. Once you update site content type with passing paramater true to 'ct.Update(true)',
    the list content types are supposed to updated too.
    Thanks,
    Sohel Rana
    http://ranaictiu-technicalblog.blogspot.com

  • 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.

  • 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;
    }

  • Some Doubts about Event Handlers

    Hi,
    I had some doubts on Event handlers in OIM 11.1.1.5 ........
    1) I want to use the same event handler for both Post Insert and Post update task.... Can I use the same event handler for that... If yes then how can I do that....
    2) Can I create the single Plugin.xml class and add the all jar files in single say lib folder and zip them all together.. if yes then What changes I need to do?? Need to add only the plugin tags for different class files in plugin.xml file? OR need to do some thing extra also...?
    3) If i need to change any thing in any class of event handler.. Is there need to unregister the plugin and again register...??
    If yes.... Is there need to delete the event handler using the weblogicDeleteMetadata command???
    4) As we Import the event handler from path like event handler/db/... If we add all the evetn handler.xml files in that folder..... As During Import weblogicImportMetadata recursively call all the files in that folder.... Now if i need to change anything in any one of event handler class... then if we import from the same folder event handler/db/... What will it do............Create the duplicate copy of all the eventhandlers????? OR i need to add only those Eventhandler.xml files for those class files i made the changes.....
    5) As I need to create email on user creation during recon and also email id get updated as first name or last name updates..... What I had to use in Event handler.xml (entity-type="User" operation="CREATE") or Some thing else....
    Help me clarify my doubts...

    Anil Bansal wrote:
    Hi,
    I had some doubts on Event handlers in OIM 11.1.1.5 ........
    1) I want to use the same event handler for both Post Insert and Post update task.... Can I use the same event handler for that... If yes then how can I do that....Yes, you can have the same. Just have two event handlers in the same MDS file and the operation should be CREATE for one while MODIFY for another. The class and version and name remains the same.
    2) Can I create the single Plugin.xml class and add the all jar files in single say lib folder and zip them all together.. if yes then What changes I need to do?? Need to add only the plugin tags for different class files in plugin.xml file? OR need to do some thing extra also...?Yes, in the single plugin xml you can define multiple eventhandlers and the jar will contain multiple event handlers class.
    3) If i need to change any thing in any class of event handler.. Is there need to unregister the plugin and again register...??
    If yes.... Is there need to delete the event handler using the weblogicDeleteMetadata command???No, if you are just changing the class, then you need to update the class only in the plugin. For this, first delete plugin and then update plugin and then purgecache.
    4) As we Import the event handler from path like event handler/db/... If we add all the evetn handler.xml files in that folder..... As During Import weblogicImportMetadata recursively call all the files in that folder.... Now if i need to change anything in any one of event handler class... then if we import from the same folder event handler/db/... What will it do............Create the duplicate copy of all the eventhandlers????? OR i need to add only those Eventhandler.xml files for those class files i made the changes.....If won't create duplicate copies but would overwrite the ones which are there in MDS at the same location. So effectively, if the xml is not changing you should not be worried about overwritting.
    5) As I need to create email on user creation during recon and also email id get updated as first name or last name updates..... What I had to use in Event handler.xml (entity-type="User" operation="CREATE") or Some thing else....For recon and event handler, you will need to have post process event handler on User CREATE and UPDATE. On Create construct the email address and populate it in the email field. For update check if the firstname/lastname are changing and if yes, then update the email id on the profile.
    >
    Help me clarify my doubts...

  • OIM 11Unknown entity type Account with ID while using linkEventToUser() API

    I would like to link an recon event (which is in status "No User Match Found" ) to an user.The recon event is generated through target recon using reconciliation API
    I am using the API linkEventToUser() but getting the following error.
    <Error> <oracle.iam.reconciliation.impl> <IAM-5010000> <Generic Error/Information: {0}
    oracle.iam.reconciliation.exception.InvalidEventException: Unknown entity type Account with ID 2180,060
    From OIM web console if i check the Link button / option iin event management for this event is greyed out.
    There are already threads on this in the forum but they are old and no replies so i thought to post a fresh thread.
    I am also getting the same error while generating a new recon event.
    The strangest part is that this was working a few weeks back.
    Any help or idea how to proceed is highly appreciated.
    Thanks and Regards,
    Kungo.
    Edited by: Kungo on Oct 25, 2012 3:06 AM

    Any one saw this thread :)
    Is there a way to get attention on this thread from all the Gurus on this forum ?
    Please do let me know.
    Thanks and Regards,
    Kungo

  • OIM11 event handlers: How to avoid firing the same code in both pre+post

    Hi everyone,
    I have a question around event handlers. My experiments so far have gleaned the following:
    Manual updates of user form in admin interface -> Fires: pre-insert + Post-insert
    Reconciliation trusted creates -> Fires: Post-insert
    Reconciliation trusted updates -> Fires: pre-insert + Post-insert
    Now I have various handlers that trigger to update fields coming in from trusted recon. Formatting telephone numbers, setting custom user attributes.. etc. I am using the same code in both the post and pre handlers as wherever the update comes from it needs to be processed in the same way. Problem is if a handler fires twice I can't be sure exactly how the system is going to behave (updating the same field again etc), never mind it is unneeded processing.
    We have to keep the pre handlers because otherwise changes completed via the admin interface won't be seen until you refresh.
    Can anyone please advice how to go about ensuring a handler is only fired once? i.e. if pre fires don't fire post. Have I missed something key here?
    Edit: I know I've worded this badly. They will always fire as that's how OIM behaves, what I want is some way to work out in the underlying code if a field has already been modified in pre process... or something like it.
    Thanks,
    Wayne.
    Edited by: wblacklock on 27-Feb-2012 05:38

    I am sorry but I am not agree with your design.
    However there is no chance to avoid this according to my knowledge. As both class has separate thread under different process, so there is no way to implement thread lock on entity operation.
    Alternate way  to acheive your requirement:
    You can have hidden UDFs. Update hidden UDFs in prepost handler with some data (hardcoded).
    "You can have the value this hidden filed like :- "NAME_UPDATE|EMAIL_UPDATED|MANGER_UPDATE"
    Now in Post - Process handler check the value of hidden UDF.
    Get the value of hidden UDF, tokenize with String Tokenizer. Check which filed is not updated in Pre handler.
    *If it is already updated - do not update.* else Update.
    Thanks,
    Kuldeep

  • Event handlers execute code from a seperate class

    i am having difficulties linking my event handlers to another piece of code in a seperate class. basically i want my event handler to execute a code which is in another class. how do i do this?

    while adding listener to the component for which u want to handle event add listener with the name of class where u r going to write the event handling code and declare that class as implementing the type of listener and handle the event in that class by implementing the definitions for the methods in the interface

  • Portal Forms (9ias) JavaScript Event Handlers

    For each form field it is possible to write event handlers in Javascript e.g OnFocus
    //On BLUR effectively prevents the field from ever gaining
    //focus.
    this.blur();
    There are no PL/SQL event handlers at field level. Is there any way that we can call PL/SQL code from the Javascript event?
    Thanks in Advance.

    In case of do_event(), you can do a view source of the form's runtime page and lookup the code. It's a simple javascript that set values to some hidden variables.
    When you do a view source , you will find some javascripts like :-
    <SCRIPT TYPE="text/javascript" SRC="<some-url>">
    Copy the url and paste it on a new browser window and try to access it. In case of IE, it will prompt you for a file download. Download the file as a text file and you will get to see the code.

  • 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

  • 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.

  • Do I need to worry about these event handlers in a grid from a memory leak perspective?

    I'm pretty new to Flex and coudn't figure out how to add event handlers to inline item renderer components from the containing file script so I attached the listnerers simply as part of the components themselves (eg <mx:Checkbox ... chnage="outerDocument.doSomething(event)"../>):
    <mx:DataGrid id="targetsGrid" width="100%" height="100%" doubleClickEnabled="true" styleName="itemCell"
          headerStyleName="headerRow" dataProvider="{targets}"
          rowHeight="19" fontSize="11" paddingBottom="0" paddingTop="1">
         <mx:columns>
         <mx:DataGridColumn width="78" dataField="@isSelected" headerText="">
         <mx:itemRenderer>
              <mx:Component>
                   <mx:HBox width="100%" height="100%" horizontalAlign="center">
                        <mx:CheckBox id="targetCheckBox" selected="{data.@isSelected == 'true'}"
                             change="outerDocument.checkChangeHandler(event);"/>
                        <mx:Image horizontalAlign="center" toolTip="Delete" source="@Embed('/assets/icons/delete.png')" useHandCursor="true" buttonMode="true"
                             click="outerDocument.deleteHandler(event);"/>
                        <mx:Image id="editButton" horizontalAlign="center" toolTip="Edit" source="@Embed('/assets/icons/edit-icon.png')" useHandCursor="true" buttonMode="true"
                             click="outerDocument.editHandler(event);"/>
                   </mx:HBox>
              </mx:Component>
         </mx:itemRenderer>
         </mx:DataGridColumn>
              <mx:DataGridColumn id="Name" dataField="@collectionDesc" headerText="Name" itemRenderer="com.foobar.integrated.media.ui.component.CellStyleForTargetName"/>
              <mx:DataGridColumn id="Created" width="140" dataField="@createDateTime" headerText="Created"  labelFunction="UiHelper.gridDateFormat" />
         </mx:columns>
    </mx:DataGrid>
    This grid is part of a view that will get destroyed and recreated potentially many times during a user's session within the application (there's a large dynamic nature to the app and views are created at run-time.) By destroyed I mean that the view that holds the above datagrid will no longer be referenced under certain circumstances and an entire new view object is created (meaning the old datagrid is no longer refernced and a new one is created.)
    I heard you should clean up event handlers when they are no longer used, and I know at what point the view is destroyed, but I don't know how to clean up the event handlers added to the item renderer components? Is it something that the Flex garbage collector will handle efficiently?
    Also, on a somewhat related note, how could I push the item renderer to an external component since in my event handlers for the item renderer buttons I need a reference to the datagrid.selectedIndex which, as an external item renderer I wouldn't have access to this containing grid?

    No. You don't need explicit cleanup in this case: if your outerDocument is going away, you have nothing to worry about. The event handler leak can happen in sort of the reverse situation: suppose you have a long-lived MyView that contains a custom DataGrid like the one below. Now suppose that MyView frequently destroys and re-creates the grid. And suppose that on its creationComplete event, the grid registers a listener for outerDocument's (MyView's) enterFrame Event. Unless you explicitly remove this listener, MyView will still have a reference to it even after the grid that registered the listener is destroyed (and garbage collected).
    This is a pretty contrived example, but it sort of illustrates the potential for leaks: a certain component is elligible for garbage collection, but some longer-lived component holds a reference to it (or part of it, such as a listener function). If the longer-lived component is elligible for GC as well, you don't really need to worry about proper cleanup. That's what you're paying the GC processor cycles for.

  • Unable to Create Event handlers , Plugs

    Hello everyone,
    We've just moved to a new development environment and had our existing WebUI enhancements transported from an old one (which was CRM 7.0 EHP1). The new system was also already in EHP1.
    The problem is we couldn't create any new Event Handlers and Inbound and Outbound plugs in an enhanced component via BSP_WD_CMPWB. Even though the component has already been enhanced, the system keeps on asking for an Access Key to edit SAP Standard objects and behaving as though the component hasn't been enhanced at all.
    Has anyone encountered this before? Any SAP OSS Note to fix the problem?

    Hello,
    Thanks for your replies, the issue has been solved. When the enhancements were transported into the new system the database entries used by the enhancement wizards weren't included into the transport. Basically we had to update the ff tables:
    BSP_WD_GEN -> Table with generated classes
    BSP_WD_EXT_HIST -> Mapping Table source controller class to  Z controller class, and source context class to Z context class

Maybe you are looking for

  • How do I add XML content to existing FrameMaker Document

    Hello, I have an XML document that contains features of one item and I want to add data from it to FM document that shows those features. These features have been added to FM previously by copy-paste technology which isn't obviosly the fastest way an

  • A Bunch of Jive?

    Hey Everyone, I'm sort of considering upgrading my G5 with one of these: http://www.sonnettech.com/product/g5_jive.html The idea of loading it up with a bunch of big, extra drives is very appealing. But I'm wondering if anyone has real experience wit

  • Group Email-Undelivered Mail

    I have various groups setup up on our server with users added. When I send an email to the group the members of that group are receiving my message, so I believe I have the correct settings for group emails. The problem I'm having is that after a few

  • Pics from Iphone4  to my laptop

    I cant get my pictures from my iphone to my laptop. Can someone help me with this? (What i do after my iphone is connected with the laptop, is going to 'my computer' dan i click on the iphone, but none of my pictures from my iphone is available there

  • How can I make a small swf file out of InDesign

    I have a 200 page book (PDF). I am trying to make a flip book to preview in web browser. How can I make a small swf file out of InDesign with the PDF I have?