Supress error log display in editable ALV

Hi,
I am using an editable ALV to get input. Some of the fields in the grid are assigned a check table. So when a entry which does not exist in the check table is made for these fields ALV by default displays a error log.
Is there any way to supress the display of this error log and collect the errors in this log to some internal table? I want to do this because apart from the standard validations done by the ALV i am performing some validations in the program and displaying a log. So i want to capture the error log of the ALV and display them in my log so that 2 error logs wont be displayed.
Thanks in advance,
Tongston Immanuel.

I'm building a kind of feature, where you can go different ways in a tree, based on a condition. The values for this condition are entered in an ALV-grid, which is a table with fields of type C(30). However to have a F4 help, I fill in ref_field and ref_table in the fieldcatalog. Most of the time, this works fine, but for fields of type NUMC, even if no F4 help is available, this doesn't work since internally it wants to convert this NUMC field to my CHAR field and it fails.
I refreshed my log table in the DATA_CHANGED event. Thanks for your suggestion!

Similar Messages

  • Suppress Error Log Message in OO ALV

    Hi,
    I am using OO ALV to display an editable ALV GRID. When I have edited the field on ALV, I am validating against the database table. If there is an error, the cell should have focus on the grid. I have used add_protocol_entry to acheive this. But I do not want to display the error log in a separate window. I have tried to suppress the error log message. Any idea ?
    Thanks in advance.
    Regards,
    Satish Kanteti

    Hello Satish,
    This is the standard behaviour when you add a protocol entry. To suppress the log you've to deactivate the protocol display, pass space to the method ACTIVATE_DISPLAY_PROTOCOL( ) of class CL_GUI_ALV_GRID (in the PBO of the corres. screen).
    DATA: g_grid  TYPE REF TO cl_gui_alv_grid.
    g_grid->activate_display_protocol( space ). "Deactvt Protocol disp.
    BR,
    Suhas
    PS: I'll prefer the log being displayed so that the user will know the exact cause of the error & can troubleshoot accordingly!

  • Error Messages popup in editable ALV

    Hello All,
    Iam working on Editable ALV  as a table maintainance for a Ztable and usng OOPs for that.
    Lets say i have material and plant fields for editing in ALV.
    If the user enters some junk value in the material field, its automatically getting validated and giving an error message with a popup.
    my question is, is there any way we can restrict this popup messages with error and have our own messages insted ?
    Appriciate your help in this.
    Thanks.

    check out this thread, where the poster wanted to append custom messages to the standard SAP messages... check otu the refresh_protocol method to see if you can clear out pre-existing SAP messages...
    Re: editable alv: add custom validation and display "errors" in protocol li

  • Error message when running editable alv

    Hi all,
    I hava a problem with an editable ALV. I created it with the following method wddoinit:
    METHOD wddoinit .
    initialize ALV Component
      DATA: l_ref_cmp_usage TYPE REF TO if_wd_component_usage.
      l_ref_cmp_usage = wd_this->wd_cpuse_alv( ).
      IF l_ref_cmp_usage->has_active_component( ) IS INITIAL.
        l_ref_cmp_usage->create_component( ).
      ENDIF.
    Get model data
      DATA: l_ref_interfacecontroller TYPE REF TO iwci_salv_wd_table .
      l_ref_interfacecontroller = wd_this->wd_cpifc_alv( ).
      DATA:
      l_value TYPE REF TO cl_salv_wd_config_table.
      l_value = l_ref_interfacecontroller->get_model( ).
    set read only mode to false (and display edit toolbar)
      DATA: lr_table_settings TYPE REF TO
      if_salv_wd_table_settings.
      lr_table_settings ?= l_value.
      lr_table_settings->set_read_only( abap_false ).
    set cell editor for input fields (~make colum editable)
      DATA: lr_column TYPE REF TO cl_salv_wd_column.
      DATA: lr_column_settings TYPE REF TO if_salv_wd_column_settings,
      lr_input_field TYPE REF TO cl_salv_wd_uie_input_field.
      lr_column_settings ?= l_value.
      lr_column = lr_column_settings->get_column( 'SAMPLE' ).
      CREATE OBJECT lr_input_field
        EXPORTING
          value_fieldname = 'SAMPLE'.
    lr_column->set_cell_editor( lr_input_field ).
    ENDMETHOD.
    But when I run the Web Dynpro Application I get an error message with the note:
    "Access over "Null" Object Reference not possible" ( I translated it from german to english )
    The error occures in the line:
    lr_column->set_cell_editor( lr_input_field ).
    But what is wrong?
    Thanks for your help!!
    Regards
    Ingmar

    Sorry. I'm stupid. I didn't the "Sample" for column and field!!!
    But:
    How can I reach that not only one cell is editable, but the whole table? And how can I save the data that I put in, when I add a new line?
    Thanks!!

  • Display in editable alv grid.

    Hi,
    This is my source code of uploading excel into sap and displaying the list.Please give the code for displaying the excel  data in editable alv.
    <<The code came from [here|https://wiki.sdn.sap.com/wiki/display/Snippets/ABAP-UploaddatafromExceltoSapusing+OO]>>
    Thanks in advance.
    am just a beginner in learning abap objects.pls help.
    Edited by: Matt on Aug 6, 2009 4:26 PM

    It wasn't your source code, was it?
    Please take the time to read the rules of engagement.  As it stands, your question is far too general.  There are examples of editable alvs in many location on the net.  You must search for them.  Please note these are not training forums, they are expert forums.  When you have a specific question, we'll be glad to assist.
    Post locked
    matt

  • Sales Order Costing Error Log Display

    When I look at Sales Order costing thru VA03 or when I run the Multi-level BOM costing for sales order CK87_99 I can not display the costing error log.  I can generate the log thru VA02, but we need to limit the Sales Order change transaction to the Order Management group and did not want to give change order access to the product cost group. 
    Any options to get the costing error log from VA03?
    Thanks

    I cheeked OKY9 and the Update tab had the "Save Error Log" checked, but on the Misc tab the "Log Messages but do not save" on the error message field was selected.  When I changed the selection to "Log and Save Message" this corrected my problem.
    Your suggestion guided me in the right direction. Thanks,

  • Unable to display Refreshed editable alv

    hi
    I have developed editable alv which contains 7 colums. the final column is the addition of 4th n 5th cplumn. when i refresh after changing the values, the final column is not changing. but while debugging the changed values are reflected in internal table but its reflected in alv.
    help me out

    in the user_comand form you have to put rs_selfield-refresh = 'X'.
    like this:
    *& Form user_comand
    FORM user_command USING r_ucomm LIKE sy-ucomm
    rs_selfield TYPE slis_selfield.
    rs_selfield-refresh = 'X'.

  • Like SM30 ,table should be display in editable ALV Grid(for Dynamic DB )

    Hi Friends,
    plese help me how to display  ALV grid in editable mode for differnt types of data base tables.
    same as like SM30 transaction.
    Moderator message: please search for available information/documentation/previous discussions before asking.
    Edited by: Thomas Zloch on Nov 11, 2010 6:40 PM

    Hi,
    In SLIS_T_FIELDCAT_ALV you specify the field as edit = X.
    Give it as mentioned, where you assign fieldname and positions etc.
    Thanks&Regards

  • I get error message DB745 with EDIT ALV on a field type DEC?

    Hi,
    I have an ALV which has a field type DEC.
    The ALV is open for edit.
    Once I put negative number in, I get the error message DB745.
    This error is retrieved from SAP code and I do not see any reason why.
    I checked the field cat and it looks fine (ref to a field type DEC).
    I am using lcl_grid_event_receiver with method: handle_data_changed FOR
    EVENT data_changed OF cl_gui_alv_grid.
    In that method I get the error in er_data_changed->mt_protocol.
    There is no problem to show negative data if it is saved in the database
    as negative.
    Can anyone throw ideas how to fix that?
    Thanks,
    Itay

    If you simply check the domain WERT7, you'll see that the checkbox for "Sign" is <b>not</b> checked. Therefore negative numbers are <b>not</b> allowed.
    Just because a field is decimal or currency does <b>not</b> mean that negatives are allowed.
    Many times, the sign is handled by a separate debit/credit indicator field such as a field with a domain of SHKZG.
    Rob
    Message was edited by:
            Rob Burbank

  • TS4337 I can't use any of this information as iCal will not even open on my Mac. It just has an error log.

    I cannot open iCal on my Mac. I simply get an error log. I try to "re-open" and the same error log displays. I've turned off the cloud. I've turned off my iPad and iPhone. I've re-started my computer.

    Go to your Home/Library/Preferences folder and move the com.apple.iCal.plist file to the Desktop.  Then try launching iCal again.  If there's no change you can move the preference file back.
    Remember that in Lion and Mountain Lion the Library folder is now invisible. To make it permanently visible enter the following in the Terminal application window: chflags nohidden ~/Library and hit the Enter button - 10.7: Un-hide the User Library folder.  Then it will be eashy to find and move the iCal preference file to the Desktop.
    OT

  • Editable alv: add custom validation and display "errors" in protocol list

    Hi,
    What I want to do:
    PAI validation of editable alv with displaying error's in the protocol list by adding custom entries to the existing protocol object.
    What is my problem:
    After registering "data_changed event", the protocol list don't appear.
    My understanding is, that the object "er_data_changed" is passed by the event "data_changed"
    an so I thought I can add some more entries to the protocol list.
    After "de-registering" the "data_changed" event, the protocol appears with the standard errros messages (e.g. "input to numeric" by enter charachters)
    One more hint:
    By creating a new object "er_data_changed" in the handler method the protocol list works, but I would like to append entries to the object that was passed with the event.
    Probably I've misunderstand something, please help !
    My coding:
    PAI:
    trigger event "data_changed" -> calls handler method
      CALL METHOD r_myalv->check_changed_data
        IMPORTING
          e_valid = is_valid.
    stop processing
      IF is_valid NE 'X'.
        MESSAGE 'invalid input' TYPE 'E' .
      ENDIF.
    handler method:
    handle_data_changed FOR EVENT data_changed  OF cl_gui_alv_grid  IMPORTING e_ucomm
                                                                                    er_data_changed.
    METHOD handle_data_changed.
        data: ls_mod_cell type lvc_s_modi.
         CALL METHOD er_data_changed->add_protocol_entry
                    EXPORTING
                           i_msgid     = 'SU'
                           i_msgty     = 'E'
                           i_msgno     = '000'
                           i_msgv1     = 'This is a test !'
                           i_fieldname = ls_mod_cell-fieldname.
         er_data_changed->refresh_protocol( ).
         er_data_changed->DISPLAY_PROTOCOL( ).
    ENDMETHOD.                    "handle_data_changed

    Dear Olaf,
        If understood correctly, you want to Edit an ALV and do some data validations when some data is changed in an ALV.   To do this follow the following steps:
    1.   Before displaying ALV, Register the edit event.
    * Set cell modified to trigger data_changed
    CALL METHOD go_alv_grid->register_edit_event
    EXPORTING
    i_event_id = cl_gui_alv_grid=>mc_evt_modified.
    2.  Register the event DATA_CHANGED of class CL_GUI_ALV_GRID & handle the event.
    SET HANDLER lo_event_receiver->handle_data_changed FOR go_alv_grid.
    The event DATA_CHANGED of class CL_GUI_ALV_GRID has a parameter ER_DATA_CHANGED which is of type CL_ALV_CHANGED_DATA_PROTOCOL.
    This er_data_changed has internal table MT_MOD_CELLS(contains index of records changed ) & MP_MOD_ROWS(contains the changed row), using these update your internal table accordingly.
    DATA : wa_mod_cell TYPE lvc_s_modi.
    FIELD-SYMBOLS: <fs> TYPE table.
    LOOP AT er_data_changed->mt_mod_cells INTO wa_mod_cell.
    ASSIGN er_data_changed->mp_mod_rows->* TO <fs>.
    READ TABLE <fs> INTO wa_output INDEX wa_mod_cell-tabix.
    MODIFY lt_output FROM wa_output INDEX wa_mod_cell-row_id.
    ENDLOOP.
    3.   Here it self you can do the required data validations(No need of any PAI modules) as below.
    IF wa_orders-zfstfirmtyp = c_9.
    MESSAGE s288(zcsp).
    DELETE er_data_changed->mt_mod_cells.
    EXIT.
    ENDIF.
    Regards
    Kesava

  • Editable Alv: ERROR in er_data_changed- display_protocol

    I have one fields "Emp_dept" in the record of the ALV Grid which can be edited, but when I edit this field  with  enter  event it will generate a error in display protocal, I want it to save in database , I debuged the program it reflect the in internal table but failed to reflect the in change in data base, as i Just started dveelopment in abap programing i searched the whole web for this problem but couldnot sucessfull please help me in this regarrd
    Here is my code:
    I am using module pool programing and I am following abap slandered program Bcalv_edit_03.
    FUNCTION-POOL Z_EMPLOYEE.                   "MESSAGE-ID ..
    * INCLUDE LZ_EMPLOYEED...                    " Local class definition
    TABLES:ZEMPLOYEE, ZEMP_COMM.
    DATA: zemploye TYPE TABLE OF zemployee  WITH HEADER LINE,
      WA TYPE zemployee .
    DATA: ZEMP_COM TYPE TABLE OF ZEMP_COMM   WITH HEADER LINE.
      DATA : WACOMM TYPE ZEMP_COMM.
    DATA: ZEMP_ADR TYPE TABLE OF ZEMP_ADRESS  WITH HEADER LINE,
    WA_ADR TYPE ZEMP_ADRESS.
    DATA: ZEMP_EDU TYPE TABLE OF ZEMP_EDUCATION1  WITH HEADER LINE,
    WA_EDU1 TYPE ZEMP_EDUCATION1.
    DATA EMPD TYPE ZEMP_ID.
    *data empd LIKE zemployee-emp_id.
      data: O_DOCKING TYPE REF TO CL_GUI_DOCKING_CONTAINER,
    O_GRID TYPE REF TO CL_GUI_ALV_GRID,"Grid
       i_selected_rows TYPE lvc_t_row,"Selected Rows
            w_selected_rows TYPE lvc_s_row,
       WA_LAYOUT TYPE LVC_S_LAYO,
    class lcl_event_receiver definition deferred.
    data: g_event_receiver type ref to lcl_event_receiver.
    types:BEGIN OF i_zemployee ,
        emp_id type zemployee-emp_id,
       emp_name type zemployee-emp_name,
       D_O_BIRTH TYPE ZEMPLOYEE-D_O_BIRTH,
       D_o_jOIN TYPE ZEMPLOYEE-D_o_jOIN,
       EMP_DEPT TYPE ZEMPLOYEE-EMP_DEPT,
       EMP_NO type ZEMP_COMM-EMP_NO,
       eemp_id type zemp_comm-emp_id,
       EMP_ADRESS TYPE ZEMP_ADRESS-EMP_ADRESS,
       EMP_RES_ADDR TYPE ZEMP_ADRESS-EMP_RES_ADDR,
       EMP_EDU1 TYPE ZEMP_EDUCATION1-EMP_EDU1,
      END OF i_zemployee.
       Data:
         i_tb type i_zemployee,
         emp_itb like table of i_tb.
         data:t_fcat TYPE lvc_t_fcat,
         wa_fcat TYPE lvc_s_fcat.
    DATA:
       screen  TYPE n LENGTH 4 VALUE 0100,
       screen1  TYPE n LENGTH 4 VALUE 0110,
       screen2  TYPE n LENGTH 4 VALUE 0120,
       screen3  TYPE n LENGTH 4 VALUE 0130,
        ok_code LIKE sy-ucomm.
       FORM FREE_OBJECTS .
       CALL METHOD O_GRID->FREE
         EXCEPTIONS
           CNTL_ERROR        = 1
           CNTL_SYSTEM_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.
       FREE O_GRID.
       CALL METHOD O_DOCKING->FREE
         EXCEPTIONS
           CNTL_ERROR        = 1
           CNTL_SYSTEM_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.
      FREE O_DOCKING.
    ENDFORM.
      form sol using emp_idd .
        data l_num(5) type n.
        l_num = emp_idd.
    * CALL FUNCTION 'NUMBER_GET_NEXT'
    *         EXPORTING
    *              nr_range_nr             = '01'
    *              object                  = 'ZEMP_AUTO'
    *         IMPORTING
    *              number                  = l_num
    *         EXCEPTIONS
    *              interval_not_found      = 1
    *              number_range_not_intern = 2
    *              object_not_found        = 3
    *              quantity_is_0           = 4
    *              quantity_is_not_1       = 5
    *              interval_overflow       = 6
    *              buffer_overflow         = 7
    *              OTHERS                  = 8.
        l_num = l_num + 1.
    EMP_IDD = L_NUM.
    endform.
      class lcl_event_receiver definition.
      public section.
         methods:
           handle_data_changed
              for event data_changed of cl_gui_alv_grid
                  importing er_data_changed.
      private section.
    * This flag is set if any error occured in one of the
    * following methods:
         data: error_in_data type c.
    * Methods to modularize event handler method HANDLE_DATA_CHANGED:
         methods: check_planetype
          importing
             ps_good_planetype type lvc_s_modi
             pr_data_changed type ref to cl_alv_changed_data_protocol.
    *    methods: ch_new_plane_v_new_seatsocc
    *           importing
    *              psg_plane type lvc_s_modi
    *              psg_socc type lvc_s_modi
    *              ps_saplane type saplane
    *              pr_data_changed type ref to cl_alv_changed_data_protocol.
    *    methods: ch_new_plane_v_old_seatsocc
    *           importing
    *              psg_plane type lvc_s_modi
    *              ps_saplane type saplane
    *              pr_data_changed type ref to cl_alv_changed_data_protocol.
    *    methods: check_seatsocc
    *           importing
    *              ps_good type lvc_s_modi
    *              pr_data_changed type ref to cl_alv_changed_data_protocol.
    * This is a suggestion how you could comment your checks in each method:
    * CHECK: fieldname(old/new value) !<comp> fieldname(old/new value)
    * IF NOT: (What to tell the user is wrong about the input)
    * Remarks:
    *  fieldname:       fieldname of table for the corresponding column
    *  (old/new value): ckeck with value of GT_OUTTAB or MT_GOOD_CELLS.
    *  !<comp>        : the value is valid if the condition <comp> holds.
    * Example:
    *  CHECK seatsocc(new) !>= seatsmax(old)
    *  IF NOT: There are not enough number of seats according to this
    *          planetype.
    endclass.
    class lcl_event_receiver implementation.
       method handle_data_changed.
         data: ls_good type lvc_s_modi.
        error_in_data = space.
         loop at er_data_changed->mt_good_cells into ls_good.
           case ls_good-fieldname.
    * check if column PLANETYPE of this row was changed
             when 'EMP_DEPT'.
               call method check_planetype
                      exporting
                         ps_good_planetype = ls_good
                         pr_data_changed   = er_data_changed.
          endcase.
         endloop.
    *§7.Display application log if an error has occured.
         if error_in_data eq 'X'.
            call method er_data_changed->display_protocol.  ( Error line)        <-------------------------------
         endif.
       endmethod.
       method check_planetype.
         data: l_planetype type zemp_dept,
               ls_saplane type zemployee,
               ls_good_seatsocc type lvc_s_modi.
         call method pr_data_changed->get_cell_value
               exporting i_row_id =    ps_good_planetype-row_id
                         i_fieldname = ps_good_planetype-fieldname
               importing e_value     = l_planetype.
    MODIFY ZEMPLOYEE FROM TABLE emp_itb.
         select single * from zemployee into ls_saplane where
                                          emp_dept = l_planetype.
               if sy-subrc ne 0.
           call method pr_data_changed->add_protocol_entry
            exporting
               i_msgid = '0K' i_msgno = '000'  i_msgty = 'E'
               i_msgv1 = text-m03           "Flugzeugtyp
               i_msgv2 = l_planetype
               i_msgv3 = text-m05           "exitstiert nicht
               i_fieldname = ps_good_planetype-fieldname
               i_row_id = ps_good_planetype-row_id.
           error_in_data = 'X'.
           exit. "plane does not exit, so we're finished here!
         endif.
    endmethod.
    endclass.
    **********************************************Module output****************
    MODULE STATUS_0120 OUTPUT.
      SET PF-STATUS 'START'.
      SET TITLEBAR 'STARTT'.
    IF O_DOCKING IS INITIAL.
    *   Creating Docking Container
        data: lt_exclude type ui_functions.
           CREATE OBJECT O_DOCKING
                  EXPORTING
                    RATIO                       = '95'.
           IF SY-SUBRC EQ 0.
    *   Creating Grid
             CREATE OBJECT O_GRID
                 EXPORTING
                    I_PARENT          = O_DOCKING.
           ENDIF.
    endif.
    * Filling the fieldcatalog table
    *    CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
    *      EXPORTING
    *        I_STRUCTURE_NAME       = 'i_tb'
    *      CHANGING
    *        CT_FIELDCAT            = t_fcat
    *      EXCEPTIONS
    *        INCONSISTENT_INTERFACE = 1
    *        PROGRAM_ERROR          = 2
    *        OTHERS                 = 3.
       WA_LAYOUT-GRID_TITLE = 'EMPLOYEE TABLE DETAILS'.
       WA_LAYOUT-ZEBRA = 'X'.
       WA_LAYOUT-EDIT = 'X'.
    IF T_FCAT is  initial.
    *  wa_fcat-fieldname = 'EMP_ID'.
    *  wa_fcat-ref_table = 'ZEMPLOYEE'.
    *  wa_fcat-ref_field = 'EMP_ID'.
    *  wa_fcat-col_pos = 2.
    *  APPEND wa_fcat TO t_fcat.
    *  CLEAR wa_fcat.
       wa_fcat-fieldname = 'EMP_NAME'.
       wa_fcat-ref_table = 'ZEMPLOYEE'.
       wa_fcat-ref_field = 'EMP_NAME'.
       wa_fcat-col_pos = 3.
       APPEND wa_fcat TO t_fcat.
       CLEAR wa_fcat.
        wa_fcat-fieldname = 'EMP_DEPT'.
       wa_fcat-ref_table = 'ZEMPLOYEE'.
       wa_fcat-ref_field = 'EMP_DEPT'.
       wa_fcat-col_pos = 4.
       APPEND wa_fcat TO t_fcat.
       CLEAR wa_fcat.
          wa_fcat-fieldname = 'D_O_BIRTH'.
       wa_fcat-ref_table = 'ZEMPLOYEE'.
       wa_fcat-ref_field = 'D_O_BIRTH'.
       wa_fcat-col_pos = 5.
       APPEND wa_fcat TO t_fcat.
       CLEAR wa_fcat.
       wa_fcat-fieldname = 'D_O_JOIN'.
      wa_fcat-ref_table = 'ZEMPLOYEE'.
      wa_fcat-ref_field = 'D_O_JOIN'.
      wa_fcat-col_pos = 6.
       APPEND wa_fcat TO t_fcat.
       CLEAR wa_fcat.
    wa_fcat-fieldname = 'EMP_NO'.
      wa_fcat-ref_table = 'ZEMP_COMM'.
      wa_fcat-ref_field = 'EMP_NO'.
      wa_fcat-col_pos = 7.
       APPEND wa_fcat TO t_fcat.
       CLEAR wa_fcat.
       wa_fcat-fieldname = 'EMP_ADRESS'.
       wa_fcat-ref_table = 'ZEMP_ADRESS'.
       wa_fcat-ref_field = 'EMP_ADRESS'.
       wa_fcat-col_pos = 7.
       APPEND wa_fcat TO t_fcat.
       CLEAR wa_fcat.
       wa_fcat-fieldname = 'EMP_RES_ADDR'.
       wa_fcat-ref_table = 'ZEMP_ADRESS'.
       wa_fcat-ref_field = 'EMP_RES_ADDR'.
       wa_fcat-col_pos = 8.
       APPEND wa_fcat TO t_fcat.
       CLEAR wa_fcat.
       wa_fcat-fieldname = 'EMP_EDU1'.
       wa_fcat-ref_table = 'ZEMP_EDUCATION1'.
       wa_fcat-ref_field = 'EMP_EDU1'.
       wa_fcat-col_pos = 9.
       APPEND wa_fcat TO t_fcat.
       CLEAR wa_fcat.
    ENDIF.
    * CALL METHOD o_grid->register_edit_event
    *    EXPORTING  i_event_id = cl_gui_alv_grid=>mc_evt_modified.
    *    W_VARIANT-REPORT = SY-REPID.
    * Displaying the output
         CALL METHOD O_GRID->SET_TABLE_FOR_FIRST_DISPLAY
           EXPORTING
    *       IS_VARIANT                    = VARIANT
             I_SAVE                        = 'A'
            I_STRUCTURE_NAME       = 'i_tb'
             IS_LAYOUT                     = WA_LAYOUT
             it_toolbar_excluding  = lt_exclude
           CHANGING
           IT_OUTTAB                     =  emp_itb
             IT_FIELDCATALOG               = t_fcat
           EXCEPTIONS
             INVALID_PARAMETER_COMBINATION = 1
             PROGRAM_ERROR                 = 2
             TOO_MANY_LINES                = 3
             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.
    *call method cl_gui_control=>set_focus exporting control = O_GRID.
    *      call method cl_gui_cfw=>flush.
           CALL METHOD o_grid->set_ready_for_input
          EXPORTING
            I_READY_FOR_INPUT = 1.
      CALL METHOD O_GRID->REGISTER_EDIT_EVENT
         EXPORTING
           I_EVENT_ID = CL_GUI_ALV_GRID=>mc_evt_enter.
    *    EXCEPTIONS
    *      ERROR      = 1
    *      OTHERS     = 2.
    **** UPDATE zemployee FROM TABLE emp_itb.
      create object g_event_receiver.
       set handler g_event_receiver->handle_data_changed for o_grid.
    *  IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    *  ENDIF.
    ENDMODULE.                 " STATUS_0120  OUTPUT
    *&      Module  USER_COMMAND_0120  INPUT
    *       text
    MODULE USER_COMMAND_0120 INPUT.
    DATA LV_UCOMM TYPE SY-UCOMM.
    *  data: ok_code like sy-ucomm .
      LV_UCOMM = SY-UCOMM.
       CASE LV_UCOMM.
      WHEN 'CANCEL' OR 'EXIT'.
           PERFORM FREE_OBJECTS.
           LEAVE PROGRAM.
         WHEN 'BACK'.
            CALL METHOD o_grid->set_frontend_fieldcatalog
             EXPORTING
               it_fieldcatalog = t_fcat[].
            if o_grid is not initial.
        CALL METHOD o_grid->refresh_table_display
           EXCEPTIONS
             finished = 1
             OTHERS   = 2.
    endif.
           PERFORM FREE_OBJECTS.
           CALL SCREEN 110.
    *      SET SCREEN '0'.
    *      LEAVE SCREEN.
       ENDCASE.
    ENDMODULE.   
    Please help me to solve this porblem..

    Hi suhas,
    my issue is not the lack of data .....
    my issue is about the error handling in data_changed event in alv oops application....am able to display the error log using display_protocol method..,.. but after displaying the error log am still able to save the changes which should not happen....the thing is we should not be able to save the changes...... am having the same issue as the following thread
    Re: CL_ALV_CHANGED_DATA_PROTOCOL - Protocol Popup is not modal
    if u still require any clarifications...pls let me know ur mail-id ill post my code to u ..
    thanks
    suresh

  • Runtime Error - TABLE_FREE_IN_LOOP in editable ALV GRID

    While modifying editable ALV Grid, (CL_GUI_ALV_GRID) I am getting an unexpected dump as follows -
    "Runtime Error          TABLE_FREE_IN_LOOP".
       In a Editable ALV grid whenever new row is added using standard append row button, And while saving, i check for any initial values, in that case iam displaying a warning message. So after that when i try to modify the row, and press enter key, Iam getting this dump "TABLE_FREE_IN_LOOP".
    Can you please help on this regard.
    Thanks in advance..
    Best regards,
    Prasad.

    Hello Krishna
    take a additional internal table which is exactly of same type of the internal table which you want to modify . try modifying the second internal table. and then proceed for db update(if required).
    Regards,
    Suvendu

  • Editable ALV - how to raise errors ?

    Hi,
    I have a screen with some fields.
    And below it I have a custom container with an <b>Editable</b> ALV (<b>Classical</b> ALV).
    since the ALV is editable, the values entered gets validated. and upon finding a wrong entry, If I throw an error <b>from ALV</b>, the transaction aborts. The error is being raised from <b>data_changed_finished event</b>.
    I dont understand the reason why.
    Are you not supposed to raise an error through the ALV ?
    In the Data_Changed event, I chose the  cl_alv_changed_data_protocol object to write logs.
    But what if I need to raise an error else where in the alv flow.. say in user command of the alv.
    Rgds,
    Prashanth.

    Hi raja,
    Exactly like what zhenglin gu said. Error msg is thrown successfully. But if user tries to do anythign following that, like enter some other data or even a simple mouse click on teh alv, it aborts. No warning or message is thrown. it simply aborts.
    And there is nothign specific about the error message.
    Currently i have removed teh code for throwing the error msg.
    But nothing v specific abt it...
    Message e008(/NAM/NAE_MESSAGES).
    Seems like some problem with the way alv and the screen talk to each other or something like that ? Or is there a way to handle this ?
    Rgds,
    Prash.

  • Skipping domain errors in editable ALV

    Hi Gurus,
    Have a concern wrt an editable ALV.
    I have an editable ALV in which a field's(Chain ID is the name of the field) domain has
    fixed intervals. The fixed interval is defined as:
    T000000000     TZZZZZZZZZ
    S000000000     SZZZZZZZZZ
    Which means that the values for this field can start only with T or S. In the ALV, for this
    field I may have blank values getting displayed. If I enter a valid value in the ALV then
    its ok but when I delete the same value the ALV protocol shows an error 'Enter a valid
    value'. The system is interpreting the value to be 'entered' in the ALV as 'space' as its
    not valid as per the fixed intervals. BUt this actually should not happen because I am just
    undoing my change. Can anyone suggest a way so that this validation is skipped and the ALV thus can accept initial value?
    Thanks and Regards,
    Sravan.
    Edited by: sravan sriram on May 19, 2010 6:54 AM

    Skipping processing of the chain block will not stop the message from coming as the message is raised from the domain level. If you mean that among other things I need to delete that message from the protocol then in that case the changed value strangely does not get deleted. It comes back to the value which has been put before deleting it...

Maybe you are looking for

  • First ever smartphone.  Dropped calls, bad internet connection is this a bad phone or?

    This is my first smartphone ever.  It is an Apple iPhone 4.  I bought it with the understanding that I have 90 days to return it.  I have had it about a week now and am barely able to talk to anyone due to failed calls.  One of the reasons I bought i

  • How to do pivoting on part of an SQL output row in 10g

    Hi, I'm using Oracle 10.1.0.5.0. I would like to know what the general decode is for pivoting in 10g. I need to display PAGE_DISPLAY_NAME, ITEM_DISPLAY_NAME, ITEM_TYPE_DISPLAY_NAME essentially once and then display ATTRIBUTE_DISPLAY_NAME and ITEM_ATT

  • Safari 4 problems - HTMLDataSet/Sliding Panels

    Hi, I've been building a fairly basic photo gallery site and was having no problems with the site until I downloaded and installed Safari 4.  For some reason the detailRegions are not loading properly in Safari 4.  I have thumbnails in the sliding pa

  • .mov not displaying on a second computer

    On my Mac Pro, I have created a .mov at maximum resolution and size, using file>export>quicktime movie and selecting self-contained movies. This views fine as a QT movie on my Mac Pro. But when I move the file to my Mac Mini and try to play the file,

  • Photo within a photo

    Hi all, I'm new to the forum as well to Photoshop itself, so please pardon the newbee questions. In putting together art work for CDs and DVDs, I would like to put a small photo within a larger one. I assume you would overlap layers (?) But when I op