Editable ALV using FM REUSE_ALV_GRID_DISPLAY_LVC.

Hi Friends,
I have ALV with editable field and I am using FM REUSE_ALV_GRID_DISPLAY_LVC.
In this case I am unable to get data enter in editable column.
I have customize PF - STATUS for ALV.
Please guide me to resolve.
Thanks

hi  amit,
check this method...it records the changes done ....
CALL METHOD ref_grid->check_changed_data .
hope it helps..
regards,
somesh
Edited by: someshuttarwar on Nov 29, 2011 1:14 PM

Similar Messages

  • Editable alv using checkboxes.

    Hi All,
    I am working on editable alv using checkboxes.I have few requirements.
    1) i have all checkboxes in my row.If i select the Row fieldname all of my checkboxes hsould be checked.
    2) in my internsl table i have field called comments.If comment field has space i need to disable the checkbox.If comment is filled then i need to enable the chekkbox.
    Field catalog need to be changed based on my internal table.
    Can anybody please let me know how can i solve the above issues.
    Thanks
    Swapna.

    1. There is no event for this (row of column), so this will not be possible.
    2. Check report BCALV_EDIT_05.

  • Editable alv using OO ALV(newly edited row values are not updating )

    Hi friends,
    i am facing a problem. i am displaying an output alv  using OO ALV.
    i am creating a new row and validating the newly created row values and changing if it is not according to the criteria. but the newly edited values are not capturing in method
    pr_data_changed->mt_inserted_rows as it contains values only entries entered for the first time .
    i am not getting the newly edited values in it.
    please do the needful.
    Thanks and Regards,
    srinivas

    Hi!
    to rectify the problem in the Code.....
    You can Go through this program....for changed values....
    https://wiki.sdn.sap.com/wiki/x/AwBIBQ
    Regards.

  • Editable ALV using OO concept

    Hi Experts,
    We have a  requirement for an editable ALV grid where the values can be changed in the ALV and needs to be validated.
    Once the user has made an entry in the ALV grid,
    Even if the user has entered values in all the cells, It should throw error log only for the rows selected  by the user .
    Once the user has made correct entry in the field ( the row which was selected earlier and throwing error ), then the error log should be emptied and it should allow for processing.
    Please help us on this requirement, if possible with the code.
    Thanks in Advance,
    Vidya
    Edited by: vidya vidya on Oct 16, 2009 8:30 AM

    Hi,
    in the wiki (code gallery) you can find several examples.
    e.g.
    http://wiki.sdn.sap.com/wiki/display/ABAP/InteractiveEditableOOALVgridwithdynamicitab,FCATandENTERkeyeventtrigger
    Best regards.

  • Editable ALV Using SALV Class.

    Hi Experts,
    I need to make ALV Editable using SALV Class only.
    Thanks in Advance
    Regards,
    Ankit.
    Moderator message: please do some research before asking.
    Edited by: Thomas Zloch on Feb 25, 2011 1:47 PM

    Hi Aniket,
    This is a restriction and not provided in SALV class.
    Please have look at the earlier posts in SCN .
    Thanks.

  • Save in Editable ALV using OO

    Dear Gurus ,
    I made an ALV to be editable using OO but i  can't save .
    I read the articles here but i can't understand very well .
    Does anyone has the code for save only ....
    Thanks ..

    Hi,
    Please refer How to capture user entered values from an input enabled ALV grid?
    Regards
    Marcin

  • Issue with editable alv using  cl_gui_alv_grid

    Hello all,
    its a table update program . user can save create new entry and delete the entires . the screen should be avaiable for multiple time inputs by the user . i achived it by  method handle double click and i am refreshing the scrren and making the alv for ready for input . but user wants the screen shoukld get refreshed automatically once user clicks on save button .
    how can I achive plz advise .
    I am working on ALV by cl_gui_alv_grid , I am using the followingmethods of the class
    1)  METHODS:  handle_toolbar FOR EVENT toolbar OF cl_gui_alv_grid
                  IMPORTING e_object e_interactive.
    2)     METHODS:     handle_user_command FOR EVENT
                     user_command OF cl_gui_alv_grid
                     IMPORTING e_ucomm,
                     check_changed_data.
    3)     METHODS:      handle_double_click FOR EVENT
                      double_click  OF  cl_gui_alv_grid
                      IMPORTING e_row e_column.
    4)    METHODS: handle_data_changed
                  FOR EVENT data_changed OF cl_gui_alv_grid
                  IMPORTING er_data_changed.
    Thanks in advance .

    Hi Soumyaprakash,
    SAve is an user command . I want to have the values which are changed by the user and again the output should be ready for any actions like change the data , create new and delete any entry .
    basically  the alv output screen should be reday for inputs any number of times untill user clicks on back button .
    Thanks
    Basavaraj

  • [Editable ALV] Using deep context

    Hi,
    I am using a deep context (I have subnodes in my context that are not shown on the ALV). I use the subnodes to display list of data that I called from a button in the ALV, thus it makes sense (at least to me) to have it there in the context.
    When using subnodes, you have to be careful when you modify your context, do not use BIND_TABLE to fill your context because it will simply get rid of those subnodes. Go through all of your elements and use BIND_ELEMENT instead.
    Everything was working fine until... I tried to sort one of the columns. It actually messes up with my context by deleting these subnodes! 
    I guess it is using the BIND_TABLE method somewhere.
    Have you guys crossed this problem?
    Is there a "clever" solution to this? (a naive one would be to simply use a concatenation of all subnodes values and re-build the subnodes every so often).
    Thanks in advance.
    Best regards,
    Guillaume

    1. There is no event for this (row of column), so this will not be possible.
    2. Check report BCALV_EDIT_05.

  • Enable User Defined toolbar button on click -  editable alv grid using oops

    Hi all,
    I  have created editable alv using  oops concept.
    created 2 user defined toolbar button save and print using method toolbar
      ls_toolbar-text      = 'Print'.                         "#EC NOTEXT
        ls_toolbar-quickinfo = space.
        ls_toolbar-checked   = space.
        APPEND ls_toolbar TO e_object->mt_toolbar.
    requirement is
    initially print button should be disabled, and save enabled
    when i click save button, print button should be enabled.
    I want coding in editable alv oops concept
    kindly help
    regards
    senthil kumar

    Halo Senthil,
    You should call set_toolbar_interactive method of cl_gui_alv_grid in the on_user_command( ie the event handler for event user command) .
    method on_user_command.
    case e_ucomm.
    when 'SAVE'. or whatever your function code is .
    my_save_flag = 'X'.
    call method grid->set_toolbar_interactive.
    endmethod.
    This triggers the toolbar event of the
    cl_gui_alv_grid. Inside the eventhandler method ( ie the on_toolbar method ) you should set the toolbar.
    if my_save_flag = 'X'.
    read table e_object->mt_toolbar
    clear l_toolbar-disabled.
    modify e_object->mt_toolbar.
    endif.
    e_ucomm will not have  the function code if the save button is not in the toolbar area.
    then you can set the my_save_flag in the data_changed event handler of the Cl_gui_alv_grid.
    Regards
    Arshad

  • Issue in Editable ALV

    Hi Leads,
    I am working on Editable ALV using REUSE_ALV_GRID_DISPLAY_LVC.
    But, my requirement is I need to track the changes in Report.
    After editing the ALV report, I need to update the data base with the changed records and Need to display them as One more Report.
    Can you please suggest me any to resolve my issue?
    Thanks,
    Sandeep

    You may need to check
    http://wiki.sdn.sap.com/wiki/display/Snippets/UpdatingtheInternalTable-AfterEditinALVusingFunctionModules

  • Search help for date field in Editable ALV

    Hello Friends,
    I am using editable alv using 'reuse_* '.
    I have used date as input field. While creating fieldcatlog also i have  declared dat as a mkpf-budat.
    But i am not getting serach help for date in output.
    Is it possible with reuse or i have to go by object oriented ?

    Hi,
    Just pass the Edit option of the fieldcatalog for those specific fields...
    fcat-edit = 'X'.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program       = sy-cprog
          i_callback_pf_status_set = 'PF_STATUS_SET'
          i_callback_user_command  = 'USER_COMMAND'    "<----  pass this
          i_callback_top_of_page   = 'TOP'
          is_layout                = it_layout
          it_fieldcat              = it_fcat
          i_default                = 'X'
          i_save                   = 'A'
          it_events                = it_event
        TABLES
          t_outtab                 = it_final
        EXCEPTIONS
          program_error            = 1
          OTHERS                   = 2.
    *&      Form  USER_COMMAND
    *       text
    *      -->R_UCOMM      text
    *      -->RS_SELFIELD  text
    FORM user_command USING r_ucomm LIKE sy-ucomm
                            rs_selfield TYPE slis_selfield.
      CASE r_ucomm.
        WHEN '&DATA_SAVE'.                "<-------check this
          PERFORM save_data.
      ENDCASE.
    ENDFORM.                    "USER_COMMAND

  • Regarding editable alv

    Hi all,
              Frnds i am working in editable alv using function modules not object oriented abap.
    i m trying to edit a Field(MATNR ) in my output list and finally update it with changed values in the DB table.
    But i m getting syntax error like
    "the work area i_final is not alligned properly
    below i m providing my code.
    <code>
    *& Report  ZEDITABLE_ALV1
    REPORT  ZEDITABLE_ALV1.
    TABLES: vbak,vbap.
    TYPE-POOLS: slis. "ALV Declarations
    data: BEGIN OF i_final occurs 0,
          vbeln like vbap-vbeln,
          posnr like vbap-posnr,
          matnr like vbap-matnr,
          erdat like vbap-erdat,
    END OF i_final.
    DATA : C_X(1) TYPE C VALUE 'X',
           C_FC_MODIFY(6) TYPE C VALUE 'MODIFY'.
    *DATA: i_final TYPE STANDARD TABLE OF T_FINAL with header line.
         i_temp type standard table of T_FINAL with header line.
    *wa_final like line of i_final.
    *DATA:i_final LIKE vbap OCCURS 0.
    *DATA:wa_final LIKE vbap.
    *ALV data declarations
    DATA: fieldcatalog TYPE slis_t_fieldcat_alv WITH HEADER LINE,
    gd_tab_group TYPE slis_t_sp_group_alv,
    gd_layout TYPE slis_layout_alv,
    gd_repid LIKE sy-repid.
    *Start-of-selection.
    START-OF-SELECTION.
    PERFORM data_retrieval.
    PERFORM build_fieldcatalog.
    PERFORM build_layout.
    PERFORM display_alv_report.
    *& Form BUILD_FIELDCATALOG
    *•     Build Fieldcatalog for ALV Report
    FORM build_fieldcatalog.
    fieldcatalog-fieldname = 'VBELN'.
    fieldcatalog-seltext_m = 'sales order'.
    fieldcatalog-col_pos = 0.
    APPEND fieldcatalog TO fieldcatalog.
    CLEAR fieldcatalog.
    fieldcatalog-fieldname = 'ERDAT'.
    fieldcatalog-seltext_m = 'date'.
    fieldcatalog-col_pos = 1.
    APPEND fieldcatalog TO fieldcatalog.
    CLEAR fieldcatalog.
    fieldcatalog-fieldname = 'MATNR'.
    fieldcatalog-seltext_m = 'material no.'.
    fieldcatalog-col_pos = 2.
    fieldcatalog-edit = 'X'.
    APPEND fieldcatalog TO fieldcatalog.
    CLEAR fieldcatalog.
    fieldcatalog-fieldname = 'POSNR'.
    fieldcatalog-seltext_m = 'line item no.'.
    fieldcatalog-col_pos = 3.
    APPEND fieldcatalog TO fieldcatalog.
    CLEAR fieldcatalog.
    fieldcatalog-FIELDNAME = 'REC_SEL'.
    fieldcatalog-NO_OUT = C_X.
    APPEND fieldcatalog TO fieldcatalog.
    CLEAR fieldcatalog.
    ENDFORM. " BUILD_FIELDCATALOG
    *& Form BUILD_LAYOUT
    *•     Build layout for ALV grid report
    FORM build_layout.
    gd_layout-no_input = 'X'.
    gd_layout-colwidth_optimize = 'X'.
    gd_layout-totals_text = 'Totals'(201).
         gd_layout-totals_only = 'X'.
         gd_layout-f2code = 'DISP'. "Sets fcode for when double
         "click(press f2)
         gd_layout-zebra = 'X'.
         gd_layout-group_change_edit = 'X'.
         gd_layout-header_text = 'helllllo'.
    ENDFORM. " BUILD_LAYOUT
    *& Form DISPLAY_ALV_REPORT
    *•     Display report using ALV grid
    FORM display_alv_report.
    gd_repid = sy-repid.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    i_callback_program = gd_repid
    i_callback_user_command = 'USER_COMMAND'
    i_callback_pf_status_set = 'GUI_STAT'
    *i_grid_title = outtext
    is_layout = gd_layout
    it_fieldcat = fieldcatalog[]
    *it_special_groups = gd_tabgroup
    *it_events = it_events
    i_save = 'X'
    *is_variant = z_template
    TABLES
    t_outtab = i_final
    EXCEPTIONS
    program_error = 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.
    ENDFORM. " DISPLAY_ALV_REPORT
    **& Form DATA_RETRIEVAL
    *•     Retrieve data form EKPO table and populate itab it_ekko
    FORM data_retrieval.
    *SELECT avbeln aerdat bmatnr bposnr FROM vbak AS a
    *INNER JOIN vbap AS b ON avbeln = bvbeln
    *INTO TABLE i_final WHERE a~vbeln = b~vbeln.
    select VBELN ERDAT MATNR POSNR up to 10 rows from vbap into corresponding fields of  table i_final.
    ENDFORM. " DATA_RETRIEVAL
    *•     FORM GUI_STAT *
    *•     --> RT_EXTAB *
    FORM gui_stat USING rt_extab TYPE slis_t_extab.
    SET PF-STATUS 'MODIFY' EXCLUDING rt_extab.
    ENDFORM.
    *•     FORM USER_COMMAND *
    *•     --> U_COMM *
    *•     --> RS_SELFIELD *
    FORM user_command USING u_comm LIKE sy-ucomm
    rs_selfield TYPE slis_selfield.
    DATA:selfield TYPE slis_selfield.
    *RS_SELFIELD-REFRESH = C_X.
    CASE u_comm.
    *IF U_COMM = C_FC_MODIFY.
    WHEN 'UPDATE'.
    LOOP AT i_final. " into wa_final."into wa_final.
    *READ TABLE I_TEMP WITH KEY VBELN = I_FINAL-VBELN.
    *IF SY-SUBRC = 0.
    i_final-matnr = vbap-matnr.
    *MODIFY I_final INDEX SY-TABIX.
    *ENDIF.
    ENDLOOP.
    *ENDIF.
    MODIFY VBAP FROM TABLE i_final.
    IF SY-SUBRC = 0.
    COMMIT WORK AND WAIT.
    *MESSAGE I000 WITH SY-DBCNT
    *' Record(s) has been Updated'(020).
    ENDIF.
    *append i_final.
    *it_temp = i_final.
    *append it_temp.
    **UPDATE sflight FROM TABLE sflight_tab.
    *ENDLOOP.
    *update vbap from table i_final.
    *IF sy-subrc = 0.
    *MESSAGE s000(0) WITH 'records updated successfully'.
    *ENDIF.
    ENDCASE.
    ENDFORM.
    </code>
    Frnds plz help me in this regard.
    Thanks,
    satya

    Try something like this...ur code was not clear..i have done something u can understand.
    First check that u r not trying to update the primary key field.
    first before updating.
    Before updating select the record u r going to update from the main table.
    select single * from VBAP where <pass the key values>.
    if sy-subrc = 0.
    move the rest of the values to the table header except the key values.
    vbap-<field1> = value1.
    vbap-<field2> = value2.
    after moving the values.
    update <table>.
    if sy-subrc = 0.
    commit work.
    endif.
    data:st_vbap type vbap.
    WHEN 'UPDATE'.
    LOOP AT i_final. " into wa_final."into wa_final.
    select single * from vbap where vbeln = I_FINAL-VBELN.
    move-corresponding i_final to vbap.
    update vbap.
    if sy-subrc = 0.
    commit work.
    wk_cnt = wk_cnt + 1.
    endif.
    at last.
    *MESSAGE I000 WITH SY-DBCNT
    *' Record(s) has been Updated'(020).
    endat.
    endloop

  • Get data in editable ALV back to internal table without data_changed ev?

    Hi,
       I have an editable ALV using classes to whch I have users the option to edit directly on the screen or upload data from an excel. The event data_changed gets triggered when users edit the table on the screen.
    However when EXCEL is uploaded, I refresh the table display. So, I need a way to get the data from the ALV into a internal table to check which rows were update using the excel and save them into the db table.
    Prakash

    Hi!
    For more information, inspect programs suiting the mask "BCALVEDIT*" and the thread with header "How to make a row of ALV editable " (I know this is some more steps further from your demand but it may be useful) at URL " How to make a row of ALV editable " .
    If you want to study more BC412 "EnjoySAP Controls" may help you.
    *--Serdar

  • Update out_tab data in editable ALV

    Hi,
    I am working on editable ALV using oops. I want to insert the data into database tables after user insert the data in ALV based on the application tool bar button action.
    How to refresh the data in out_tab, If user click the application tool bar button then I need to save the ALV grid data in database table.
    Please give me the valuable suggestions.
    - Rayudu

    solved my self

  • Event Handling in Editable ALV

    Hi all,
    I am having 4 to 5 fields in my module pool screen and at the same time i am having a custom container wherein, there is editable ALV [using OOPS Editable ALV inside a custom container].
    Here in editable ALV, i am having an editable field called dealer code.When i enter dealer code in editable ALV and press enter
    my dealer name and dealer address in editable ALV inside Custom Container should get populated.
    But when the cursor is inside the custom container in that editable field none of my screen eventsModule pool events
    are getting triggered [Hence my values are not getting populated.When the cursor is outside the custom container all my module pool events are working fine, hence values are getting populated....
    *I am handling the event in my program.But i don't know where exactly i should create object and handle this as
    nothing is getting triggered[pai or pbo] when my cursor is inside the custom container.
    Could you suggest me anything...*
    Waiting for your repiles...

    Hi
    First of all you need to creat object in PBO.
    You must be calling method SET_TABLE_FOR_FIRST_DISPLAY.After this call method REGISTER_EDIT_EVENT.And then REFRESH_TABLE_DISPLAY.
    In OK code create an OK code with name "OK".This is for ENTER key.
    And in that call method CHECK_CHANGED_DATA.
    Sample code for REGISTER_EDIT_EVENT is given below:
    *--event to detect if data gets edited
      CALL METHOD OBJ_ALV2->REGISTER_EDIT_EVENT
        EXPORTING
          I_EVENT_ID = CL_GUI_ALV_GRID=>MC_EVT_MODIFIED
        EXCEPTIONS
          ERROR      = 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.
    Sample code for CHECK_CHANGED_DATA
    *--when alv is edited and ENTER button is clicked then data
    *will be saved in internal table and edited data will
    *be displayed on alv
      IF V_OK_CODE = 'OK'.
    *--metohd to detect if data was changed in oops alv
        CALL METHOD OBJ_ALV2->CHECK_CHANGED_DATA
         IMPORTING
           E_VALID   =
         CHANGING
           C_REFRESH = 'X'
      ENDIF.
    Hope this solves your problem.
    Thanks
    Khushboo

Maybe you are looking for

  • Mac Mini (Mid 2011) display artifacts HDMI to DVI at native res

    Hello, I recently changed monitor configurations and in the process moved my Mac Mini (Mid 2011) to a HP LP2065 monitor.  The connection is made through the stock supplised HDMI to DVI adapter.   The monitor and the DVI cable work successfully with o

  • Apple DVD player not working on Mid 2011 iMac running 10.7.2

    I have a 21.5-inch, Mid 2011 iMac which came with Lion preinstalled.  When I insert a DVD, Apple's DVD player comes up with the following error: "A valid video device could not be found for playback. [-70017]" The DVD player works.  I can play DVDs u

  • Not able to send files to my Mac via bluetooth.

    Hey i have mac os x 10.5, i am not able to sen files to my mac from my blackberry 8520. I have paired my bb and mac but when i try to send files from my bb it says "Failed to find service". Please help. Thanks.

  • Drag and Drop to matching area

    I have am image that has been sliced and each slice has been made into a movie clip and put into an selectImage: array. I have matching movie clips also put into a (parell) matchImage:array. I am trying to drag each movieclip onto it's matching movie

  • 4gb RAM vs 8gb

    Because of education pricing, I have the option to add 4gb RAM to the 2.5ghz 13" MBP for 90 bucks, for a total of 8gb RAM. Is it worth it?