Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Save(Ctrl + S) event is triggering in OOPS-ALV

Former Member
0 Kudos

Hai, I am trying to create ALV with input, where user updates values. Few Rows have to be disabled. I got the output but SAVE (CTRL + S ) Is not updating. I attached the code and required output. Thanks in advance. Prudhvi.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

I suppose none of the user-commands in your user_command form can work as you did not fill the  I_CALLBACK_USER_COMMAND parameter of REUSE_ALV_GRID_DISPLAY_LVC with the value 'USER_COMMAND'. Therefore the ALV does not know what to do when something happens in it.

5 REPLIES 5

Former Member
0 Kudos

I suppose none of the user-commands in your user_command form can work as you did not fill the  I_CALLBACK_USER_COMMAND parameter of REUSE_ALV_GRID_DISPLAY_LVC with the value 'USER_COMMAND'. Therefore the ALV does not know what to do when something happens in it.

0 Kudos

Thank you guys for all your  replies..   CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'     EXPORTING       I_CALLBACK_PROGRAM      = SY-REPID       I_CALLBACK_USER_COMMAND = 'USER_COMMAND'       IS_LAYOUT_LVC          = X_LAYOUT       IT_FIELDCAT_LVC        = IT_FIELDCAT     TABLES       T_OUTTAB                = IT_FINAL[]     EXCEPTIONS       PROGRAM_ERROR          = 1       OTHERS                  = 2.   IF SY-SUBRC NE 0.     MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO     WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.   ENDIF. I passed 'USER_COMMAND' TO I_CALLBACK_USER_COMMAND it worked. Thanks jozef.. 🙂

Mohamed_Mukhtar
Active Contributor
0 Kudos

Hi Prudhvi,

Kindly pass the  exporting paramenter I_SAVE = 'A' in the FM REUSE_ALV_GRID_DISPLAY_LVC and also fill the parameter I_CALLBACK_USER_COMMAND.

Thanks

raymond_giuseppi
Active Contributor
0 Kudos

You put the code that update the "style" of the row in the form that creates the field catalog, this code should be executed in a dedicated form called :

  • Initially after loading data and before first ALV display; for every record set enabled style.
  • After udpating record (in USER_COMMAND); for changed record set disabled style.

Regards,

Raymond

alessandroieva
Active Participant
0 Kudos

Hi

you use this method

    METHODS handle_data_changed
FOR EVENT data_changed OF cl_gui_alv_grid
IMPORTING er_data_changed.


in er_data_changed structure you have data of the cell in output. after, you update internal table with this data and update db in PAI .



Regards,

AI