07-16-2008 8:11 PM
Hi experts,
I am using the FM REUSE_ALV_GRID_DISPLAY to display an ALV output. I have made one column editable to the user. Now i want to validate the value entered by the user in this editable field upon pressing enter on the ALV grid.
For e.g. if the user input a value in the editable column and presses ENTER on the keyboard, i want to validate the value input by the user.
Any inputs on this will be surely rewarded.
Thanks and Regards,
Nilesh.
07-16-2008 8:18 PM
Check tyhe sample code:
call function 'REUSE_ALV_GRID.....'
EXPORTING
I_CALLBACK_USERCOMMAND = 'USER_COMMAND'
FORM USER_COMMAND using p_ucomm like sy-ucomm.........
Data ref1 type ref to cl_gui_alv_grid.
CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
IMPORTING
E_GRID = ref1.
call method ref1->check_changed_data.
CASE p_UCOMM.
WHEN 'SAVE'.
ENDCASE.
ENDFORM.
Check sample code here also:
http://www.sap-img.com/abap/an-interactive-alv-report.htm
Do your validations in USER_COMMAND form-endform.
07-16-2008 8:45 PM
Pressing ENTER on the ALV grid does not trigger USER_COMMAND.
I have already try this option but this did not work. The control goes inside USER_COMMAND only when user presses some button on the application toolbar or elsewhere.
07-16-2008 9:07 PM
I doubt if its possible to validate without hitting any button.
does at selection-screen output event and user command combo help you.
07-16-2008 9:36 PM
Is it possible to link the ALV from REUSE_ALV_GRID_DISPLAY to OOPS alv? Can i call the methods of the cl_gui_alv_grid by creating a reference to this ALV?
07-16-2008 9:41 PM
other than calling the reuse FM you will call the cl_gui_* class and use the *first_display method.. then you can link to OO
11-04-2011 11:03 AM
03-31-2015 6:22 PM