Product Lifecycle Management Blogs by SAP
Dive into product lifecycle management news, learn about digitalizing PLM for the digital supply chain, and stay informed with product updates from SAP.
cancel
Showing results for 
Search instead for 
Did you mean: 
KatjaHuschle
Product and Topic Expert
Product and Topic Expert

Hi all,
in this blog I would like to share with you my learning experience and a sample result that I gained while solving a common customer requirement for having a Where Used Report including the option to trigger follow-up activities.

The challenge was solved using existing Digital Manufacturing features.

I have divided the challenge into 2 parts:

  1. Business Logic: Using Digital Manufacturing Master Data Objects (MDOs) in combination with Production Process Design. See the blog How to use Digital Manufacturing MDOs within PPD Example: Where-Used Report with Follow-up Actions for details
  2. UI: Building a Custom Plugin to create a UI to visualize the result of the Where used query and to trigger follow-up actions. Focus of this Blog.

Credit goes to my colleague Vivekananda Panigrahy who helped me with  all my questions.  Without him, this would not be possible.

Note: The example is set up and tested using Production Orders and Work Center POD following the guidelines for using MDOs as described in the Note: 3324908 - Additional information on Digital Manufacturing for insights APIs

Use Case Example

Business Process Flow

KatjaHuschle_0-1714716988871.png
Figure 1: General Business Flow

As introduced in my first BLOG we want to identify where specific components are used.

In the blog How to use Digital Manufacturing MDOs within PPD Example: Where-Used Report with Follow-up Actions I have explained in detail the scenario and how the backend service (Production Process Design PPD) was built to retrieve the SFCs for which a specific Inventory ID (component) is used.

Now we want to provide the business user with a UI and allow them to trigger specific actions for selected SFCs.

Therefore, the user needs the following capabilities.

  1. Trigger a search for a specific Inventory ID
  2. Display the SFCs found including detailed contextual information such as material, current status etc.
  3. Being able to specific SFCs from the result and trigger follow-up actions.

Let’s have a look at the different requirements and how we can solve them using Digital Manufacturing extension options in combination with SAP BTP and SAP UI5 technology.

Implementation

In my solution approach I have chosen to build:

  1. A custom plugin that allows
    1. integration of the UI as a tile into the Digital Manufacturing Launchpad
    2. flexible configuration of the PPD endpoint. This is important if you want to deploy it in multiple landscapes.
  2. Digital Manufacturing SFC Details MDO Public API
    1. easily retrieve additional information for each SFC found in the Production Process Design
    2. MDO Public API is an ODATA service that supports the use of SAP UI5 Smart Controls
  3. SAP UI5 Smart Table component
    1. use the built-in features of Smart Table such as filtering, sorting, grouping, Excel export.

Custom Plugin Development

I have shared the code on https://github.com/SAP-samples/digital-manufacturing-extension-samples/tree/main/dm-extension-scenar...

You can easily download and try it yourself. However, I would like to mention some personal key learnings here.

Basic Custom POD Plugin

I followed Kevin Hunter’s instructions  as described in his blog Building a custom Digital Manufacturing Cloud POD Plugin the easy way to create a basic POD Plugin.

This was really a jump start and I recommend taking a look at this blog.

As configuration options I have defined

  • Title

The title which is displayed on the header of the plugin

  • Description
    Additional information for the user
  • PPD ID to retrieve list of SFCs
    Here we enter the Reg ID of the PPD that is called to get the SFCs where the component is used. The ID can be found in the Service Registry and defines the endpoint of the API we are calling.

KatjaHuschle_1-1714716988878.png
Figure 2 Manage Service Registry entry

UI

The UI is very basic.  

KatjaHuschle_2-1714716988884.png

Figure 3: Where Used Plugin UI

  • Search area: Input field and search button to start the search.
  • Result area: To display the result, I chose a SmartTable UI to take advantage of built in features like grouping, filtering, exporting to Excel etc.

    My conclusion: Smart Table combined with OData is really great. With the huge number of built- in features, it is very easy to build a great UI.

To be able to select the different rows and trigger a follow-up action, I have configured a responsive table within the Smart Table. This allows me to select the rows and pass the data to e.g. to a PPD or any other function within the plugin.

An important feature I also used in the table is the growing parameter.  Here we can define the threshold so that we can easily configure a lazy load in case of a lot of entries in the result.

KatjaHuschle_3-1714716988885.png

Controller Logic

Using the OData Model and Smart Tables is very powerful, but it also had some pitfalls that we had to solve.

The OData Model that is retrieved and displayed as result is defined in the manifest.json and points to the Digital Manufacturing Master Data Object endpoint.

The entity set we use is the SFC MDO.

KatjaHuschle_4-1714716988887.png

Figure 4: Manifest.json

To ensure that the OData Model is loaded before assigning it to the view, we used the ODataModel API metadata Loaded, which returns a promise accordingly.

Without this, I run into errors when loading the plugin. The view is then missing data.

KatjaHuschle_5-1714716988892.png

Figure 5: MainView.Controller.js onInit

The Smart Table will adjust the OData $filter, $select etc. according to the configuration as well as how we defined the filters depending on the search logic.

Sample: https://dmc-az-cons-training.test.execution.eu20.dmc.cloud.sap/sapdmdmepod/fnd/api-gateway-ms/dmci/v...

To set the filter, we first need to get the SFCs, where the component is used by calling the PPD we have configured.

To be able to call it synchronously, the function _retrieveWhereComponentUsed (call to the PPD) has been implemented using a promise function.

Without this, we run into problems calling the following steps where we built the filter for the OData call.

KatjaHuschle_6-1714716988897.png

Figure 6: MainView.controller.js onEnterCompId

Conclusion

With Digital Manufacturing Extensibility Options such as Custom Plugin and OData APIs, we can easily build a nice UI for a Where Used Report including the option to trigger follow-up action based on business needs.

In this blog post, you also learned how to build a report that retrieves data from a PPD, using MDOs OData APIs in combination with SAP UI5 Smart table including the option to trigger follow-up actions based on user selection.

Do you like this post? Please let me know what you think in the comments section.  Any feedback is greatly appreciated.

Or, if you have any questions, please visit the SAP Community Q&A Area, or comment down below.

Thank you,
Katja