Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
former_member200925
Active Participant

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

And create a "Business Configuration Object":

Define the follow field like below:

Important: If you want to show in the screen the description you need to set in the "Field Type" the value "Description", if you do not set this value the information was displayed is the code.

The second step is to create "Business Configuration Set" 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:

Import: set the second field in as the "Code" value in "Data Type"

Create the BCC of the BCO create above

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

Now go to the Data model tab

Create Data structure like below

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:

Regards

19 Comments
Former Member
0 Kudos

Great tutorial! Thank you! 🙂

Former Member
0 Kudos

Hi anderson.balieiro,

Great documentation .......Thanks for sharing ...........

former_member200995
Contributor
0 Kudos

Hi Anderson,

     I can not follow this step, I can not get the ,thanks.

    

former_member200925
Active Participant
0 Kudos

Bin, whats appears for you ?

former_member200995
Contributor
0 Kudos

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.

    

    

Saurabh_Kabra
Participant
0 Kudos

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:

Thanks

Saurabh

former_member200925
Active Participant
0 Kudos

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

former_member232970
Participant
0 Kudos
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,

Andres
former_member191213
Participant
0 Kudos
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.

Thanks
Ashish Sharma
 
former_member191213
Participant
0 Kudos
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.
former_member200995
Contributor
0 Kudos
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.

Benny
former_member200995
Contributor
0 Kudos
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.

Benny
former_member200995
Contributor
0 Kudos
Hi experts,

It need the step:



Best Regards,

Benny

 
former_member200995
Contributor
0 Kudos
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,

Benny
former_member200995
Contributor
0 Kudos
Hi Anderson & experts,

I using the UUID as the parameter, it is OK.

Now I using the CustomBO as:



If using the "shadow" BO, which step I need to do?

Thanks a lot.

Benny
former_member200995
Contributor
0 Kudos
Hi Anderson & experts,

I using the “shadow” BO, the list cann't add row, but I don't know what is the problem, could you help me? Thanks a lot.

The result, add row is disabled



the init eventhandler as



the inport as



the datamodel as



Benny
former_member200995
Contributor
0 Kudos
Hi Anderson & experts,

It is OK, view the Stefan's blog: https://blogs.sap.com/2014/04/02/sap-application-studio-1402-add-ec-with-custom-bo-to-standard-scree...

Thanks a lot.

Benny
0 Kudos
 

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.

Thanks

Sampath
0 Kudos
 

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.

 

Thanks

Sampath Kumar N
Labels in this area