Scenario: To extend CONTRACTS by adding a new field in Utilities Contracts WorkCentre view
The highlighted field ContractCategory_Extension is the new extended field in the Contracts
Step 1- Create a PDI Solution
Create a new PDI solution, maintain the mandatory fields and save the new solution.
For the new solution, select solution type as Customer Specific Solution as shown in the graphic below:
Step 2 - Add a new folder under Solution Explorer
Step 3 - Add an item and Specify Name of Extension Object in Business Object Extension under Solution Explorer
Under Installed Templates SAP Extension Business Object Extension, specify the name of the extension object.
Select the business object UtilitiesExtensibility as shown below
Step 4 - Add Extension Fields to the Newly Added Extension Business Object
In the example shown below we have extended the node Contract with new filed ContractCategory_Extension
Step 5 – Add the same extension field to UI screen by right clicking on the Extension Business Object and choose the option Enhance Screen
This (Enhance Screen option) will show the list of floor plans where you can add the new extension field. You can select the appropriate floor plan where you need to define or add the new extended field to the UI screen.
Step 6 - Select Section Group in UI Screen Where You Want to Add Extension Fields
In the step 5, you opened the floor plans for the UI screens where you need to add the extension fields. This opens up the UI designer.
In the UI designer,
Select the section group/anchor where you want to add the new extension field
Click on Extensibility Explorer Tab Add Extension Field to List.
Select the extension field you want to add and apply.
Activate the floor plan. With this you can see the new extension field added to the section group in UI.
Open the UI screen to see the new extension field (as seen in the screenshot below).
Step 7 - Create Service Interface and Communication scenario to ERP using Web Service
Since these UI screens involve online transactions, you need to create a service interface to ERP using web service. To do this, upload the WSDL that is imported from the ERP and create the service interface under Solution Explorer--> Select Folder--> Add Item--> Service Integration--> External Web Service Integration
Specify the name and follow the steps as shown below
Download and upload the WSDL and click next as shown below.(Consult the PI team for WSDL and download the appropriate WSDL)
Select Communication Scenario check box and specify a name for the same as shown below
Click on Communication Scenario created earlier of your solution and select the service as shown below
Now click on services as shown below
Step 7 – Select a valid BAdI Implementation
As a next step, you need to select the valid business add-in implementation. You can do this under Solution Explorer---> Select folder--> Add Item--> Choose template as Extension--> Enhancement Implementation.
Sample BAdI implementation looks like the screenshot below where we call the Service -> Get the Response -> Map it to the extension field -> Display on the UI.
2: Steps in C4C UI
Step1: Create a new communication arrangement for the communication scenario created in PDI as shown below.
Login with admin credentials for the respective tenant.
Click on adapt and select Silverlight option to make the changes.
Go to Administrator view and under Integration select Communication Arrangements to create the communication arrangement this is required in order to display the data in UI.
Select the communication scenario created earlier in PDI
Now select the communication scenario and make the changes as shown below, select the service and click on View All highlighted below
Select the Technical Data and maintain the credentials such as user id and password. Further click on Edit Advanced Settings
Enter the valid port and path and save and activate the changes.(Consult the PI team for the above changes)
3: Tips and Tricks
To get the correct BAdI to implement please go through the below link in order to find the correct BAdI for different WorkCentre views.
In order to find the correct WSDL for upload in PDI at the time creating a service integration. Login to tenant system and execute the transaction MDRS go to repository browser select package as AP_UTILITY_MANAGEMENT_ERP_IMP under the package select Enterprise Services under that select Service Consumer and check the input and output parameters and select the valid WSDL
4: Limitations and Notes
1) There can be only solution for one BADi Implementation (1...1)
2) Once a particular BADI is Extended you have to fill all the Section group (tables in that screen) from which the facet is enhanced.
3)In a facet if there are multiple facets having interdependency then the selection of one row of a particular section group table triggers the control to the backend and fetches the rows for the second tables without PDI intervention.
E.g.: Contracts row selection triggers control to backend where the corresponding meter readings are fetched. One point to note here is that the data should be retrieved in the PDI layer and constructed properly during the Fetch.