
Level 1: Easy; 15 minutes read & 15 minutes example exercise.
Audience: Subject Matter Experts – SAP PP (S/4HANA Private Cloud)
Author: Pramodh K.T , SAP S/4HANA Private Cloud Products Manufacturing (PP)
1. Introduction
In this blog, we will compare the information which is available in CDS (Core Data Service) views against LIS (Logistics Information System) & SFIS (Shop Floor Information System) with reference to Production Planning. We will also discuss how we can use S/4HANA Extensibility features to write queries using standard CDS views and use them to create Analytical reports as an alternative to LIS.
You can jump to Point#5 to view an example in order to skip the background.
2. LIS Background
In the Logistics Information System (LIS) data can be analyzed based on statistical data, which is contained in "information structures". Important key figures are directly updated from the operative application to the information structures.
The shop floor information system (SFIS) is part of the logistics information system LIS which can be used to compare planned vs. actual parameters like lead time, execution time, queue times, scrap, and so on.
Historically, following LIS tables (mentioned below) were used for standard or custom reports in Production Planning
LIS Table | Description |
S021 | SFIS: Order Item Data for Material |
S022 | SFIS: Order Operation Data for Work Center |
S023 | SFIS: Totals Records for Material |
S024 | Totals Records for Work Center |
S026 | Material Usage |
Future of LIS
The above-mentioned LIS tables will not be available in future in S/4HANA because:
i. LIS operates on redundant data. Every business transaction not only updates the business documents, but also pre- data in LIS. Performance suffers, locking conflicts might occur, and memory is wasted.
ii. LIS operates on pre-aggregated data. It is not possible to drill down into the individual business documents. Multi-dimensional reporting (aka Slicing and dicing) is only possible for dimensions provided in the pre-aggregated data.
iii. LIS uses an old UI technology making multi-dimensional reporting clumsy.
More information on this, can be found in Note 2268063 - S4TWL - Logistic Information System in PP
This Note also mentions the following:Future production analytics will be based on HANA, CDS views aggregating transactional data dynamically, and powerful analytical UIs for multi-dimensional reporting. With this it will be possible to replace the current LIS. You will be able to use classic LIS and the future production analytics in parallel for some time as long as you do not switch off the update of the LIS tables (Functionality is available in SAP S/4HANA on-premise edition delivery but not considered as future technology).
With reference to the above point, we want to explain how S/4HANA Private Cloud Customers can create Custom analytical queries for PP using S/4HANA Key-User Extensibility feature (In further sections below)
4. S/4HANA Key-User Extensibility (Background)
Before going into the details of creating Analytical Queries, we would like to briefly introduce S/4HANA Key-User Extensibility.
Extensibility is a key capability of SAP S/4HANA. It enables customers to create a competitive advantage by customizing their business processes and allows customer s & partners to enrich core with tailor-made solutions. In-lined with cloud strategy, SAP S/4HANA provides a new upgrade-stable cloud extensibility model that clearly separates SAP code and extensions via public SAP APIs and SAP extension points.
SAP partners and customers have been traditionally building extensions on SAP ECC system using ABAP code. However, with SAP S/4HANA and customer’s digital transformation journey towards cloud, we need a more robust yet loosely coupled extensibility model.
SAP S/4HANA provides a new upgrade-stable cloud extensibility model that clearly separates SAP code and extensions via mandatory public SAP APIs and SAP extension points.
This cloud extensibility model consists of:
i. Key-user extensibility
ii. Developer Extensibility (Embedded Steampunk)
iii. Side-by-side extensions on SAP BTP
What is Key user (in-app) extensibility?
Key user extensibility empowers business experts to build extensions to SAP S/4HANA Cloud mostly without a single line of code.
Target Persona – Key Users
Key users typically have deep knowledge of SAP business and process but no or only limited coding skills.
With the provided key user tools , the key user can achieve the following use-cases:
i. Adapt the screen layout such as moving fields and field groups, hiding fields, changing labels etc.
ii. Add custom fields to business objects. The custom field is then available in the entire application stack (from the UI to the database tables or for developer extensibility).
iii. Add custom business objects to handle custom data with very little coding efforts.
iv. Add custom logic to validate the custom fields using cloud BAdIs.
v. Add custom Core Data Service (CDS) views to create APIs, Analytical Queries etc..
vi. Add custom Analytical Queries to use data in analytical applications (reports, KPIs, ...)
5. S/4HANA Extensibility (Custom Analytical Queries) as an alternative for LIS Data Analysis
As part of S/4HANA Key-User extensibility, we will use 2 key user tools to replace LIS Data analysis in PP
i. Custom CDS Views: To create CDS queries from standard SAP released CDS Views. More about this tool available here.
ii. Custom Analytical Queries: To create Analytical Reports to Slice & Dice data based on required dimensions & measures. More about this tool available here.
6. Example: How to re-create S021 - SFIS: Order Item Data for Material (Using Extensibility)
As an example, we will cover how to create Analytics for LIS: S021 - SFIS: Order Item Data for Material, which will be split into following parts:
i. Create Custom CDS Views
ii. Create Analytical Cube
iii. Create Analytical Query
iv. Publish Fiori App
Note: Before starting the steps, ensure the following:
a. ATO Setup: Ensure that Extensibility is enabled in your S/4HANA Private Cloud system by completing necessary ATO setup, please refer ATO Setup guide – You can contact BASIS team to assist with this setup.
b. Fiori App configurations: Implementation pre-requisites are completed for the following Fiori apps:
i. Custom CDS Views
ii. Custom Analytical Queries
iii. View Browser
c. Extensibility Authorizations: To create custom CDS view, you need to have the administration level access and BASIS team needs to create a role with the authorizations shown below and assign the role to user ID.
Once above pre-requisites are completed, let us move on to the steps:
Steps Overview:
Please note that in some of the requirements, SAP would have already provided a released CDS which is of type Analytical Cube (Step 2) or Analytical Query (Step 3). In such cases, you can start from the subsequent steps.
As per the date when this Blog is published, In our example LIS S021 - SAP does not have a released CDS of type Analytical Cube or Analytical Query, hence we will start from Step 1.
Step1: Create Custom CDS Views (Base View):
In this step, we will take an SAP released CDS View that matches with our LIS requirement S021.
As of S/4HANA Private Cloud release 2022 , CDS View I_ManufacturingOrderItem has most of the required data/columns for LIS S021, we shall create a Custom CDS view using the same.
a. Open app “Custom CDS Views”
b. Once app is opened, Follow Steps:
1. On the table toolbar/header, click on Create
2. In corresponding Popup, enter Label, CDS Name & select Scenario “Standard CDS View”
3. Click on “Create”
c. In “Primary Data Source” selection:
1. Search for “I_ManufacturingOrderItem”
2. Select the line corresponding to I_ManufacturingOrderItem to add this CDS as a Primary Data Source.
d. Once Primary Data Source is selected:
1. Switch to “Elements” tab
2. Select Add -> Elements
e. In the “Select: Elements” popup, add the following elements
1. Search for “Product”
2. Select/Check the Product under “I_ManufacturingOrderItem”
Similarly add the following Elements under “I_ManufacturingOrderItem” (Mapped against corresponding LIS S021 Table Field).
LIS S021 | CDS: I_ManufacturingOrderItem | |
Field | Label | Element |
MATNR | Material Number | PRODUCT |
FTRMS | Scheduled release date | MFGORDERSCHEDULEDRELEASEDATE |
FTRMI | Actual release date | MFGORDERACTUALRELEASEDATE |
GSTRP | Basic start date | MFGORDERPLANNEDSTARTDATE |
GSTRS | Scheduled start | MFGORDERSCHEDULEDSTARTDATE |
GSTRI | Actual start date | MFGORDERACTUALSTARTDATE |
GLTRP | Basic Finish Date | MFGORDERPLANNEDENDDATE |
GLTRS | Scheduled finish | MFGORDERSCHEDULEDENDDATE |
GLTRI | Actual finish date | MFGORDERACTUALENDDATE |
PGMNG | Planned Total Order Quantity | PLNDORDERPLANNEDTOTALQTY |
PSMNG | Order Item Planned Total Quantity | MFGORDERITEMPLANNEDTOTALQTY |
WEMNG | Quantity of Goods Received for the Order Item | MFGORDERITEMGOODSRECEIPTQTY |
PAMNG | Planned Scrap Quantity | PLNDORDERPLANNEDSCRAPQTY |
PSAMG | Order Item Planned Scrap Quantity | MFGORDERITEMPLANNEDSCRAPQTY |
IAMNG | Expected Surplus/Deficit For Goods Receipt | MFGORDERITEMACTUALDEVIATIONQTY |
Note:
• Elements “ManufacturingOrder” & “ManufacturingOrderItem” are already added as Keys from your Primary data source, hence we have not added in above list.
• Unit of Measures for Quantity fields such as “BaseUnit” & “ProductionUnit” are added automatically, Hence we have not added any UOMs in above list.
• You can also add any other Elements from I_ManufacturingOrderItem necessary for your Data Analysis.
f. Add Element “ProductionPlant” from “_MfgOrder”
Similarly add Element “CreationDate” from “_MfgOrder”
g. Verify selected Items
1. Ensure that all required Elements are selected and shown in the “Selected Items”.
2. Click on “Ok” to add them to the Custom CDS View
h. Check CDS View:
1. Click on “Check” button
2. Ensure that the status is set to “Check Successful”
i. Publish CDS view:
1. Click on “Publish” to release view for further usages
2. Ensure the status is changed to “Published Successfully”
Step2: Create CDS Analytical Cube
a. Open app “Create Custom CDS” again
b. Once app is opened, create the view
1. On the table toolbar/header, click on Create
2. In corresponding Popup, enter Label, CDS Name & select Scenario “Standard CDS View”
3. Click on “Create”
c. In the Primary Data Source, select the Base CDS View
1. Search for the Base CDS View (either released by SAP -or- created from Step1)
2. Select the CDS View
d. Click on Add -> Associated Data Source
e. Search for CDS “I_FiscalCalendarDate” and select it from the list
f. Click to add Join Condition
g. Change Cardinality for Associated Data Source
1. Change Cardinality to “Zero or One [0..1]”
2. Click on button “Propose Join Condition”
h. For the Data Source Field “FiscalYearVariant”, fill the following:
1. Value Type: Constant Value
2. Value: Choose the financial report Fiscal Variant used by your company -or- C1 (For Calendar Year Jan to Dec)
Examples:
i. For the Data Source Field “CalendarDate”, fill the following:
1. Value Type: Field
2. Value: Press the F4 / Value Help button3. Search for Field “CreationDate”
4. Select the field "CreationDate" from the BASE CDS View (ZZ1_MFG_OrderItem_BASE)
j. Once the Join values are entered, Click on Close
k. Add Elements
1. Goto Elements Tab
2. Select Add -> Elements
l. Add All elements from BASE View
Note: In general, you can Ignore Associations starting with an underscore unless required for your analysis.
m. Add following elements from “_I_FiscalCalendarDate” Association
Incase you are using Financial / Fiscal Periods for Analysis use Option1, else for Calendar Periods use Option2 from below:
Option1: Add FiscalYear, FiscalPeriod, FiscalQuarter from _I_FiscalCalendarDate as shown below:
Option2: Add CalendarYear, CalendarMonth & CalendarQuarter from “_CalendarDate” association under _I_FiscalCalendarDate Association
Note: You can add any other Fiscal/Calendar date related fields from this section which will later be used for Analytics.
n. Review fields and click “Ok”
o. Click on “Publish” to Publish the CUBE CDS View
Ensure status is set to “Publishing Successful.”
Step3: Create Custom Analytical Query
a. Open Fiori app “Custom Analytical Queries”
b. Create a new Analytical Query
1. Click on “Create” link from the table toolbar
2. Enter Query name: “MFG_OrderItem_Query”
3. Enter Data Source: “ZZ1_MFG_ORDERITEM_CUBE” (or a pre-delivered CDS CUBE) and click “OK”
c. Enter label for this Analytics
d. Under the “Field Section” tab, select all required fields
e. Select fields for Row Axis
1. Under Display tab
2. Open “Free” section
3. Select “Fiscal Year” (Or Calendar Year)
4. Under Properties select: Sorting “Ascending”
5. Select Axis “Rows”
f. Similarly Change Axis to “Rows” for fields Fiscal Period & Fiscal Quarter (Or CalendarMonth & CalendarQuarter)
g. Add FiscalYear (Or CalendarYear) as Mandatory Filter
1. Open “Filters” tab
2. Select Field “Fiscal Year” (Or any other column required in filter bar in Analytical Report)
3. Select “User Input Values”
4. Selection Type: “Single” (You can also use multiple for multi selection)
5. Enable “Multiple Selection” & “Mandatory”
6. Increment Variable Sequence to 10
h. Similarly add filters for Field “Fiscal Period” (Or CalendarMonth) as follows:
i. Similarly add filter for Field “Product” as follows:
j. Click on “Save Draft” and then “Publish”
k. Click on “Preview” to preview the analytical report
l. In the Analytical Report, enter mandatory field “Fiscal Year” and click on “Go” to view data
Note: All measures such as Quantity fields are automatically summed/aggregated to respective Fiscal Year, Fiscal period & Fiscal Quarter (Based on Elements added as Dimensions/Rows)
m. You can further add drilldowns by opening menu “Drilldown” -> “Add Drilldown”
n. Select “Production Plant” and click ‘OK’
o. You can now see the data drilled down to the Production plant level for each Fiscal period & Quarter.
p. To show the ID & Description of a column, you can right click on the column & Goto Display -> ID & Description
Before:
After:
q. Once the Analytical report is ready as per requirements, you can download the data in an excel by using ‘Export As’ option in the toolbar
Enter File Name and export it to a location on your computer
Sample Excel Output:
Step4: Publishing as a Fiori Tile
There are 2 options to save this analytical report as a tile:
1. If this report is used only by you, you can quickly use the Share option in the toolbar to ‘Save as Tile’
Enter Tile details and save it to ‘My Home’ (Or any other Page in Fiori Launchpad)
Tile will appear in Fiori Launchpad
2. If this Analytical Report is used by other employees (as a Fiori tile):
a. Open View Browser app:
b. Search for the Custom Analytical Query created earlier (ZZ1_MFG_ORDERITEM_QUERY) and go into details
c. Goto Annotation tab and copy the Annotation value against SQLVIEWNAME
d. Create a Fiori tile via Catalog and assign it to users via PFCG role – steps available here (Or contact a Fiori expert)
Note: While creating the Fiori tile, Instead of creating a Transaction/URL based tile, enter the following details
1. Title, Subtitle & Icon as per your requirement
2. Semantic Object: AnalyticQuery
3. Action: analyze
4. Parameters: bsa_query=2C<SQLVIEWNAME>
<SQLVIEWNAME> was the code copied from the View Browser previously
Continue with tile assignment to users via a new PFCG role explained here
With this, the end-to-end process of creating an Analytical Report using CDS is covered along with an example for LIS S021.
Additional Tips:
Similarly, following are some CDS that may be used for other LIS Tables as part of Production Planning
LIS Table | Description | Possible CDS View |
S021 | SFIS: Order Item Data for Material | I_ManufacturingOrderItem |
S022 | SFIS: Order Operation Data for Work Center | I_ManufacturingOrderOperation |
S023 | SFIS: Totals Records for Material | I_ManufacturingOrder / I_ManufacturingOrderItem |
S024 | Totals Records for Work Center | I_ManufacturingOrder / I_ManufacturingOrderItem |
S026 | Material Usage | I_ManufacturingOrderComponent |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
31 | |
5 | |
4 | |
3 | |
3 | |
3 | |
2 | |
2 | |
2 | |
2 |