11-20-2023 6:46 AM
Hello everyone
How can I assign "CTRL + F" as a shortcut to the "Find" button in "CL_GUI_ALV_GRID".
Thanks for your answers in advance
11-22-2023 12:24 AM
'CTRL + F ' was not assigned as a shortcut key in the 'FIND(SEARCH' button in the standard
toolbar of 'CL_GUI_ALV_GRID' and I actually wanted to ask how to assign it.As a solution,I activated
the 'FIND' button in 'GUI-PF-STATUS' and assigned the shortcut 'CTRL + F' .Then in 'PAI' where it was
triggered,I ran the standard '%SC' in the 'SET_FUNCTION_CODE' method of 'CL_GUL_ALV_GRID'.Sorry in advance for the translation. :).
MODULE user_command_0100 INPUT.
IF sy-ucomm ='FIND'.
DATA(fcode)= CONV syucomm('%SC').
go_grid->set_function_code(CHANGING c_ucomm = fcode).
ENDIF.
ENDMODULE.
11-20-2023 7:31 AM
CTRL+F is default for "SEARCH" , as far as i know, it can't be used in custom buttons etc.
However, it searches values from your ALV.
11-20-2023 8:01 AM
As Ctrl+F is part of standard Dynpro GUI Status, maybe you can define it in the GUI Status and call the method FIND of your ALV Grid when it's pressed?
11-20-2023 10:48 PM
Thanks For Your Answers Guys....
Sandra Rossi,as you said,enable 'FIND' button in 'GUI' and then in 'PAI'
DATA(fcode) = CONV syucomm( '%SC' ).
go_grid->set_function_code( c_ucomm = CHANGING fcode).
11-21-2023 10:21 AM
hsynylmz32 Thanks for the feedback, it was just a guess from me, could you convert your comment into an answer please? (note that the ABAP code you have posted has currently an invalid syntax, so you should fix it; also maybe clarify a little bit, I don't understand very well how your code intercepts Ctrl+F of the GUI Status, and how you run the method FIND = your solution is completely different from the one I was thinking)
11-21-2023 4:18 PM
Hi Sandra Rossi....
'CTRL + F ' was not assigned as a shortcut key in the 'FIND(SEARCH' button in the standard
toolbar of 'CL_GUI_ALV_GRID' and I actually wanted to ask how to assign it.As a solution,I activated
the 'FIND' button in 'GUI-PF-STATUS' and assigned the shortcut 'CTRL + F' .Then in 'PAI' where it was
triggered,I ran the standard '%SC' in the 'SET_FUNCTION_CODE' method of 'CL_GUL_ALV_GRID'.
Sorry in advance for the translation. :).
11-21-2023 4:26 PM
Nice, I understand now, thank you for the clarification. Could you convert your comment into an answer please? (or post an answer with same text if you prefer).
11-22-2023 12:24 AM
'CTRL + F ' was not assigned as a shortcut key in the 'FIND(SEARCH' button in the standard
toolbar of 'CL_GUI_ALV_GRID' and I actually wanted to ask how to assign it.As a solution,I activated
the 'FIND' button in 'GUI-PF-STATUS' and assigned the shortcut 'CTRL + F' .Then in 'PAI' where it was
triggered,I ran the standard '%SC' in the 'SET_FUNCTION_CODE' method of 'CL_GUL_ALV_GRID'.Sorry in advance for the translation. :).
MODULE user_command_0100 INPUT.
IF sy-ucomm ='FIND'.
DATA(fcode)= CONV syucomm('%SC').
go_grid->set_function_code(CHANGING c_ucomm = fcode).
ENDIF.
ENDMODULE.
11-22-2023 7:54 AM
Just adding the code of your original comment (with more context). You may also edit your answer to embed it.
MODULE user_command_0100 INPUT.
IF sy-ucomm = 'FIND'.
DATA(fcode) = CONV syucomm( '%SC' ).
go_grid->set_function_code( CHANGING c_ucomm = fcode).
ENDIF.
ENDMODULE.
11-22-2023 7:55 AM