Enterprise Resource Planning Blogs by SAP
Get insights and updates about cloud ERP and RISE with SAP, SAP S/4HANA and SAP S/4HANA Cloud, and more enterprise management capabilities with SAP blog posts.
cancel
Showing results for 
Search instead for 
Did you mean: 
PramodhKT
Associate
Associate

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 TableDescription

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.

PramodhKT_0-1715761683031.png

Once above pre-requisites are completed, let us move on to the steps:

Steps Overview:
PramodhKT_1-1715761760375.png

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”

PramodhKT_2-1715761903037.png

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”PramodhKT_0-1715762831673.png

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.PramodhKT_1-1715762895579.png

d. Once Primary Data Source is selected:

1. Switch to “Elements” tab
2. Select Add -> ElementsPramodhKT_4-1715767951861.png

 

e. In the “Select: Elements” popup, add the following elements

1. Search for “Product”
2. Select/Check the Product under “I_ManufacturingOrderItem”PramodhKT_0-1715763273194.png

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”

PramodhKT_2-1715767776447.png

Similarly add Element “CreationDate” from “_MfgOrder”PramodhKT_3-1715767843281.png

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 ViewPramodhKT_5-1715768091734.png

h. Check CDS View:

1. Click on “Check” button
2. Ensure that the status is set to “Check Successful”PramodhKT_6-1715768288094.png

i. Publish CDS view:

1. Click on “Publish” to release view for further usages
2. Ensure the status is changed to “Published Successfully”PramodhKT_0-1715768627381.png

Step2: Create CDS Analytical Cube

a. Open app “Create Custom CDS” again

PramodhKT_1-1715768998334.png

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”
PramodhKT_2-1715769085287.png

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
PramodhKT_3-1715769244080.png

d. Click on Add -> Associated Data Source

PramodhKT_4-1715769306973.png

e. Search for CDS “I_FiscalCalendarDate” and select it from the list

PramodhKT_5-1715769373811.png

f. Click to add Join Condition

PramodhKT_7-1715769472205.png

g. Change Cardinality for Associated Data Source

1. Change Cardinality to “Zero or One [0..1]”
2. Click on button “Propose Join Condition”PramodhKT_8-1715769588180.png

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:
PramodhKT_10-1715769843765.png
PramodhKT_11-1715769880136.png

i. For the Data Source Field “CalendarDate”, fill the following:

1. Value Type: Field
2. Value: Press the F4 / Value Help buttonPramodhKT_1-1715770642726.png3. Search for Field “CreationDate”
4. Select the field "CreationDate" from the BASE CDS View (ZZ1_MFG_OrderItem_BASE) PramodhKT_2-1715770670174.png

j. Once the Join values are entered, Click on Close

PramodhKT_3-1715770772654.png

k. Add Elements

1. Goto Elements Tab
2. Select Add -> Elements
PramodhKT_4-1715770854419.png

l. Add All elements from BASE View

Note: In general, you can Ignore Associations starting with an underscore unless required for your analysis.
PramodhKT_5-1715770959352.png

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:
PramodhKT_6-1715771137810.png

Option2: Add CalendarYear, CalendarMonth & CalendarQuarter from “_CalendarDate” association under _I_FiscalCalendarDate AssociationPramodhKT_7-1715771228645.png
PramodhKT_8-1715771266755.png

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”

PramodhKT_9-1715771369465.png

o. Click on “Publish” to Publish the CUBE CDS View

Ensure status is set to “Publishing Successful.”PramodhKT_10-1715771462388.png

Step3: Create Custom Analytical Query

a. Open Fiori app “Custom Analytical Queries”

PramodhKT_11-1715771545901.png

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”
PramodhKT_12-1715771686881.png

c. Enter label for this Analytics

PramodhKT_13-1715771751875.png

d. Under the “Field Section” tab, select all required fields

PramodhKT_14-1715771805082.png

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”
PramodhKT_15-1715771907866.png

f. Similarly Change Axis to “Rows” for fields Fiscal Period & Fiscal Quarter (Or CalendarMonth & CalendarQuarter)

PramodhKT_16-1715771984025.png

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
PramodhKT_17-1715772128495.png

h. Similarly add filters for Field “Fiscal Period” (Or CalendarMonth) as follows:

PramodhKT_18-1715772912907.png

i. Similarly add filter for Field “Product” as follows:

PramodhKT_19-1715772970775.png

j. Click on “Save Draft” and then “Publish”

PramodhKT_20-1715773039793.png

k. Click on “Preview” to preview the analytical report

PramodhKT_21-1715773096088.png

l. In the Analytical Report, enter mandatory field “Fiscal Year” and click on “Go” to view data

PramodhKT_22-1715773191615.pngNote: 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”

PramodhKT_23-1715773278537.png

n. Select “Production Plant” and click ‘OK’

PramodhKT_24-1715773329382.png

o. You can now see the data drilled down to the Production plant level for each Fiscal period & Quarter.

PramodhKT_25-1715773382062.png

p. To show the ID & Description of a column, you can right click on the column & Goto Display -> ID & Description

Before:
PramodhKT_0-1715773711389.png

After:
PramodhKT_1-1715773741491.png

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

PramodhKT_2-1715773823048.png

Enter File Name and export it to a location on your computerPramodhKT_3-1715773898559.png

Sample Excel Output:
PramodhKT_4-1715773993863.png

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’

PramodhKT_5-1715774126947.png
Enter Tile details and save it to ‘My Home’ (Or any other Page in Fiori Launchpad)PramodhKT_6-1715774184522.png

Tile will appear in Fiori Launchpad
PramodhKT_7-1715774258546.png

2. If this Analytical Report is used by other employees (as a Fiori tile):

a. Open View Browser app:

PramodhKT_8-1715774330963.png

b. Search for the Custom Analytical Query created earlier (ZZ1_MFG_ORDERITEM_QUERY) and go into details

PramodhKT_9-1715774403399.png

c. Goto Annotation tab and copy the Annotation value against SQLVIEWNAME

PramodhKT_10-1715774471074.png

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
PramodhKT_11-1715774581708.png

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:

  1. During Analytical Report Execution, if you wish to add more Filters, respective Element should be added as filters while creating the Analytical Query.
  2. In certain scenarios the Quantities shows as ‘*’ (because the Analytics engine is not able to total Quantities with multiple Unit Of measures ) . In such cases, we suggest using a Quantity conversion by creating a new Filter Parameter (Display Unit) and use it as Quantity Conversion of a new Display Column.

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

 

 

2 Comments