Skip to Content

Create a dependent dropdown with context mapping

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)

bco-country.PNG

bco-state.PNG

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


bcs-state.PNG

* 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.

Codelist-Context-Mapping.PNG

codelist-mapping.PNG

3. Final result

front-end.PNG

* 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! 🙂

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