I have been trying my luck at WebDynpro and moving from ABAP to Java is definitely not a piece of cake. Things which were in-built in ABAP are much difficult to display in Java. Many of the users who do a paradigm shift from SAP R/3 Client to Web Client; usually seek a similar User Interface. Like all aspects in life, anything less is simply unacceptable.
I do have a big list to explore, and I started out with simple stuff. I am sure there are many guys out there who find this weblog a little too trivial, but it took me quite a few days to figure out.
From these links and the examples quoted, in case you are unaware of Regular Expressions, you will come to know how much more powerful it is than the regular approach we carry out in ABAP world.
To have filter functionality in table in WebDynpro
Basic Java knowledge, WebDynpro Terminology, able to setup JCo connection successfully, able to fetch data from R/3 and have gone through the tutorials at SDN
The brief steps to have a filter are:
- First, we should be in a position to successfully extract data from R/3
- Dont do a context mapping of view context to component/custom controller used to fetch data i.e. for task a) you have created a component/custom controller and you have bound it with the model. In this case dont do a context mapping of this component/custom controller to view context. We will instead source data from component/custom controller and put it in the view context.
- Create a view context having a value node of cardinality 1…n and with relevant value attributes. In this example, they are Username, Firstname, Fullname, Lastname
- In the filter process, the value node is completely refreshed and then based on the filter criteria, data is sourced from component/custom controller and put in the view context
Only the filter functionality is explained below, it is assumed that table is already created.
First a method has to be created in the view. The method is FILTER and it is associated with the event onFilter of the UI Element MyFilterTable