cancel
Showing results for 
Search instead for 
Did you mean: 

Runtime Event

fabio_bellocchio
Participant
0 Kudos

Hi SND.

Please, how can I find out what is the routine of an Event which is created in runtime?

In details: in my application there is a button that is created by code (dynamically). By debugging, I found out that this button contains an ID of Function, which is "CREA_REC".

Also by debugging, I found out that, when pressed (in the application), this same button triggers a method that creates, in runtime, an "ON_ACTION" Event, called "CREA_REC" (the same name as the function ID of the Button).

But I can't find where is the Code of this Event!!! What does it do, and where is this written?

Has anyone already seen this kind of mechanism? How does it work?

Thank you very much!

Fabio

Accepted Solutions (1)

Accepted Solutions (1)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

You should create the actions at design time, even for buttons that are dynamically generated. That way you can code event handlers for them. When you build the button dynamically, connect it to your action by calling the SET_ON_ACTION method. Otherwise it appears that if you don't set the action name it must be generating one for you with the ID of the UI Element.

fabio_bellocchio
Participant
0 Kudos

Hi Thomas,

thank you!

Actualy, it wasn't me who designed the application, and it is very difficult to find where is the code of this Action!

You're right, I found the moment when the Action is created:

"lr_crearec_func = wd_comp_controller->wr_alv_config_tab->if_salv_wd_function_settings~create_function( id = 'CREA_REC' )."

and associated with the button:

"lr_crearec_func->set_editor( wd_comp_controller->wr_crea_button )."

But what happens when the user presses the button, it is still a mistery for me!

I could not find where it is programmed!

Tks!

abhimanyu_lagishetti7
Active Contributor
0 Kudos

check in the Method tab

third column event, there should an event of ALV interface controller called ON_FUNCTION

here the button click is handled

Abhi

fabio_bellocchio
Participant
0 Kudos

Done, Abhimanyu!

You've solved my problem!

Thank you very much!

Fabio

Answers (0)