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

To report this post you need to login first.

9 Comments

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

    1. Alessandro Iannacci

      Basically there is no difference, it’s just another way to do it. Maybe you can be a little more flexible with the query conditions. And yes, on iPad will be difficult to run withouth context mapping

      (0) 
  1. Fernando Giroleti

    There is a very annoying limitation in standard TI headers, where we cannot apply such feature. I wish this could be addresses at some point in time. Also, with hyperlinks, OVS, etc…

    (0) 
    1. Victor Silva Post author

      Hello Will,

      There are some…

      1. Codelist can just have a Key and one Description. No other field is allowed

      1.1. Due to this limitation, Codelist cannot be used as the secondary level of the Dropdown dependency

      2. Codelist cannot be changed via KUT

      2.1. You can create BC View based on your BCO

      (0) 
  2. Kalaiselvan S

    Hi Victor Silva,

     

    Could you please help me out, how to achieve this dependent drop-down codelist mapping for XBO.

    I have using this in Goods and Activity confirmation XBO.

    Thanks,

    Kalaiselvan S.

     

     

     

    (0) 
  3. Jayant Saini

    Hi Victor,

    I am trying to replicate the scenario however after selecting the country, I am unable to select the state as its goes it infinite loading state(three dots keep moving). Is there anything I need to check?

    Thanks,

    Jay

    (0) 

Leave a Reply