cancel
Showing results for 
Search instead for 
Did you mean: 

Edit field in OOPS ALV on button click

sachin_jadhav8
Participant
0 Kudos

Hello All,

I have created an ALV using set_table_for_first_display, where one of the field is set to editable mode I have two buttons, one for save data and other to change data. Initially when the layout is displayed for first time, all the fields should be in non-editable mode and if user click on change button that particular field gets in editable mode.

How can I achieve this?

Regards,

Sachin

Accepted Solutions (0)

Answers (4)

Answers (4)

sachin_jadhav8
Participant
0 Kudos

Thanks for the help,

Regards,

Sachin

Former Member
0 Kudos

Hi Sachin,

Go through the below link

http://wiki.sdn.sap.com/wiki/display/ABAP/EditableALVthrough+OOPS

Former Member
0 Kudos

Check the below code to enable or disable user input for the Edit cells...


      IF GO_GRID->IS_READY_FOR_INPUT( ) EQ 0.
* Set edit enabled cells ready for input
        CALL METHOD GO_GRID->SET_READY_FOR_INPUT
          EXPORTING
            I_READY_FOR_INPUT = 1.

      ELSE.
* Lock edit enabled cells against input
        CALL METHOD GO_GRID->SET_READY_FOR_INPUT
          EXPORTING
            I_READY_FOR_INPUT = 0.
      ENDIF.

Former Member
0 Kudos

Hi Sachin,

That isnt so tough , use on user-command event and the button name( the button which is to be used for clicking and getting the desired result) , and then after that capture sy-ucomm and match them if they are equal use a method which is there in CL_GUI_ALV_GRID class with EDIT-FIEDNAME = 'X'.

And You will get the desired o/p.

Best Regards,

Daljeet