cancel
Showing results for 
Search instead for 
Did you mean: 

How to assign a ON_FUNCTION to button generated by self deifned function

Former Member
0 Kudos

Hello,

I have created a self defined function and added it in toolbar of ALV.

I need to attach a event ON_FUNCTION of SALV_WD_TABLE with that button generated by self defined function and call event handler.

pl can tell you how to recognize that event is created wrt a particuler button if there are multiple buttons created by self defined function.

I have gone through the sdn help of self defined fucntion generation and struck up at ON_FUNCTION event registeration with that self defined function.

Pl can anyone one of you suggest on this

thanks in advance,

Sharada

Accepted Solutions (1)

Accepted Solutions (1)

former_member215843
Active Participant
0 Kudos

Hi Sharada,

1. define a method in your component (e.g. in the component controller), declare it as an eventhandler, press F4 in the corresponding Event column, choose the ALV component usage with Event ON_FUNCTION.

2. In the implementation of this method, there is a parameter r_param, and r_param->id contains your function name.

  
case r_param->id.
    when 'MY_FUNCTION1'.
...
    when 'MY_FUNCTION2'.
...
endcase.

Ciao, Regina

Answers (0)