2023 Mar 31 7:22 AM
Hi, if someone knows how to add button at the salv table toolbar. I found 2 variants how to do it,but neither of them is works.
1. So first variant how to do it is cl_salv_functions_list->add_function( ) but it ends with dumb "
Class CL_SALV_FUNCTIONS, method ENABLE_FUNCTION not supported"
2) And 2 variant is to add an container in cl_salv_table=>factory( ). After i do it , alv doesnt show, it just stays on selection-screen. I found that i need to defind it at pbo of the selection-screen but it doesn't work, cause type of mine output table depends of the selection-screen values.
If there other ways to add a button?
2023 Mar 31 3:04 PM
You can set your own toolbar / status (GUI status) using method:
SET_SCREEN_STATUS (of class CL_SALV_TABLE)
But add_function( ) should work too. You have probably some mistake in your code?
2023 Mar 31 3:04 PM
You can set your own toolbar / status (GUI status) using method:
SET_SCREEN_STATUS (of class CL_SALV_TABLE)
But add_function( ) should work too. You have probably some mistake in your code?
2023 Mar 31 4:50 PM
Look at this answer to adapt your code: Method add_function does not display icon in toolbar
2023 Apr 01 11:06 AM
1)
ADD_FUNCTION normally dumps when you instantiate a full screen ALV instead of a container ALV (the way how you instantiate via CL_SALV_TABLE=>FACTORY). ADD_FUNCTION can work only with a container ALV. For full screen ALV you must use GUI Status and SET_SCREEN_STATUS.
Is it clear to you what are the differences between full screen ALV and container ALV?
2)
Please share your code (as minimal reproducible code), we'll tell you what your error is.
2023 Apr 01 2:12 PM
Hi shiz0frenik,
Please check-out this blog post on zevolving.com. I think it might answer your question.
Regards,
Bohdan