Creating a context dependent code list.
Objective: Create a context dependent code list, extending a standard BO. In the present scenario I have taken Activity BO.
Process:
A. Create code lists. We need to create two code lists.
1. Context code list
Appointment type – Configurable code list with below values
Appointment type code |
Appointment type value |
1 |
Passport |
2 |
VISA |
2. Dependent code list
Appointment sub Type – Configurable Code list and values should be filtered based on Appointment Type
Appointment Type |
Appointment Sub Type Code |
Appointment Sub Type Value |
1 – Passport |
10 |
Official |
1 – Passport |
11 |
Regular |
1 – Passport |
12 |
Diplomatic |
2 – VISA |
21 |
Business Visa |
2 – VISA |
22 |
Tourists Visa |
These are not regular code lists.
Right click on your solution and create a new item, “Business Configuration object” for context code list. Enter appropriate name and values and activate it.
Right click on the “.bco” and create a “Business configuration Set”. Enter appropriate name and values and activate it.
Right click on the “.bco” and create a “Business Configuration View”.
Repeat the above steps for the Dependent code list – Appointment Sub Type.
B. Extend the BO and add the elements with the code lists as data types.
Enhance the screens to which you would like to add the code list fields to appear.
*Note: We cannot add the code lists directly to the screen. Code list mapping is not allowed on the standard screens. It can be done by adding the fields to an EC and then adding the EC to the screen.
C. Create an embedded component.
Add the extended fields from the BO Browser to the embedded component section group.
Create an InPort for data flow.
Create a context mapping between the code lists. In the “data model” tab in EC, right click on the dependent code list and create a code list context mapping.
This step will link both your code lists.
Note: This function doesn’t give proper results in silverlight mode. In HTML and responsive UI it works properly.
Hi Praveen,
I tried with all the given steps properly but there is no data in both the code list. Please refer the below image.
Please help me and let me know where I m wrong
Hi
Did you deployed Business configuration? first try to test with SDK user.
Later after scoping of solution you can test for business user.
Regards
Sunil
Hi Sunil,
Thanks for your reply. I am not able to deploy the solution on my tenant.
Could be because of incorrect binding. I haven't faced this issue. Can you add a screenshot of the inport and event handler configuration of the EC here? Also which outport are you using in the standard screen?
Hi http://scn.sap.com/people/komalcsap%40gmail.com
Are you able to solve this?
Thanks
Saruchi
Hi Praveen Dwivedi
I am also facing same problem as Komal
Can you please help me to figure out where I am wrong?
Thanks
Saruchi
Could be because of incorrect binding. I haven't faced this issue. Can you add a screenshot of the inport and event handler configuration of the EC here? Also which outport are you using in the standard screen?
Hi Praveen,
I have created two dependent .bco element in my solution and assign them to the .BAC so that they can be visible in the fine tuning activity.
But when I tried to open the business configuration ->Implementation Project -> and my project .It is throwing error related to context binding.Please find the below screenshot :
Please find the attached screenshot for .bco elements:-
and the screenshot for the view generated :
So could you please tell me where to do the context mapping binding and for which data field in the data model.
Thanks,
Abhishek
Hi Abhishek
Are you using a standard BO or a custom BO? You need to add the extension in an EC(if you are extending the standard BO). In the data model, right click on the dependent code list data field. There you will be able to do codelist mapping.
Regarding your error, can you share the BC set screenshots?
Anyways, try removing the extra attribute fields which you have added in your dependent codelist. In a codelist only two columns are visible; code and description; and attribute is used to link the codelists. This should solve your error.