Skip to Content

Any coding or configuration examples provided in this document are only examples and are NOT intended for use in a productive system. The example is only done to better explain and visualize the topic.

The Objective this blog is to explain how C4C Utilities specific UIs can be extended with additional ERP-ISU information without introducing new web service or integration content.

This blog is an Illustration of – How any individual with the basic Knowledge of C4C SDK and ISU can extend C4C Utilities screens under 60 mins.

As a part of this blog we will extend Utilities Premise Overview facets to include Move In & Move Out Document ID to the Customer Overview table of Premise Thing Inspector (TI).

We will be referring the below blog which describe how C4C supports extension in their UIs and how you can map the related fields.

Utilities Premise Overview & Connection Details Extensibility

Below is the detailed scope of this Blog: –

  • Introduction to extensibility overall design.
  • How to extend

Below will be our targeted Premise Thing Inspector (TI) with the additional fields added to Customer Overview Table.

Introduction to extensibility overall design.

Below is a high level overview of the C4C SDK Developer.

  • Step 1 – Using C4C SDK extend the common BO (UtilitiesExtensibility) used for C4C Utilites scenarios
  • Step 2 – Using UI Designer (Which is part of C4C SDK) extend the UIs which you want extend.
  • Step 3 – Identifying the Web Service used to fill standard UIs and extend the ERP ISU BADI provided for those Web Services/Function Modules.
  • Step 4 – Implement and map the extension fields using C4C pre-delivered Enhancement implementations.

How to extend

  1. Extend common Extension BO & Premise Overview by extending Customer Overview Table – Step 1 & 2.
  2. ERP ISU side extension – Implementation of POST BADI to include additional data – Step 3.
  3. Implement the Premise Enhancement Implementation- Step 4.

1. Extend common Extension BO & Premise Overview by extending Customer Overview Table

Refer to following blog for extending BO and extending the UIs.

Utilities Premise Overview & Connection Details Extensibility

Use the below Business Object Extension code snippet to extend Customer History Node with Move In Document ID & Move Out Document ID.

import AP.Common.GDT;
import AP.CRM.Global;

[Extension] businessobject AP.CRM.Global:UtilitiesExtensibility {
   		node PremiseHighlights {
   		node PremiseCustomerHistory {
		[Label ("Move In Document ID")] element mvInDocumentID:LANGUAGEINDEPENDENT_EXTENDED_Text;
		[Label ("Move Out Document ID")] element mvOutDocumentID:LANGUAGEINDEPENDENT_EXTENDED_Text;
   		node PremiseObjHier {

Extending Premise Overview UI –To extend the UI’s for the above enhancement select “Enhance Screen” option by right clicking on the business object extension.

Select the UI as:-

Premise Overview Customer Overview - COD_UTILITIES_PREMISE_VIEW_EC

Extended UI path:-

UI Path - /BYD_COD/IndustrySolution/Utilities/UI/Extensibility/COD_UTILITIES_PREMISE_VIEW_EC.EC.uicomponent

2. ERP-ISU side extension.

Implement the POST BADI of Web Service to include additional data.



Sample Implementation for the targeted POST BADI to include additional data.

  DATA ls_cust_inf LIKE LINE OF ct_customer_information.

  LOOP AT ct_customer_information INTO LS_CUST_INF.

    DATA:ls_ext_data_field TYPE COD_UTIL_EXTENSION_RES_S,
          lv_moveOut_doc TYPE auszbeleg,
          lv_moveIn_doc TYPE EINZBELEG,
         ls_ext_data TYPE COD_UTIL_EXTENSION_S .
    ls_ext_data-REF_OBJECT = 'Customer Overview'.
    ls_ext_data-REF_FIELD_NAME = 'Contract ID'.
    ls_ext_data-REF_FIELD_VALUE = ls_cust_inf-EVER-VERTRAG.


    SELECT SINGLE auszbeleg FROM EAUSV INTO (lv_moveOut_doc)
                                             WHERE vertrag = ls_cust_inf-EVER-VERTRAG.

                                             WHERE vertrag = ls_cust_inf-EVER-VERTRAG.

    LS_EXT_DATA_FIELD-FIELD_NAME = 'Move In Document ID'.
    LS_EXT_DATA_FIELD-FIELD_VALUE = lv_movein_doc.

    LS_EXT_DATA_FIELD-FIELD_NAME = 'Move Out Document ID'.

    APPEND ls_ext_data to ct_extension_data.
    CLEAR ls_ext_data-EXTENSION_DATA.



3. Implement the Premise Enhancement Implementation

Mapping of Standard fields of Premise Overview and Populate Extension fields of Customer Overview

Note – As changes below doesn’t require each standard element to be separately mapped, even when C4C introduce any enhancements in newer releases, SDK developer will not require any adaption (Unless there is drastic change to the core functionality). 

import AP.CRM.Global;

var custHistory : UtilitiesPremiseCustomerHistory;
var result : UtilitiesPremiseBadiResult;

result.UtilitiesPremiseHighlights = InputData.UtilitiesPremiseBadiResult.UtilitiesPremiseHighlights;
result.UtilitiesPremiseObjectHierarchy = InputData.UtilitiesPremiseBadiResult.UtilitiesPremiseObjectHierarchy;
result.UtilitiesPremiseObjectHierarchyConnectionObjectDetails = InputData.UtilitiesPremiseBadiResult.UtilitiesPremiseObjectHierarchyConnectionObjectDetails;
result.UtilitiesPremiseObjectHierarchyPremiseDetails = InputData.UtilitiesPremiseBadiResult.UtilitiesPremiseObjectHierarchyPremiseDetails;
result.UtilitiesPremiseObjectHierarchyInstallationDetails =  InputData.UtilitiesPremiseBadiResult.UtilitiesPremiseObjectHierarchyInstallationDetails;
result.UtilitiesPremiseObjectHierarchyRegisterDetails = InputData.UtilitiesPremiseBadiResult.UtilitiesPremiseObjectHierarchyRegisterDetails;

foreach(var current in InputData.UtilitiesPremiseBadiResult.UtilitiesPremiseCustomerHistory )
var extdata = InputData.UtilitiesExtensibilityData.Where(n=>n.ReferenceFieldValue.TrimLeft("0") == current.Contract.TrimLeft("0"));
custHistory = current;

var moveInDocumentID =  extdata.GetFirst().UtilitiesExtensibilityFieldData.Where(item=>item.FieldName == "Move In Document ID").GetFirst();
if (!moveInDocumentID.FieldValue.IsInitial())
	custHistory.mvInDocumentID_2DKPL2E4RX97IFVV7J6QDOBKD = moveInDocumentID.FieldValue.TrimLeft("0");

var moveOutdocumentID =  extdata.GetFirst().UtilitiesExtensibilityFieldData.Where(item=>item.FieldName == "Move Out Document ID").GetFirst();
if (!moveOutdocumentID.FieldValue.IsInitial())
	custHistory.mvOutDocumentID_2DKPL2E4RX97IFVV7J6QDOBKD = moveOutdocumentID.FieldValue.TrimLeft("0");


return result;

Premise Thing Inspector with above enhancements:-

To report this post you need to login first.

Be the first to leave a comment

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

Leave a Reply