Handling exceptions for a event handler method.

Hi Mates,
                I have two custom container in which i am displaying an alv grid usind objects. when a double click event is performed in one of the alv the other alv should be displayed. I now have to handle exceptions of the class  CX_SY_DYN_CALL_ILLEGAL_TYPE. This is raised for an invalid parameter type when calling a method dynamically. I cannot use the keyword "RAISING" in the definition of the event handler method. i checked with the syntax of the method definition in abap dictionary, there were no addition "RAISING" for an event handler method. please provide me with the solution (a sample code would do.)

Hello,
May be you should read about the TRY ... CATCH block which is used for handling exceptions.
Basic construct of your code should look like this:
TRY.
" Your Dynamic Method call
  CATCH CX_SY_DYN_CALL_ILLEGAL_TYPE.
ENDTRY.
If you want to get the error message text:
DATA:
lcx_excp TYPE REF TO CX_SY_DYN_CALL_ILLEGAL_TYPE,
v_err_msg TYPE string.
TRY.
" Your Dynamic Method call
  CATCH CX_SY_DYN_CALL_ILLEGAL_TYPE INTO lcx_excp.
  v_err_msg = lcx_excp->get_text( ).
ENDTRY.

Similar Messages

  • Exceptions for repeating Events aren't handled correctly on iPod!?

    I have a few repeating all day events set up in my calendar in iCal. If I sync them to my iPod they are transfered correctly.
    However, if I move one of them in iCal from say wednesday to tuesday as an exception for this event (for just one week), the event isn't moved on the ipod as well. Instead, after syncing, it shows up on tuesday *as well as* wednesday. In iCal everything is displayed correctly...but on the ipod it is doubled.
    Does anyone know how to fix this?
    Best regards,
    Markus.

    Scott,
    thanks for your hint. unfortunately this didn't change anything at all.
    I still got my repeating events correct on the mac but doubled on the ipod.
    Any other ideas?
    Best regards,
    Markus.

  • How to handle exception thrown in standard bo method in the workflow design

    Hi Experts
        how to handle exception thrown from standard bo method in the workflow design. For example, bo BUS2032, METHOD confirm. If the user cancel it, it will throw exception. In the workflow, how to catch this exception and add corresponding steps in the workflow.

    @jrockman li
    Try to implement the logic that what ever you are performing in the BO mehtod in a FM and in the FM you have tab with name EXECPTIONS define the execption in that tab.Now in the BO method you call this FM  and if the exception occurs by using RAISE you can raise the exception in the FM and based on the number of exceptions your sy-subrc value will be set
    so when sys-subrc is not eq 0 then pass a value back t the workflow container., I think this will work.
    a sample Snippet for understanding purpose
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
        filename         = <path>
        filetype         = 'ASC'
      IMPORTING
        filelength       = lv_len
      TABLES
        data_tab         = l_txt_tab
      EXCEPTIONS
        file_write_error = 1          " If this Exception occurs
        invalid_type     = 2
        no_authority     = 3
        unknown_error    = 4
        OTHERS           = 10.
    CASE sy-subrc.
      WHEN 1. " SY-SUBRC value will be 1 then,
          " Pass or set the value back to the workflow conatiner element
    ENDCASE.

  • Can we handle exceptions for the expressions in select query?

    Hi all,
    Can we handle exceptions for the expressions in select query.
    I created a view, there I am extracting a substring from a character data and expected that as a number.
    For example consider the following query.
    SQL> select to_number( substr('r01',2,2) ) from dual;
    TO_NUMBER(SUBSTR('R01',2,2))
    1
    Here we got the value as "1".
    Consider the following query.
    SQL> select to_number( substr('rr1',2,2) ) from dual;
    select to_number( substr('rr1',2,2) ) from dual
    ORA-01722: invalid number
    For this I got error. Because the substr returns "r1" which is expected to be as number. So it returns "Invalid number".
    So, without using procedures or functions can we handle these type of exceptions?
    I am using Oracle 10 G.
    Thanks in advance.
    Thank you,
    Regards,
    Gowtham Sen.

    SQL> select decode(ltrim(rtrim(translate(substr('r21', 2, 2), '0123456789', ' ' ), ' '), ' '), null, (substr('r21', 2, 2)), null) from dual;
    DE
    21
    SQL> ed a
    SQL> select decode(ltrim(rtrim(translate(substr('rr1', 2, 2), '0123456789', ' ' ), ' '), ' '), null, (substr('rr1', 2, 2)), null) from dual;
    D
    -

  • My calendar on my iPhone 4 erases all data over a month old except for recurring events.  How Do I get it to keep the info and not erase calendar events?

    My calendar on my iPhone 4 erases all data over a month old except for recurring events.  How Do I get it to keep the info and not erase calendar events?

    Settings>Mail, Contacts, Calendars>Calendars>Sync>All Events.
    Note: If you're using a work Exchange account, the administrator my have restricted your options for this setting.

  • How to handle exceptions thrown by event

    Hi all,
    i have this slight problem, i'm trying to handle accessing a databse from a button click, i'm trying to simulate somebody logging on to a network. the code is as follows;
    *@author James Taylor
    *@version 30-11-2003
    *Logon gui
    import java.awt.*;
    import javax.swing.*;
    import java.awt.event.*;
    import java.sql.*;
    public class LogonUI extends JFrame {
         //instance variables
         private JLabel userNameL;
         private JPasswordField password;
         private JButton logon;
         ButtonHandler handler;
         Connection con;
         Statement stmt;
          *Constructor initialises and creates UI, adds functionality to the button.
         public LogonUI() throws SQLException, ClassNotFoundException, IllegalAccessException, InstantiationException{
              super("Employee Logon");
              Container c = getContentPane();
              c.setLayout(new FlowLayout() );
              //handles what happens when user presses the button
               handler = new ButtonHandler();
              userNameL = new JLabel("Please Enter Password:");
              c.add(userNameL);
              password = new JPasswordField(15);
              c.add(password);
              logon = new JButton( "Logon" );
              //anonymous inner class that is created once the button is pressed.
              //it connects to database to validate user
              logon.addActionListener( handler );
              c.add(logon);
              c.setBackground( Color.pink );
              setDefaultCloseOperation(DISPOSE_ON_CLOSE);
              setSize(250,150);
              setVisible(true);
          *class that opens connection to validate user
         private class ButtonHandler implements ActionListener {
              public void actionPerformed(ActionEvent ae)throws SQLException, ClassNotFoundException, IllegalAccessException, InstantiationException{
                   try{
                        boolean isValidUser = false;
                        //Load mysql driver
                         Class.forName("com.mysql.jdbc.Driver").newInstance();
                         //make a connection
                        String url = "jdbc:mysql://localhost/flight";
                        con = DriverManager.getConnection(url)
                        //Create and instantiate a statement obj
                        stmt = con.createStatement();
                        //get a result set
                        ResultSet rs = stmt.executeQuery("SELECT Password FROM employees");
                        //Iterate through the result set
                        while ( rs.next() ){     
                             String savedPassword = rs.getString("Password");
                             if (password.getText().equals(savedPassword) ){
                                  isValidUser = true;
                                  JOptionPane.showMessageDialog(null,"Yipeeeee");
                        if (isValidUser == false){
                             JOptionPane.showMessageDialog(null,"Invalid Password");     
                        stmt.close();
                        con.close();
                   }catch(Exception e){ e.printStackTrace();}
              public static void main (String[] args) throws SQLException, ClassNotFoundException, IllegalAccessException, InstantiationException{
              LogonUI testAirApp = new LogonUI();
    }When the user presses the button the app tries to validate the user.
    I have not been able to test the code due to SQL Exceptions thrown in the handler class, and when i try and throw them up from here i get;
    LogonUI.java:52: actionPerformed(java.awt.event.ActionEvent) in LogonUI.ButtonHandler cannot implement actionPerformed(java.awt.event.ActionEvent) in java.awt.event.ActionListener; overridden method does not throw java.lang.InstantiationExceptionAny ideas on my code and how to handle these exceptions will be very appreciated. Regards, James

    Turn your checked exceptions into unchecked exceptions and retrieve the cause later:
    RuntimeException unchecked = new RuntimeException(checked);
    Throwable t = unchecked.getCause();Stephen

  • Handling exceptions for barcode:

    Hi,
       How can I handle the exceptions for a barcode process? suppose I have a tiff document with 4 pages and 4 barcodes, and if one of them was failed in decoding, my whole process is running into exception. I want to handle that failed barcode alone and send a message to the output variable that the particualr barcode is failed.
      I tried using events with default exception handling. I dont know how to configure it and catch the runtime exception. I tried searching in the internet to get some configuration samples for that. I checked the sample from Tour de livecycle. Even that didnt guide me how to configure those exceptions.
    Chaitanya

    Can someone help me out on this..
    Thanks

  • How to reporcess event message for an event handler

    Dear Experts
    In one of our cases, we defined a task in the rule set to activate event handler when reason for rejection removed for a slaes order. We used the activity EH_ACTIVATE.
    For some of the SO event handlers, this activity was not triggered (do not know why) and the EH is still in Inactive Status. There is an option to reporcess event messages but this is disabled in Production. May I know is there any program to activate the EH in this case?
    Thanks
    Ravi

    Ravi,
    I would rather you see why the activity is not being triggered. Try reporting the events in simulation mode and check the results... If it subsequently posts then I would activate full App log logging in SAP EM and see what's going on. It's not good to be intermittently missing activities. You need to get to the bottom of it and use the correct methods in the rule set to achieve this.
    Thanks
    Kevin

  • Help for awt event handling consume fundamantal

    I have doubt about MouseEvent consume(). And, what it is used for?
    As, I tried an example and I could not figure out what it was doing
    Please give your suggestions on this
    Thanks
    nick

    Just another cross poster.
    [http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=2&t=018087]
    db

  • Fixed my sound issues in KDE (no sound except for system events)

    First, I'd like to say that I am by no means an expert and what I have below represents nearly a week of installing/reinstalling arch and trying various things to get my sound working correctly in KDE. In fact, yesterday I decided that I was just going to use mint because, even though I don't like it, at least the sound worked for me. I did decide to give it one more try this morning and finally was successful.
    My system has an AMD A8-3850 processor, which I never would have bought if I had known all of the compatibility issues I would end up having with it. My problem was that I would hear event sounds in KDE (such as the start up sound) but I would get no sound within my browsers and flash and probably elsewhere. Also, even though I was hearing the system sounds, kmix showed my volume at 0% and that my device was muted. Trying to select the device in kmix didn't accomplish anything at all. Because of this, I had a feeling that the problem was that my sound was defaulting to my HDMI sound, which turned out to be right.
    I'll try to be as brief as I can about the process I followed.
    The first thing I did was get asoundconf from the AUR. I was then able to set my non-HDMI sound card as the default.
    johnr@bitstorm ~ % asoundconf list
    Names of available sound cards:
    Generic
    Generic_1
    johnr@bitstorm ~ % asoundconf set-default-card Generic_1
    johnr@bitstorm ~ %
    From that point, I installed PulseAudio and worked my way through the PulseAudio page on the arch wiki. After which, I was able to bring up the PulseAudio Volume Control (pvaucontrol) and turn off my HDMI sound all together.
    Still, my sound did not work, though. After some searching I came to this page: http://www.freedesktop.org/wiki/Softwar … ktops/KDE/ which basically said that my kmix wasn't compiled with with pulse audio support. After a search for kmix on the AUR, I came to this package: kdemultimedia-kmix-git
    After installing that, I reboot and all is right with the world... or at least my sound in KDE.
    So that's it. I am sorry if this is poorly written, I do not write things like this very often. I was so happy, though, that I was actually able to fix it and I did want to share since I imagine that I am not the only one to have this problem.

    Hi @shayanaijaz 
    Thank you for your reply.
    Here is a link to HP Notebook PCs - No Sound from the Speakers (Windows 7).  You can skip any steps you have previously done.
    If after installing the original drivers from the recovery manager you still have an issue with the sound, I suggest you do a recovery back to factory.
    HP PCs - Performing an HP system recovery (Windows 7)
    During the recovery you will see an option to backup your personal files to prevent data loss.
    HP PCs - Restoring Files that were Backed Up Using HP Recovery Manager (Windows 7)
    You could also test the audio card just to rule that possibility out.
    HP Notebook PCs - Testing for Hardware Failures (Windows 7, Vista)
    My last suggestion is to contact HP support for assistance.
    Please call our technical support at 800 474 6836. If you live outside the US/Canada Region, please click the link below to get a support number for your region.
    World Wide Phone Support
    Good Luck!
    Sparkles1
    I work on behalf of HP
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos, Thumbs Up" on the bottom right to say “Thanks” for helping!

  • Accessing exception information in an event handler method

    Hi,
    I am trying to handle an event thrown by a fatal exception. I am able to capture the event in this event handler method. However, I need to access the PREVIOUS of the exception in this event handler method and am not sure how to do it.
    Can some one please help with this?
    Thanks
    Saravanan.

    Hi,
    Look at this code end check if your program works in the similar way.
    Here, i'm changing an atribute from one class from other class.
    If it doesn't works and you can't change an atribute directelly,  i  really don't know other way to do this.
          CLASS main DEFINITION
    CLASS main DEFINITION.
      PUBLIC SECTION.
        EVENTS evt EXPORTING value(e_data) TYPE char01.
        METHODS event_trigger.
        METHODS set_data IMPORTING i_data TYPE char01.
      PRIVATE SECTION.
        DATA v_data TYPE char01 VALUE 'X'.
    ENDCLASS.
          CLASS main IMPLEMENTATION
    CLASS main IMPLEMENTATION.
      METHOD event_trigger.
        RAISE EVENT evt EXPORTING e_data = v_data.
      ENDMETHOD.
      METHOD set_data.
        MOVE i_data TO v_data.
        WRITE: / 'New v_data value ->', v_data.
      ENDMETHOD.
    ENDCLASS.
          CLASS second DEFINITION
    CLASS second DEFINITION.
      PUBLIC SECTION.
        METHODS event_handler FOR EVENT evt OF main IMPORTING e_data sender.
    ENDCLASS.
          CLASS second IMPLEMENTATION
    CLASS second  IMPLEMENTATION.
      METHOD event_handler.
        WRITE: 'v_data value ->', e_data.
        CALL METHOD sender->set_data( i_data = 'Y' ).
      ENDMETHOD.
    ENDCLASS.
    START-OF-SELECTION.
      DATA: obj_main   TYPE REF TO main.
      DATA: obj_second TYPE REF TO second.
      CREATE OBJECT: obj_main, obj_second.
      SET HANDLER obj_second->event_handler FOR obj_main.
      call method obj_main->event_trigger( ).
    Regards.
    Marcelo Ramos

  • Event Handling for NotePad clone

    Hi,
    I was wondering if anyone knows where I can find a good resource for the event handling of a notepad clone. I really am having trouble with finding something that can help me. I'm not really sure where to start. Thanks.

    use google.com and search for java samples or free java code. There's lots of people out there posting examples of almost everything. That would be where I would look.
    You could try a book as well. I use JAVA 2 Black Book by Steven Holzner as a reference guide when I need to look something up. Comes in handy a lot.
    Matt S.

  • The reflection answer to event handling?

    I have been playing with reflection answers to the question of how to handle ActionEvent events in Swing... like using a single instance of one member class as a reflection switch:
    private class Listener implements ActionListener {
         public void actionPerformed (ActionEvent action) {
              try {this.getClass().getMethod(action.getActionCommand(), new Class[0]).invoke(this, new Object[0]);}
              catch(Exception exception) {/* error handling code */}
         public void one() {/* do something */}
         public void two() {/* do something */}
    }No more hideous if/then structures and only one inner class. Just match the method names to the action commands and the two line switch handles everything. Much cleaner code and directories.
    I wrote a small example program that you can get the source for here:
    http://www.immortalcoil.org/drake/SmartFrameExample.java
    I can think of only two reasons not to do this right now:
    1) Event / listener mismatches you would have caught at compile time before (if using inner classes) become runtime errors, or if you improve upon the above with Class.getMethods() then dead actions (as with a classic switch).
    2) Inability to look yourself in the mirror or partake of Jesus's love.
    Still, the result is much prettier code and as long as you code it right it will work flawlessly. I am honestly considering using this.
    Thoughts?

    For simple GUIs with very few actions, your approach is obviously overkill. You want to preserve simplicity whenever possible without affecting performance.
    For mildly complex GUIs, I think your approach is good, but still doesn't solve the bigger problem of managing multiple components that use the same action. If you've got so many actions that you need reflection to reduce code, you probably have a GUI with menubars, toolbars, popup menus, and buttons that all perform the same set of actions. Now you have to register an ActionListener with each component, not to mention disabling an action, which involves finding every menu item and button corresponding to this action and disabling/enabling it. I realize this is a different problem than you were trying to solve, but it's worth considering.
    Well, Swing provides javax.swing.Action to handle just this problem, which more or less alleviates the need for your approach because you have an Action subclass for each action. But maybe the best solution for very complex GUIs is a combination of your approach with the Action approach by providing an ActionSet class, which centralizes event handling for all components. The ActionSet class would define for each action:
    1) a static String for the action command
    2) a static String for the tooltip
    3) a static Icon for the icon
    Now, when a new ActionSet is created, it uses reflection to read each of it's fields, creating a new Action subclass for that action and storing it in a HashMap using the action command for the key. The Action subclass just handles the event by forwarding it to a registered ActionListener on the ActionSet class. The ActionListener would implement your approach for reflection event-handling, thereby eliminating if/else/switch clauses.
    The GUI code can call a method "getAction(String actionCommand)" on the ActionSet to retrieve the Action subclass when creating the JMenuBar, JButton, JToolBar, JPopupMenu, etc. Then at any time in the application, you can call ActionSet.getAction(...).setEnabled(...) to enable/disable all components using that action.

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

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

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

  • Event Handler is not being triggered- 11G Release2

    Hi all,
    I developed a postprocess event handler which I am expecting to be triggered when my custom task for trusted reconciliation run. I have deployed my event handler using plugin registration utility. I put a static block in my class to see if my class iz being initialized. I see that iti is initialized but event handler is never triggered (execute method is never called). Why it is not triggered? Any help is strongly appreciated... Below is my configuration for the event handler..
    <?xml version='1.0' encoding='utf-8'?>
    <eventhandlers xmlns="http://www.oracle.com/schema/oim/platform/kernel"
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.oracle.com/schema/oim/platform/kernel/orchestration-handlers.xsd">
    <action-handler class="com.tcmb.iam.plugin.eventhandler.PostProcessEventHandler"
    entity-type="User"
    operation="ANY"
    name="PostProcessEventHandler"
    stage="postprocess" order="1002"
    sync="TRUE"/>
    </eventhandlers>
    <?xml version="1.0" encoding="UTF-8"?>
    <oimplugins xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <plugins pluginpoint="oracle.iam.platform.kernel.spi.EventHandler">
    <plugin pluginclass=
    "com.tcmb.iam.plugin.eventhandler.PostProcessEventHandler"
    version="1.0"
    name="PostProcessEventHandler">
    </plugin>
    </plugins>
    </oimplugins>
    Tahnaks in advance,
    BR
    ALİYE

    Hi Nayan,
    I have cheked the plugins table and my plugin is in there.Thenchecked mds_paths table I have four records there (I have deployed and undeployed few times) wich are as follow:
    path element name
    http://www.oracle.com/schema/oim/platform/kernel     action-handler
    http://www.oracle.com/schema/oim/platform/kernel     action-handler
    http://xmlns.oracle.com/schema/oim/platform/kernel eventhandlers
    http://www.oracle.com/schema/oim/platform/kernel     eventhandlers
    Which schema is corrent? Is there something wrong with these records that causes my handler to do not trigger ?
    Thanks a lot
    BR
    Aliye

Maybe you are looking for

  • Line-item no.  not sequential  in billing

    Hi All , While doing POS upload for sales collection , message type ‘WPUUMS’ from a site for retail , two documents are created Article and billing . Both of these are having multiple articles which are positioned by line item no POSNR & VGPOS (like

  • CIN for Goods Return to Vendor

    Hi Could some one can let me know how to update the RG23 D register in case of return to vendor from depot plant. 1.. ME21N - Create a Returns PO (Activate "Returns" indicator for PO line item) 2. MIGO - Goods Receipt > Purchase Order (Returns PO) (H

  • JAR Files for multiple tracks

    Hi All, We have a scenario where we need to provide JAR files which needs to be accessible by all the tracks.Is there any solution which is being followed. In the current landscape we have built external library DC's for each track and trying to acce

  • Email settings in nokia 6111

    I have nokia 6111 s40, 3rd edition. I an failing to set/configure email settings. Please anyone to assist. Your help will be highly appreciated.

  • Combing two DVD Studio Pro projects?

    Hi, How do I combine two DVD Studio projects? I have two short projects, and each has some complicated track edits and subtitles etc that I really don't want to re-do by hand. Isn't there some way to copy and paste between projects or otherwise combi