This article on SDN shows a filtering example.
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/3367e690-0201-0010-d285-c69bd884c9f3
There is a link in the article containing the source code but it does not work.
https://www.sdn.sap.com/sdn/downloaditem.sdn?res=/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/business_packages/a1-8-4/staticfiltering.zip
Do you know where I can find the source code ?