Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
victorsilva
Product and Topic Expert
Product and Topic Expert
2,979

Dear community,

I see that this topic is kind of spread on some discussions inside of the community. I am creating this document in order to unify the knowledge.

The objective of this document is to present how to create a dependent Drop Down list.

See also Create a dependent dropdown without context mapping

* TODO: Check PROS and CONS on with/without context mapping.

In this example I'll use a new BCO for Country and another for State.

1. Create BCO and BCS for your Code Lists (you can also use standard ones)

* Note that on State you will have to create an Attribute of Type "Code" and Subtype as your first level Code List.


* Note that the Key must be Unique. So if you want meaningful Keys, you'll have to combine the first and second Keys.

2. Create the Codelist Context Mapping on UI Designer

Go on the field under the Data Model, Right Click and define the dependency.

3. Final result

* In case you need a "live update" on your dependency, you will need to make your First level Codelist as Round Trip True.

Note that it goes against SAP Cloud Application Studio Performance Best Practices

Have fun! :smile:

11 Comments