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:
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
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.
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.
In my solution approach I have chosen to build:
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.
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
The title which is displayed on the header of the plugin
Figure 2 Manage Service Registry entry
The UI is very basic.
Figure 3: Where Used Plugin 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.
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.
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.
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.
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.
Figure 6: MainView.controller.js onEnterCompId
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
6 | |
5 | |
3 | |
2 | |
2 | |
1 |