Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

What Custom button in ALV has been clicked?

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!

Not what you were looking for? View more on this topic or Ask a question