‎2006 Dec 28 9:12 AM
Hi!
In a customer report I use the REUSE_ALV_GRID_DISPLAY function module to display the output in ALV.
I would like to enter a fixed sorting criteria which cannot be changed by the user (e. g. via the IT_SORT parameter). He/she shall however be able to sort further according to additional criteria.
Is there an exit or something similar to do this?
Regards
Bastian Rohde
‎2006 Dec 28 9:14 AM
Hi,
What you need to do is take out the SORT buttons from the application toolbar.
That can be done, by passing the function codes of the SORT buttons to the IT_EXCLUDING parameter of the function.
Regards,
Ravi
Note - Please mark all the helpful answers
‎2006 Dec 28 9:17 AM
I think u have to pass It_sort only and make use of IT_Excluding parameter ..see demo -
data : WA_SORT TYPE SLIS_SORTINFO_ALV.
perform sort_list.
form sort_list .
CLEAR WA_SORT.
WA_SORT-FIELDNAME = 'DOB'.
WA_SORT-SPOS = '1'.
WA_SORT-UP = 'X'.
WA_SORT-SUBTOT = 'X'.
APPEND WA_SORT TO IT_SORT.
CLEAR WA_SORT.
WA_SORT-FIELDNAME = 'NAME'.
WA_SORT-SPOS = '1'.
WA_SORT-UP = 'X'.
APPEND WA_SORT TO IT_SORT.
CLEAR WA_SORT.
endform.
Message was edited by:
Amit Tyagi
‎2006 Dec 28 1:41 PM
Hi!
Thank you very much for the quick replies.
However due to the fact that the user shall be able to sort according to other criteria I cannot hide the sort buttons.
But I found a parameter in the IT_SORT table which allows a criterion to be obligatory. The sort buttons obey this setting, but the layout button does not.
Therefore your tip with the excluding parameter was really helpful nevertheless.
I now excluded the layout button leaving the user with the sorting I want and only being able to add other sort criteria.
Thank you very much!
Regards
Bastian Rohde