Skip to Content

Hi All,

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.

                    Employee Structure.PNG

                   

                  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.

Assumptions: –

      1. The complex table ZCTEmployee is already created and required Java and ABAP codes are in place for the complex table.
      2. The transaction screen is ready with three UI elements.
        1. Grade-string
        2. Department-string
        3. Employee- Complex Table Drop Down

Solution:-

      1. We need to create 4 indexes for the complex table ZCTEmployee.
        1. EmpIDIndex(Unique)
        2. DepartmentIndex
        3. GradeByDepartmentIndex
        4. NameByGradeByDepartmentIndex
    • Please make sure the field and parent index are mapped properly as per the below screen shot.

                    CT-Index.PNG

                    2.  Make sure the transaction screen is designed as below and corresponding transaction is bound properly.


                             Screen.PNG

                    3.      Now our main intent is to pass the Grade & Department screen field values to the index of the complex table through cascade parent.

                                   CT-Field.PNG

                   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.

                             Rule-x.PNG

        • 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!!


Thanks,

Sudhir.

  


To report this post you need to login first.

4 Comments

You must be Logged on to comment or reply to a post.

Leave a Reply