SRM event handler creation

Hi experts,
we are trying to configure a questionnaire on the SRM.
We would like to know if it is possible to put control on fields (example: field has to be numeric and of 5 digits. If the vendor writes only 4 digit the quastionnaire should not be sent). Is it possible to create a control by using event handler? How and where do I have to write the function?
Thanks in advance,
Regards,
Riccardo

Hi Chandra,
when I have to deal with dependent values I normally do the following:
Raise a Server Side Event in GET_P method as you did
In the GET_V method I build up the value help and store it in a global variable on the context node. In the GET_V you have got access to the current entity with collection_wrapper->get_current() --> meaning you can always have the correct value of all the fields and read dependent on them.
In the implementation class create an event handler that clears the global variable for the dependent value help whenever a new value is selected in the leading field.
I suppose you have got a similar setup.
One possibility to circumvent your problem is to skip the step with the global variable. Just shoot the server side event. This leads to a server roundtrip and the valuehelp for the dependent field is calculated again, based on the updated value of the leading field.
However, this method is not very good for performance! Thus I would normally keep away from it.
Concerning your problem with the wizard. It is correct that you have to have the view created with the wizard to be able to use it later on. On copied views the wizard does some redefinitions of common methods and it does complain if they are not exactly as it expects them.
For event handlers I believe this should only be the DO_HANDLE_EVENT in the parent class of your IMPL. Meaning if you inherit from a SAP view inheritance is as follows:   SAP class --> SAP class _IMPL --> Your class --> Your class _IMPL
The DO_HANDLE_EVENT would have to be in the Your class.
An easy way would be recreating the view using the wizard (be sure to restart the component workbench after this).
Another is create the event handler manually. Copy an existing EH_ONXXX method, and add a CASE statement into the DO_HANDLE_EVENT that calls this copied method.
cheers Carsten

Similar Messages

  • Event handler Creation in CRM Webclient UI

    Hi,
    In CRM Webclient UI, we are using service application.
    We have enhanced some fileds through eewb.
    Few of them are dependent dropdowns. on change of one dropdown other dropdown values needs to be loaded.
    To load the values dynamically, In the get_P_XYZ method of the field XYZ , i have raised an event DDLB_ONSELECT.
    I am new to bsp applications. I want to generate event handler for this. I tried to create the event handler using the wizard. But i am getting the error - View not copied with wizard; processing not possible.
    Please guide me how to create an event handler for the corresponding event or solve the error.
    -Chandra Sekhar.

    Hi Chandra,
    when I have to deal with dependent values I normally do the following:
    Raise a Server Side Event in GET_P method as you did
    In the GET_V method I build up the value help and store it in a global variable on the context node. In the GET_V you have got access to the current entity with collection_wrapper->get_current() --> meaning you can always have the correct value of all the fields and read dependent on them.
    In the implementation class create an event handler that clears the global variable for the dependent value help whenever a new value is selected in the leading field.
    I suppose you have got a similar setup.
    One possibility to circumvent your problem is to skip the step with the global variable. Just shoot the server side event. This leads to a server roundtrip and the valuehelp for the dependent field is calculated again, based on the updated value of the leading field.
    However, this method is not very good for performance! Thus I would normally keep away from it.
    Concerning your problem with the wizard. It is correct that you have to have the view created with the wizard to be able to use it later on. On copied views the wizard does some redefinitions of common methods and it does complain if they are not exactly as it expects them.
    For event handlers I believe this should only be the DO_HANDLE_EVENT in the parent class of your IMPL. Meaning if you inherit from a SAP view inheritance is as follows:   SAP class --> SAP class _IMPL --> Your class --> Your class _IMPL
    The DO_HANDLE_EVENT would have to be in the Your class.
    An easy way would be recreating the view using the wizard (be sure to restart the component workbench after this).
    Another is create the event handler manually. Copy an existing EH_ONXXX method, and add a CASE statement into the DO_HANDLE_EVENT that calls this copied method.
    cheers Carsten

  • Event Handler Creation - Test Purpose

    Hi,
    - I am extracting 0SCEM_1 Datasource in BW.
    - I setup all procedure (EH setup, Ruleset, BW profile,field mapping) including Initial upload to BW. It successfully brings data in BW.
    - Now, I change to "DELTA" process at ruleset level by changing 'x' (other than space) to BW_UPLOAD activities.
    Now Questions is:
    - Business User generally make changes to application system and this changes related messages comes in EM system and ignite EH.
    - Question:
    Is something I change in EM system that can ignite Delta, I mean I can change some message tables or EH or something that makes Delta to be activate and fillup delta.?
    If business users changes data it will start Delta but I am in Predev system and I want to test myself.
    Is something possible.?
    Thanks,
    Chan

    You could send a message with SE37
    How the Standard Integration between SAP EM and SAP TM Can be Tested with SE37
    Or you could reprocess messages for an EH in /SAPTRX/EH_LIST:
    Best regards,
    Steffen

  • Event handler switch creation (for repeated use )

    Im creating a hyperterminal like application which reads from serial port and  writes into serial port.
    The reading and writing works almost fine..I also wants to create some custom "Key controls" that will send some prestored commands to the serial port.
    I currently implemented two commands "ESC" and "FLASH " in the Key controls menu..
    I want to send these commands ESC and FLASH each time i click a button in the menu.
    I used event handler for it..and put the event handler inside an always running while loop.
    But the problem is I can send only these commands only for one time during execution.
    Repeated pressing of switches doesnt cause any effects..
    Can somebody help please???
    Im using labview 6.1. If u modify VIs using higher versions i cant open here..kindly include a jpg screenshot inthat case.
    Thanking you.
    Stephen.
    Attachments:
    Serial Port(stable release)1.2.vi ‏113 KB
    Init.vi ‏32 KB
    Write.vi ‏44 KB

    Hi Stephen,
    in LV7.1 your events will be executed whenever I press one of the according switches...
    Notes:
    -Don't make several event structures. Instead make one event structure with several event cases. Read the context help for the event structure!
    -I would suggest to set the mechanical action of both switches to "latch when pressed" instead of "switch..." to give a feedback to the user as the switch will be reset after reading it...
    -Generally be more styleguide-conform! Use right-click on terminals to create controls/constants to avoid coercion dots (spot the red colored dots in the image?). Make error in/out in the lower left/right of the connector pattern. Avoid block diagrams larger than the screen (or what kind of monitor do you use?).
    Edited:
    Sorry for weird display. I have to get used to the new image gallery feature of the forum (and will use "image to the left" only on rare conditions). Btw. the preview looks different to the actual post
    Message Edited by GerdW on 05-28-2009 06:59 AM
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • OIM 11.1.1.5.0 - Pre process event handler

    Hi everyone, I'm trying to configure a preprocess event handler to automate email and user login when I click on "create user".
    I mean when I want to create a new user, I just want to fill the first name, the last name, the organization and the type and this preprocess will fill automatically the email and the user login fields. I don't know if it's possible or not with an event handler ?
    Thanks
    Thibault

    If you want this event handler only for manual user creation using UI then you can go with pre-process event handler. The advantage you get is, no need of refereshment. once user created email and user login field will be visible. But in case of post process you have to refresh it manaually. Yes, you have to use post process event handler if the same field you want to populate on Trusted recon as well. Beacause, Pre- process doesn't work with Trusted recon.
    Hope above will help you to decide for pre or post to use.
    Now, for registering plugin. Don't put jar in the zip, you have to place .class in case of event handler. jar we use for scheduled task. place your class file like below and zip
    lib/*package structure folder*/EmailLoginAuto.class
    ie lib/com/test/eventhandler/EmailLoginAuto.class
    for importing eventhandler.xml put it anywhere in your directory structure
    ex: /tmp/db/eventhandler.xml
    and update the from_location as /tmp in weblogic.properties
    --nayan                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Can we apply an event handler only for a custom request in oim 11G?

    Hi,
    We would like to create a custom request for user creation, modification etc.
    I saw that event handlers allow to add business rules by running java code during differents steps of processes.
    I would like to know if we can trigger an event handler on a specific request and not on all user CREATION, UPDATE etc.
    For example, we would like to have differents creation requests and a differents event handler on each request.
    And can we add "logical" input on request form and read them in event handler?
    For example, 3 inputs: day, month and year on the form which fill one user attribute "end contract date".
    Regards,
    Pierre

    thank you Akshat,
    I saw part 19 in the developper's guide. If I understand, I can change the default CreateUserRequestData to define ALL form components that will be used in my differents user creation request templates.
    I can use prepopulation adapter to pre populate field with java code.
    I can use the plug-in point oracle.iam.request.plugins.StatusChangeEvent to run custom java code.
    But they don't mention where you can run java code for a specific creation template named "MyUserCreationTemplate1" and other java code for an other specific creation tempalate" MyUserCreationTemplate2".
    That makes me think we must retrieve the template name in java code and execute the appropriate business logic.
    if request name==MyUserCreationTemplate1
    Edited by: user1214565 on 31 mai 2011 07:42

  • Event handling in Portal IView of JspDynpage

    Hi All,
    I have created the portal iview with jspdynpage.Can any body tell whether event handling can be performed from the portal iview which is created from the jspdynpage?
    Regards,
    V Karthi

    hi
    check this threads
      Event handling in portal through sap netweaver.
      From creation of JSP page to iView at Portal
    Thanks

  • Htp.p doesn't work from the custom button event handler ...

    Hi,
    I am trying to pop up an alert from the custom button event handler. I created a button and put the following code.
    htp.p('<script language='JavaScript1.3">
    alert ("Test Message");
    </script>;
    But alter doesn't show up after clicking the button.
    Thanks

    OK i've attached them and copy/pasted the relevent parts. The parent window is the SFLB file.
    -----------------------------------------here's the code in the parent window
    private function editServerPool():
    void
    serverPoolPUW = PopUpManager.createPopUp(
    this,popups.ServerPoolPopup,true);PopUpManager.centerPopUp(serverPoolPUW
    as IFlexDisplayObject); 
    if (newServerPool.SecondarySPAlgorithm != null){
    serverPoolPUW.enableSSCheckBox.selected =true;serverPoolPUW.DisplaySecondaryServerPool();
    serverPoolPUW.bigResize.play();// serverPoolPUW.height = 602; //yes...i know i need to move thisserverPoolPUW.switchoverPolicyCB.selectedItem = newServerPool.SwitchOverPolicy;
    serverPoolPUW.switchoverThresholdTI.text = newServerPool.SwitchOverThreshold;
    ----------------------here's the code in teh popup window (popups.ServerPoolPopup.mxml)
    <mx:Resize id = "bigResize" heightFrom="506" heightTo="602" target="{this}" /> 
    <mx:Resize id = "littleResize" heightFrom="602" heightTo="506" target="{this}"/>
     public function DisplaySecondaryServerPool():void{
    //make the screen large if the secondary server checkbox is selected; otherwise small.  
    if (enableSSCheckBox.selected){
    //display secondary server pool tab, expand the screen 
    //note that we cannot attach a data provider to the data grid until the grid creation is  
    //completed. This is done in an event handler.secondaryPanel.enabled =
    true; switchoverPolicyCB.visible =
    true;switchoverThresholdTI.visible =
    true;thresholdFI.visible =
    true;policyFI.visible =
    true;bigResize.play();
    else
     <mx:CheckBox label="Enable a Secondary Server Pool" width="264" fontWeight="bold" click="DisplaySecondaryServerPool()" id="
    enableSSCheckBox" fontSize="12" x="83" y="40"/>

  • Using yepnope, getting error in event handler.

    Recently discover yepnope and started to implement it into my project to keep common functions in one file. The first set of functions worked fine when I moved them over, but with the last one I'm unable to control a symbol.  It's calling the function fine, it's just wont play the symbol timeline.
    -------Here's the function in the external file
    //Function for audio button
    // Tests the paused attribute and set state.
    voButton = function (){
        if ($('#voiceOver')[0].paused) {
            console.log("play");
            $('#voiceOver')[0].play();
            sym.getComposition().getStage().getSymbol("btnSound").stop(1000);
        else {
            console.log("pause");
            $('#voiceOver')[0].pause();
            sym.getComposition().getStage().getSymbol("btnSound").stop(0);
    -------Here's the call to the function
    Symbol.bindElementAction(compId, symbolName, "${_btnSound}", "click", function(sym, e) {
             voButton();
    //Edge binding end
    Calling the function plays the audio but doesn't change the symbol. Getting the error message:
    functions.js (line 39)
    Javascript error in event handler! Event Type = element
    I've tried different combinations of getComposition() or getSymbol(), nothing.  I read a post somewhere that said I needed to prefix my function creation with sym. and call it the same way.  This didn't work either and caused the function to stop working, but with a new error: sym is not defined in the external file.
    Like I said the function works when I call it, but I can't access the symbol's timeline for some reason.

    I'm trying to include a custom js file to an Edge project, and I'm getting the same "sym is not defined" error. have you found a workaround for this problem?
    can't we just use "sym" or methods like "getSymbol()" in the js loaded by yepnope?
    I can't find any sources about this.
    And I can't find an easy way to substitute "sym"...
    Thanks in advance

  • How to configure which changes in the document triggers Event Handler again

    Hi Experts
    Due to some reason after creation of Purchase Order, the event handler is not created in EM system. Now is there any way to resend this PO to EM? For example, is it possible to trigger Event Handler by changing some field in PO? If it is possible that way, Could you guide how to configure which changes in the document (PO/SO/Delivery/Shipment) can trigger Event Handler in EM system?
    Thanks
    Ravi

    Hello Ravi,
    if you change the PO Header/Item the respective EH  should be created if the Relevance condition is fullfilled.
    I'm not sure if it also works in the case that you change the PO Header and EH for PO Items will be created.
    Best regards,
    Steffen

  • SEGV in Event Handler

    Hello everybody,
    I'm trying to compile my client partition to improve performance on the
    client side.
    I'm using a 'Register' on several event handlers to register them into
    the main window loop.
    On interpreted version, every things work fine but in compile mode I 've
    a SEGV error due to a EVT=NULL during the register call.
    Is there any thing I missed when using Event Handler ?
    Thanks
    Eric Ab&eacute;cassis <[email protected]>
    Senior Architect
    Sema Group DTS

    Hi,
    As i read from the oracle docs and my understanding the pre-update and post update adatper will be triggered at the time of user creation also.
    If you have some requirement which required an pre-updated adapter then you can do one thing just check the user start date if start date is today date then don't trigger ur logic and if start date less then today date then tirgger ur logic.,
    Let me know if you have any query for the same..
    Regards
    Alabhay Goel
    Edited by: Alabhya Goel on May 21, 2010 4:20 AM

  • OIM 11g - ldap sync - Post Process event handler 'CREATE'  faillling

    Hi Gurus,
    We have ldap sync set up between OIM 11.1.1.5 and ODSEE 11g,
    Post process event handler on user creation with is setting a attribute with random 16 digit character, This event handler is getting triggered and setting the attribute in OIM but in logs i can see "Modification failed because user 45118 is not synchronized to the LDAP directory." error and it is not updated in ODSEE.
    This behaviour is only for trusted recon not for the User created through UI.
    Not sure what exactly is happening..
    Is it expected behavior??
    Gurus help me out on this.

    IF it fail because event handler unable to produce random number then verify below
    is eventhandler code being executed in trusted recon verify in log.
    There are two method execute and bulk execute in eventhandler. execute is being called from UI and bulk execute is being called for trusted recon.
    either put code in bulk execute or update batch recon size something like that system property to 1. so, it will function as UI. Default value of batch is 500
    --nayan                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • JMenuBar Event Handling

    I am customizing my own menu bar, I would like to create some event handling, for the top most level, it is not a problem, but when I try to implement some event handling for the drop-down list/menu, nothing happens.
    The following is the whole class:
    package diagramillustrator;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class DIM extends JMenuBar implements MouseListener
         * Creates a new instance of DIM
        public DIM()
            configFileMenu();
            configOptionsMenu();
            configAllItems();
            configMenuBar();
        //Creation and Initialization of objects
        //<editor-fold>    
        //file and options menus to be added to the menubar
        JMenu fileMenu =  new JMenu("File");
        JMenu optionsMenu = new JMenu("Options");
        //file items
        JMenuItem newItem = new JMenuItem("New");
        JMenuItem openItem = new JMenuItem("Open");
        JMenuItem saveItem = new JMenuItem("Save");
        JMenuItem printItem = new JMenuItem("Print");
        JMenuItem exitItem = new JMenuItem("Exit");
        //options items
        JMenuItem createFileItem = new JMenuItem("Create properties file");
        JMenuItem propertiesItem = new JMenuItem("Properties");
        //</editor-fold>
        //adds mouse listener to every item
        private void configAllItems()
            this.addMouseListener(this);
            fileMenu.addMouseListener(this);
            optionsMenu.addMouseListener(this);
            newItem.addMouseListener(this);
            openItem.addMouseListener(this);
            saveItem.addMouseListener(this);
            printItem.addMouseListener(this);
            exitItem.addMouseListener(this);
            createFileItem.addMouseListener(this);
            propertiesItem.addMouseListener(this);
        //creats the file menu
        private void configFileMenu()
            fileMenu.add(newItem);
            fileMenu.addSeparator();
            fileMenu.add(saveItem);
            fileMenu.add(openItem);
            fileMenu.add(printItem);
            fileMenu.addSeparator();
            fileMenu.add(exitItem);
        //creats the options menu
        private void configOptionsMenu()
            optionsMenu.add(createFileItem);
            optionsMenu.add(propertiesItem);
        //configures the menubar, adds all items to it etc
        private void configMenuBar()
            this.setLayout(new FlowLayout(FlowLayout.LEFT));
            this.add(fileMenu);
            this.add(new JSeparator(SwingConstants.VERTICAL));
            this.add(new JSeparator(SwingConstants.VERTICAL));
            this.add(optionsMenu);
            this.setToolTipText("Menu Bar");
        //event handling
        //<editor-fold>
        public void mouseClicked(MouseEvent e)
            //works
            //if(e.getSource().equals(fileMenu))this.setBackground(Color.yellow);
            //else this.setBackground(Color.black);
            //dowsn't work
            if(e.getSource().equals(newItem))this.setBackground(Color.yellow);
        public void mousePressed(MouseEvent e)
        public void mouseReleased(MouseEvent e)
        public void mouseEntered(MouseEvent e)
        public void mouseExited(MouseEvent e)
        //</editor-fold>
        //main method to test class
        public static void main(String[] args)
            JFrame f= new JFrame("Testing menu");
            f.setSize(400,400);
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.setJMenuBar(new DIM());
            f.show();
    } This is the troubling part:
    public void mouseClicked(MouseEvent e)
            //works
            //if(e.getSource().equals(fileMenu))this.setBackground(Color.yellow);
            //else this.setBackground(Color.black);
            //dowsn't work
            if(e.getSource().equals(newItem))this.setBackground(Color.yellow);
        } The first two lines work perfectly fine as they apply to the top most level, the rest doesn't do anything at all.
    Can anyone help me to handle events for the drop-down please?
    AndXer

    Sorry posted the prvious by mistake.
    Oh, I usually used MouseListener for buttons...I tried using ActionListener and it worked great, the only flaw is that any mouse button clicked triggers an event, I want the event to be triggered only when BUTTON_1 is clicked (like in MouseListener).
    Can that be done as I found nothing in the API. If yes, a code sample would be greatly appreciated.
    The current code for handling it is:
        if(e.getSource().equals(newItem))
             this.setBackground(Color.green);
    }Thanks,
    AndXer

  • ALV GRID - EVENT HANDLING

    Hi all,
       Please let me know how to hanldle  event handling , making a cell in editable mode ,double click and hotspot creation,colorign a single cell,calling a transatcion when clicked on hotspot in a alv grid display program (not using OO   concepts).
    Looikng forward for a positive response.
    Reagrds,
    Mohinder.

    Hi,
    You can create your own custom status and asign it to your
    ALV GRID. Here is a sample code to add custom status and handling events.
    http://www.geocities.com/mpioud/Z_DEMO_ALV_REFRESH_BUTTON.html
    Reward Points if found helpfull..
    Cheers,
    Chandra Sekhar.

  • Handheld Device Event handling in B1

    Hi Experts,
    I am using a Signature Handheld device and have integrated it with SAP B1 form. This is how it should work:
    I click a button "Get Signature" from B1 form.
    The activex gets activated and display a message "Please sign and Tap OK" on Signature Handheld device.
    The user signs on the Signture device and Tap "OK"
    I get the signature and save it.
    The problem is that when the user Tap OK on handheld, my event handler does not listen to it. I have declared all the event handlers in the B1 code but still in vain. I have done the same in a simple C# program and my event handlers are working fine.
    Here is my brief code snippet.
        public class Base
            public SAPbouiCOM.Application SBO_Application;
            public SAPbobsCOM.Company objCompany;
            public SAPbouiCOM.Form oForm;
            //public AxSIGPLUSLib.AxSigPlus oSigPlus;
            public SIGPLUSLib.SigPlus AxSP;
            public Base()
                if (SBO_Application == null)
                    SetApplication();
                    ConnectToCompany();
                    AddMenuItems();
                    //Set Event Handlers
                    SBO_Application.AppEvent += new SAPbouiCOM._IApplicationEvents_AppEventEventHandler(SBO_Application_AppEvent);
                    SBO_Application.ItemEvent += new SAPbouiCOM._IApplicationEvents_ItemEventEventHandler(SBO_Application_ItemEvent);
                    SBO_Application.FormDataEvent += new SAPbouiCOM._IApplicationEvents_FormDataEventEventHandler(SBO_Application_FormDataEvent);
                    SBO_Application.MenuEvent += new SAPbouiCOM._IApplicationEvents_MenuEventEventHandler(SBO_Application_MenuEvent);
                    AxSP = new SIGPLUSLib.SigPlus();
                    AxSP.PenDown += new DSigPlusEventsPenDownEventHandler(AxSP_PenDown);
                    AxSP.PenUp += new DSigPlusEventsPenUpEventHandler(AxSP_PenUp);
                    AxSP.TabletTimerEvent += new DSigPlusEventsTabletTimerEventEventHandler(AxSP_TabletTimerEvent);
            void AxSP_PenUp()
                //Pen Up event handler
            void AxSP_PenDown()
                //Pen Down event handler
    Is business one filtering the event? How can I listen to the activex control event?
    Hope to listen soon
    Thank you.
    Edited by: KK on Jan 14, 2011 1:09 PM

    the button2 in panel's constructor hides the one from Game class
    remove the "JButton" in front of "button2" in its creation statement and everything will work fine

Maybe you are looking for

  • Does anyone know if there is an HTML 2 Image Rendering tool?

    I am looking for some Java API that converts HTML to Image on the server side. There are a number of desktop utilities that take an HTML file as input and render image, but I am looking for a Server Side solution. I found WebRenderer, but it is invol

  • Text Animation Presets do not load.

    Text animation presets do not load in After Effects CC (or Adobe Bridge when browsing presets). They don't show up in Effects & Presets panel. I believe they used to show up but no longer. They are in the presets folder so I'm not sure why they won't

  • Links Problem in Dreamweaver CS3 !

    I recently reinstalled my Dreamweaver CS3. Now everytime i save a file, it saves the whole directory path with the file name. So when i opened my index page and saved it with some changes, all my css tables have been lost. and all the links in the fi

  • After hooking up AirPort Extreme, I cannot get on the Internet

    Just installed AirPort Extreme.  After following instructions and turning power off several times in attempt to reset, I still cannot get back on the Internet. Does anyone have any ideas?

  • UIX - how do I selectively make inputs required?

    Ok, subject line probably not the best way to state this. I have a UIX page with a VO-based read-only table and two messageDate fields. The user needs to select a row in the table and fill in the fields before hitting the submit button. The messageDa