Skip to Content

Create a dynamic codelist from BCO and BCC

Hello folks,

Hope you are doing great.

I’m blogging here because I saw no material centralizing how to create a field with dynamic dropdown being completed and determined from existing values in other fields.

So, first of all you need to create a new object

Define the follow field like below:

I fill with the follow values (for only example):

The data create above will be our reference field with the reference data.

So now, we need to create the second codelist. We will repeat the above step for the follow data:

Now we need to create the extended field in the BO.

For this example we will use the Customer Extended Object like below:

import AP.Common.GDT;

import AP.FO.BusinessPartner.Global;

[Extension] businessobject AP.FO.BusinessPartner.Global:Customer {

        // You must activate this business object before you can access the extension fields

        // or messages in script files, forms, and screens.


             node AddressInformation {



             node Common {

                    [Label(“Estado”)] element Estado:DEVESTADOCode;

                    [Label(“Cidade”)] element Cidade:DEVCIDADECode;



             node CurrentEmployeeResponsible {



Note that element type is the codelist create from BCO.

Save and actvate all objects.

In the final step we will create a Embedded Component to insert these fields.

So, go in the Create new item and select the follow option

After create then in your Solution use the double click and open then.

First of all, you will select in the “BO Browser” and field created in the Extended Business Object like below:

Drag and drop to the screen in the Design tab

Add the field

Drag and Drop the fields from Select Elements and your Data Model will be stay like below:

Now go to the Controller tab

In the Inport folder create a new Inport like below

Add new parameter and configure then like below:

So, with the Inport selected go to the “Properties” tab

Set the “RequestFireOnInicialization” to value “True”

And create a new event in the “OnFire” events

In the event “Inicialize” configure something like that:

For your referente to create one EC follow the video:

Cloud Application Studio: Add Facet (Embedded Component) based on BO Extensions – YouTube

In the last step, back to the “Data Model” tab and click with the right button in the “Cidade” field (the field that will be used from referenced field).

Select the option “Codelist Context Mapping”

Select the field used in the BCO referenced with the field Extended Bussines Object

Click “OK”.

Now Save and Activate your EC (Embedded Component).

The process is done.

In your test the field “Cidade” will bee populate from data selected in the “Estado” field like below:


You must be Logged on to comment or reply to a post.
      • Hi Anderson,

             After create Embedded Component, my screen is below, I can’t “select in the “BO Browser” and field created in the Extended Business Object”, and I can’t “drag and drop to the screen in the Design tab”.

             How can I do? Thanks.

        Best Regards.



        • Hi BIn,

          It will be on Right Hand Side of your UI Designer. And still if you are not able to see “BO Browser/Data Model” choose it from designer’s menu bar as follow:




        • As suggested by Saurabh the view is need to selected in the menu “View” to display like I explained.

          Try do what Saurabh suggested and if you have more any issues, back to us

  • Hi Anderson,

    Quicl Question: I tried the same excersice as described here, but both codelist are always empty. Any idea what I’m doing wrong?

    kind regards,


    • Hi Andres,

      Me too, it is empty in both codelist, what is the problem?

      Have you solved it? Could you share me your experience?

      Thanks a lot.


      • Hi experts & Andres,

        I get the reason, the project need to create a bacelement, change the question for reviewed it, and deploy it.

        Thanks a lot.


  • Hi Experts ,

    Its not working for me as well.

    @ Anderson – Hi , If possible please provide some more screen shots or pdf docs if you have.

    or give your skype ID So that I can ping you there for checking this.

    Ashish Sharma

  • My Requirement is , I need a drop down list ONLY without an EC and in which whenever required

    I can add the values.

    Can I do this using this ?

    Please help.

  • /
  • Hi Anderson & experts,

    Now I do the code list with Embedded Component, as the picture:

    But the UI is just running when I edit the parentID record.

    The problem:

    If I add a new parentID record, before save the parentID record, it can’t add the child record.

    What can I adjust the UI?

    Thanks a lot.

    Best Regards,



    Hi Anderson,


    Nice Blog. Thanks for sharing. We have a situation to maintain the Code List for the Custom BC.

    But, trying to find the Patch in Fine-tuning to maintain Code List for the custom BCC/BCO (though “Values can be added or Deleted in Fine-Tuning” option is selected in BCC.

    Where do you maintain BCC value in fine-tuning please? I could not find the patch solution name listed or any suitable option for maintaining Code List listed in Fine-Tuning.

    Appreciate your help and early response.




    Hi Anderson,


    Any inputs for my earlier query please?

    Since maintaining values via fine-tuning not possible (or seems to me as of now), I have maintained these values manually.

    What I am noticing is the dependent dropdown is working perfectly – filtering based on the parent dropdown value selection.

    Only issue is dependent dropdown only shows Code values in the drop down (in both columns) – though in “CodePresentationMode” property for the EC field, have selected “CodeandValue”.


    Can you please advice. Appreciate your early response.



    Sampath Kumar N