Applying multiple filters on a complex table at the same time.
We came across a such scenario in our project. After doing a lots of exploration we found the solution, So thought of to share with you all.
Problem Statement: – Sometimes we come across a scenario where we need to apply multiple filters at the same time on a complex table.
Scenario: – Suppose we have a complex table ZCTEmployee with the following structure.
Let’s say we have a requirement to display the employees in a drop down on a Transaction screen, who matches a certain criteria.
E.g. The employees need to be populated in the drop-down, who belongs to X department and with grade A.
- The complex table ZCTEmployee is already created and required Java and ABAP codes are in place for the complex table.
- The transaction screen is ready with three UI elements.
- Employee- Complex Table Drop Down
- We need to create 4 indexes for the complex table ZCTEmployee.
- Please make sure the field and parent index are mapped properly as per the below screen shot.
2. Make sure the transaction screen is designed as below and corresponding transaction is bound properly.
3. Now our main intent is to pass the Grade & Department screen field values to the index of the complex table through cascade parent.
4. Now we will write a rule to pass both the screen field values(Grade & Department) to the index of the complex table, which is very interesting.
- Here NEWLINE plays a major role.
Conclusion :- NEWLINE allows to return more than one value from a rule.
I hope this article will helpful.
Have a nice day!!