cancel
Showing results for 
Search instead for 
Did you mean: 

What Custom button in ALV has been clicked?

Former Member
0 Kudos

Hi Experts,

I have written one WDC where in i have created an ALV with two custom buttons in it. One is to Search the company code with Function code as 'SEARCH', and the other is to export the result in to an excel file, this button function code is 'EXPORT'.

I have created these two buttons in the WDDOINIT method of the view, say MAIN.

I have created a method, say 'function_button' in the MAIN for the event ON_FUNCTION, to handle any events that happens on these custom buttons.

The problem is whatever the customized button i click in the ALV the entire code of the method 'FUNCTION_BUTTON' is being executed.

Now, I want to get the function code of the button clicked in my ALV, so that i can only execute the portion of the code that needs to be executed.

Please let me know the ways to tackle this problem.

Thanks in advance.

Good day!

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Shashi,

Check the following blog to handle ALV custom function.

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/101df93f-4b5c-2910-14aa-9eb0338c...

Regards,

Karthick S