cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Field connection through multiple Business Context

matsrossland
Explorer
289

Hi, 

Is it possible to connect two different Custom Fields with different Business Contexts? 

We have created two custom fields containing a UN number, one for Master Data: Product General and one for Sales: Sales Document Item. They have the type of "Association to Business Object" and are connected to our Custom Business Object where we maintain UN number data. 

Screenshot 2024-02-26 at 15.23.50.png

Screenshot 2024-02-26 at 15.24.09.png


Now my question is:
Is it possible to connect these two custom fields so that if a product is given a UN number in the "Manage Product Master Data" app (first custom field) - that it will be automatically filled in the "Custom Fields" section of a sales order if the product entered has data in the custom field?  

Product Master Data custom field:

Screenshot 2024-02-26 at 15.26.09.png

Sales Order custom field:

Screenshot 2024-02-26 at 15.26.46.png

We are operating on a SAP S/4HANA Cloud, Public Edition.

View Entire Topic
AndreasMuno
Product and Topic Expert
Product and Topic Expert
0 Kudos

Thank you for your question, @matsrossland.

In both business contexts keep the custom field name the same. Also, the Association to Business Object needs to be defined with the same in key. I understand that will be the product ID in either case? That's what you will have to have defined in your entity. That might be enough already to get the field value appear in the respective end user Fiori screens.

If not, some minor coding of logic might be required, probably with an if-clause as you described, limiting this mapping to product data having been made available. You might want to use before and after events to sales order create for this logic.

If this addresses your request, please mark accordingly.