Margin Analysis Test - Script
Margin Analysis Test - Script
Table of Contents
1 Purpose
2 Prerequisites
2.1 System Access
2.2 Roles
2.3 Master Data, Organizational Data, and Other Data
2.4 Business Conditions
2.5 Preliminary Steps
2.5.1 User Settings - Set Controlling Area
2.5.2 Set Report Relevancy
2.5.3 Replicate Runtime Hierarchy
2.5.4 Product Profitability Report and Update of Financial Statement Version YPS2
3 Overview Table
4 Test Procedures
4.1 Execute Assessment Cycle (CO-PA)
4.2 Top-Down Distribution
4.2.1 Post Expenses to Central Cost Center
4.2.2 Create Top-Down Distribution Cycle
4.2.3 Execute Top-Down Distribution
4.3 Market Segments Actual Report
4.4 Market Segments Actual vs Plan Report
4.5 Market Segments Plan-Actual (Currency) report
4.6 Market Segments Plan-Actual (Year-to-date) report
4.7 Create Profitability Realignment Run
4.8 Execute Profitability Realignment Run
4.9 Analyze Realignments Results
Profitability Analysis enables you to evaluate market segments. This action can be classified according to products, customers, orders, or any combination of
these, or according to strategic business units, such as sales organizations or profitability segments with respect to your company's profit or contribution
margin.
After carrying out assessments, the application includes several reports to analyze the data including Market Segment Report and Profit Center analysis.
This document provides a detailed procedure for testing this scope item after solution activation, reflecting the predefined scope of the solution. Each
process step, report, or item is covered in its own section, providing the system interactions (test steps) in a table view. Steps that are not in scope of the
process but are needed for testing are marked accordingly. Project-specific steps must be added.
Values in this test script (decimal notation, date formats, and so on) are presented in U.S. standard notation. If your test system is set up to use a different
notation, enter values as appropriate.
This section summarizes all the prerequisites for conducting the test in terms of systems, users, master data, organizational data, other test data and busi-
ness conditions.
Sys- Details
tem
Sys- Accessible via SAP Fiori launchpad. Your system administrator provides you with the URL to access the various
tem apps assigned to your role.
2.2 Roles
Assign the following business roles to your individual test users. Alternatively, if available, you can create business roles using the following spaces with
pages and predefined apps for the SAP Fiori launchpad and assign the business roles to your individual test users.
These roles or spaces are examples provided by SAP. You can use them as templates to create your own roles or spaces.
For more information about business roles, refer to Assigning business roles to a user in the Administration Guide to Implementation of SAP S/4HANA with
SAP Best Practices .
Controlling A000
Area
Purpose
The controlling area must be set before you carry out the first steps in controlling.
Procedure
2 Choose User Prefer- Choose the user icon on the top right corner of the screen, and The Default Values dialog box dis-
ences choose Settings. plays.
Choose Default Values.
3 Enter Data On the CO Area field, Controlling area A000 is set for
enter the following value: A000. your user.
Choose Save.
Purpose
Report relevancy must be done when you execute any reports for the first time. If you make a subsequent change in cost center, profit center, or G/L hierar-
chy, perform this step again to get the latest information.
Also, you must manually replicate set-based hierarchies (such as Cost Center Group or Profit Center Group) and financial statement hierarchies to the back-
end database hierarchy tables. Normally, this would be created as a periodic job that would run in the background.
Procedure
2 Access the Open Set Report Relevancy - Set-Based Hierarchies (HRY_REPRELEV). The Set Report Relevancy for Set-
SAP Fiori App Based Hierarchies screen displays.
3 Enter Header In the header area, make the following entries and choose Execute:
Data Set Class: For example,0101, for the cost center group
Organizational Unit: A000
Set Name: A000
Include Subnodes: <Select>
4 Mark as Re- In the Set Report Relevancy section, select the row and choose Edit. In the
port Relevant dialog box, make the following entries:
Report Relevant: Yes
Purpose
You must manually replicate set-based hierarchies (such as Cost Center Group or Profit Center Group) and financial statement hierarchies to the back-end
database hierarchy tables. Normally, this would be created as a periodic job that would run in the background.
Procedure
2 Access the Open Replicate Runtime Hierarchy (F1478). The Application Jobs screen dis-
SAP Fiori App plays.
3 Create Choose the Create button. The New Job: Replicate Runtime
Hierarchy (SAP) view displays.
2.5.4 Product Profitability Report and Update of Financial Statement Version YPS2
Purpose
The SAP Product Profitability report comes with predelivered KPIs (see table below). In SAP S/4HANA cloud, these KPIs are linked to the predelivered financial
statement version YPS2 (GLs) via semantic tags.
Billed Quantity
Note If you want to add your own G/L or create additional nodes in FSV YPS2 that are relevant for the Product Profitability report, the new node or GL should
be under one of the existing nodes (non-calculated one). For example, if you want to add a freight cost GL via new node, you would create the node under
node number 38 to include it as part of cost of good sold KPI in the report. The number mentioned in the table above can be viewed in FSV YPS2 via Settings-
Change-Item Key Visible selection.
This scope item consists of several process steps provided in the following table.
If your system administrator has enabled spaces and pages on the SAP Fiori launchpad, the homepage will only contain the essential apps for performing the
typical tasks of a business role.
You can find all other apps not included on the homepage using the search bar.
If you want to personalize the homepage and include the hidden apps, navigate to your user profile and choose App Finder.
Post Expenses to Central Cost Center General Ledger Post General Journal Entries The accounting document is posted successfully.
[page ] 14 Accountant. (F0718)
Create Top-Down Distribution Cycle Cost Accountant - Manage Allocations (F3338) A top-down distribution cycle is created.
[page ] 16 Sales
Execute Top-Down Distribution [page Cost Accountant - Manage Allocations (F3338) A top-down distribution cycle is executed.
] 20 Sales
Market Segments Actual Report [page Cost Accountant - Market Segments - Actuals The report displays.
] 21 Sales (F0960A)
Market Segments Actual vs Plan Re- Cost Accountant - Market Segments - Plan/Actual The report displays.
port [page ] 22 Sales (F2888)
Market Segments Plan-Actual (Cur- Cost Accountant - Market Segments - Plan/Actual The report displays.
rency) report [page ] 23 Sales Crcy Trans
Market Segments Plan-Actual (Year-to- Cost Accountant - Market Segments - Plan/Actual The report displays.
date) report [page ] 25 Sales YTD
Create Profitability Realignment Run Cost Accountant - Run Realignment - Profitability The newly created realignment request is listed un-
[page ] 26 Sales Analysis (KEND) derneath the realignment run.
Execute Profitability Realignment Run Cost Accountant - Run Realignment - Profitability The Realignment Run, from previous procedures, suc-
[page ] 28 Sales Analysis (KEND) cessfully executes.
Analyze Realignments Results [page ] Cost Accountant - Realignment Results - Profitability View the monetary amount of all realignments as well
29 Sales Analysis (F2549) as all related journal entry items.
This section describes test procedures for each process step that belongs to this scope item.
Test Administration
Business
Role(s)
Responsibil- <State the Service Provider, Customer or Joint Service Provider and Customer> Duration Enter a duration.
ity
Purpose
In this procedure, you execute an assessment cycle (CO-PA). For more details on allocation features and functions, see Universal Allocation (2QL).
Procedure
2 Access the SAP Open Run Allocations (F3548). The Select: Allocation Cycles for the Run view
Fiori App displays.
3 Input Initial Make the following entries and choose the Go button: Assessment of remaining cost center cost to
Screen Allocation Context: Margin Analysis CO-PA.
Ledger: 0L
Company Code: 1810
In the Items area:
Allocation Cycle: YUA1810
Select the line and choose OK.
5 Run Allocation - On the Run Allocation(s) - Live Run screen, enter the A dialog box appears stating whether the run
Live Run following and choose OK: triggered successfully.
Run Name: <description of your run>
Fiscal Period From: <current period>
Fiscal Period To: <current period>
Tip Allocation runs can be scheduled in advance or based on regular intervals. See the Schedule Allocation Run in Universal Allocation (2QL).
Purpose
In Profitability Analysis, sales revenues, sales deductions, and costs of goods manufactured are generally stored at the customer/product level. However,
many business transactions - such as freight invoices, insurance expenses, or advertising - cannot easily be assigned to such a detailed level in CO-PA. Con-
sequently, these need to be posted at a summarized level, such as the customer group, sales organization, or even company code level. Top-down distribu-
tion is a periodic function that lets you distribute this aggregated data to more detailed levels in CO-PA on the basis of reference information.
Top-down distribution supports situation handling via standard situation template FIN_ALLOCATION_RUN_WARNING_ERROR. For additional information, refer
to scope itemSituation Handling (31N).
Margin Analysis (J55_IN) PUBLIC
Test Procedures Error: Reference source not found 13
Prerequisites
Generate sales order data using customers 18100001 and 18100003, and materials TG11 and FG126. For details on this process, refer to scope item Sell from
Stock (BD9).
Test Administration
Business
Role(s)
Responsibil- <State the Service Provider, Customer or Joint Service Provider and Customer> Duration Enter a duration.
ity
Purpose
In this step, you post costs to be distributed later via top-down distribution.
Procedure
3 Enter Header Data In the Header area, make the following entries:
Journal Entry Date: <Current Date>
Posting Date: <Current Date>
Period: <current period>, for example, 05
Journal Entry Type: SA (G/L Account Document)
Company Code: 1810
Transaction Currency: INR
4 Line Items In Line Items, make the following entries and press Enter:
Company Code: 1810
G/L Account: 65400000
Debit: 1000
5 Enter Data Expand the line item and enter the following:
Tax Code: <Input Tax Code>
Cost Center: 18101201
Choose the View Profitability Segment button and then choose
the Derive & Close button.
6 Enter Second Line In the second Line Item, make the following entries and press
Item Detail Enter:
Company Code: 1810
G/L Account: 10010000
Credit: 1000
Test Administration
Business
Role(s)
Responsibil- <State the Service Provider, Customer or Joint Service Provider and Customer> Duration Enter a duration.
ity
Purpose
Procedure
2 Access the Open Manage Allocations (F3338). The Manage Allocations screen dis-
SAP Fiori plays.
App
3 Create Choose the Create button and select Create a new cycle. The Create a new cycle dialog box
Cycle displays.
Header
5 Enter Seg- In the lower section of the New Allocation Cycle view under the Segments sec- The Create a new cycle view dis-
ment Data tion, choose the Create button and make the following entries in the Create plays.
New Segment dialog box:
Segment Name: <enter a segment beginning with Z>
Segment Description: <enter a description>
Only a single segment can be attached to each cycle.
6 Enter Select the new segment in the left pane and choose the arrow on the right.
Sender De- In the Sender Details tab, make the following entries:
tails
For value RCNTR Cost Center, select Single Value from the dropdown box and
in the Single Entry/From field, enter 18101201.
For value RACCT Account Number, select Single Value from the dropdown box
and in the Single Entry/From field, enter 65400000.
7 Enter Re- On the Receiver Basis tab, make the following entries:
ceiver Basis Receiver Details:
Scale Neg. Factors: No Normalization
Var. Portion Type: Actual Local Currency (HSL-0)
Selection Criteria:
For KDGRP Customer Group, select All values from the dropdown box.
8 Enter Re- For MATKL Product Sold Group, select All values from the dropdown box.
ceiver Basis Choose Reference base and then the + (Add) button and enter the following
values:
● In the Sender Data section:
• Value Type: All values
● In the Reference Data section:
• Value Type: Single Value
• Single Entry/From: L001
Choose OK and move on to the next selection criteria.
9 Enter Re- For value PRCTR Profit Center, select Single Value from the dropdown box and
ceiver Basis enter YB700.
For value RACCT Account Number, select Single Value from the dropdown box
and enter 41000000.
Choose Reference base and then the + (Add) button and enter the following
values:
● In the Sender Data section:
• Value Type: Single Value
• Single Entry/From: 65400000
● In the Reference Data section:
• Value Type: Single Value
• Single Entry/From: 41000000
Choose OK and move on to the next selection criteria.
Margin Analysis (J55_IN) PUBLIC
Test Procedures Error: Reference source not found 18
Test Test Step Instruction Expected Result Pass /
Step Name Fail /
# Comment
10 Enter Re- For value RFAREA Functional Area, select Single Value from the dropdown box
ceiver Basis and enter YB10.
Choose Reference base and then the + (Add) button and enter the following
values:
● In the Sender Data section:
• Value Type: Single Value
• Single Entry/From: YB20
● In the Reference Data section:
• Value Type: All values
Choose OK and move on to the next selection criteria.
11 Enter Re- For value VKORG Sales Org., select All values from the dropdown box.
ceiver Basis Choose Reference base and then the + (Add) button and enter the following
values:
● In the Sender Data section:
• Value Type: All values
● In the Reference Data section:
• Value Type: Single Value
• Single Entry/From: 1810
Choose OK and move on to the next selection criteria.
12 Enter Re- For value WERKS Plant, select All values from the dropdown box. The segment is saved.
ceiver Basis Choose Reference base and then the + (Add) button and enter the following
values:
● In the Sender Data section:
• Value Type: All values
● In the Reference Data section:
• Value Type: Single Value
• Single Entry/From: 1810
Choose OK.
Choose Save to save the segment.
Test Administration
Business
Role(s)
Responsibil- <State the Service Provider, Customer or Joint Service Provider and Customer> Duration Enter a duration.
ity
Purpose
Procedure
2 Access the SAP Open Manage Allocations (F3338). The Manage Allocations view displays.
Fiori App
3 Input Initial Screen Make the following entries and choose the Go but-
ton:
Allocation Context: Margin Analysis
Allocation Type: Top Down Distribution
4 Select Allocation Select the allocation cycle row and choose the Run The Run Allocations screen displays.
Cycle button.
5 Test Run Select the allocation cycle row and choose the Test The Run Allocation(s) - Test Run
Run button. screen displays.
Test Administration
Business
Role(s)
Responsibil- <State the Service Provider, Customer or Joint Service Provider and Customer> Duration Enter a duration.
ity
2 Access the SAP Open Market Segments - Actuals The selection view for Market Segments - Actuals displays.
Fiori app (F0960A).
3 Enter Data Make the following entries and choose The actual figures for market segments display. Gross margin at
OK: different segment levels would be shown.
Ledger: 0L
Ledger Fiscal Year: Current Year
Fiscal Period: Enter Current Period
Company Code: 1810
Hierarchy ID: YPS2
Key Date: Enter Current Date
Test Administration
Business
Role(s)
Responsibil- <State the Service Provider, Customer or Joint Service Provider and Customer> Duration Enter a duration.
ity
In this activity, you run the market segments actual/plan data reporting.
Prerequisite
You must complete the procedures in Financial Plan Data Upload from File (1HB) test script, to include data in the plan column.
Procedure
2 Access the Open Market Segments - Plan/Actual (F2888). The Market Segments - Plan/Actual screen
App displays.
3 Enter Data Make the following entries and choose OK: The plan/actual figures for market seg-
Ledger: 0L ments display.
Test Administration
Business
Role(s)
Responsibil- <State the Service Provider, Customer or Joint Service Provider and Customer> Duration Enter a duration.
ity
Purpose
In this procedure, you run the market segments actual/plan with currency translation reporting.
Procedure
2 Access the Open Market Segments - Plan/Actual Crcy Trans. The selection screen for Market Segments - Plan/Actual
SAP Fiori with Currency Translation displays.
app
3 Enter Data Make the following entries : The plan/actual figures with currency translation for market
Fiscal Year: <Current Year> segments display. Gross margin at different segment levels
displays.
Category: PLN
Exchange Rate Type: M
Analysis Currency: INR
Posting Period: <Current Period>
Company Code: 1810
G/L Account (Hierarchy): YPS2
4 Set Dimen- To set dimensions for reporting, from the Available The selected dimensions are presented as rows and
sions Fields choose Add field to rows axis or Add field to columns on the report.
columns axis.
Test Administration
Business
Role(s)
Responsibil- <State the Service Provider, Customer or Joint Service Provider and Customer> Duration Enter a duration.
ity
Purpose
In this procedure, you run the market segments actual/plan data reporting.
2 Access the Open Market Segments - Plan/Actual YTD. The selection screen for Market Segments -
SAP Fiori app Plan/Actual YTD displays.
3 Enter Data Make the following entries: The plan/actual figures with currency transla-
Fiscal Year: <Current Year> tion for market segments display.
4 Set Dimen- To set dimensions for reporting, choose Add field to rows axis The selected dimensions are presented as
sions or Add field to columns axis from Available Fields. rows and columns on the report.
Test Administration
Business
Role(s)
Context
In this procedure, you create a profitability realignment run, consisting of one or more realignment requests.
2 Access the SAP Open Run Realignment - Profitability Analysis (KEND). The overview screen for CO-PA: Maintain
Fiori app Realignments displays.
3 Create Realign- Choose Realignment Run in the header area to create a new realign- The newly created run appears in the
ment Run ment run. run hierarchy.
Realignment Run Short Text: Enter a description clearly indicating
what activities are included in the run.
Choose the Accept button to continue.
4 Create Realign- Select the realignment run created in the previous step, and then The overview screen for Realignment
ment Request choose the Request option from the header bar to create a new re- Request displays, with the Selection
quest. Condition tab opened by default.
5 Input Realign- In Relign. request, enter a description clearly indicating what activities The table for Selected characteristics
ment Request are included in the run. displays the following:
Selection Criteria Select CO-PA characteristic Customer (field name KNDNR ) and select Fld Name: KNDNR
the Arrow Down icon to place it into the Selected characteristics table. Charac.: Customer
Char. Value: 18100001 Char. Value: 18100001
Name: Domestic Customer 1
7 Save and Exit Choose the Back button to ensure that the newly created request is The newly created realignment request
listed under the realignment run you created in a previous procedure. is listed underneath the realignment run.
Choose the Save button.
Test Administration
Business
Role(s)
Responsibil- <State the Service Provider, Customer or Joint Service Provider and Customer> Duration Enter a duration.
ity
Context
In this procedure, you execute the realignment run that was created in previous procedures.
2 Access the SAP Open Run Realignment - Profitability Analysis (KEND). The overview for CO-PA: Maintain
Fiori app Realignments displays.
3 Execute Profit- Select the realignment run created in the previous procedures and then The CO-PA: Maintain Realignments
ability Realign- choose More > Run/request > Execute > Without Start Date . job dialog box appears.
ment Run Note The Customer Group of the customer master data must be modified in
the Sales and Distribution view. For more information, see the Create Cus-
tomer Master (BND) test script for more detailed instructions.
4 Execute Run Ensure that the job name is correct. Deselect the Test Mode indicator. The background job was scheduled.
Choose Accept to execute the run. You can call up job management
from the menu ( Goto > Job overview
>).
You can release the job to start im-
mediately. To display its current
status, choose Refresh status.
5 Verify Run Res- Double-click the executed profitability run to view the details of the run. The status of the run displays Suc-
ults cessful.
Test Administration
Business
Role(s)
Responsibil- <State the Service Provider, Customer or Joint Service Provider and Customer> Duration Enter a duration.
ity
Note The following section is NOT relevant for SAP Best Practices for SAP S/4HANA Cloud for Finance.
Context
In this activity, you run the Display Realignments Profitability Realignment report to view the monetary amount of all realignments as well as all related jour-
nal entry items.
Procedure
2 Access the SAP Open Realignment Results - Profitability Analysis (F2549). The Realignment Results - Profitability
Fiori app Analysis screen displays.
3 Enter Filter Cri- From the top of the view, choose the Compact Filter icon. The Realigned Journal Entry Items por-
teria Select the Ledger filter and enter 0L. tion of the view is refreshed.
Select the Realignment Date filter that opens the Define Condi-
tions: Realignment Date dialog box.
Choose the calendar icon and select the run date for your realign-
ment and choose OK to close the dialog box.
Choose Go to run the report.
Type Description
Style
Example Words or characters quoted from the screen. These include field names, screen titles, push-
buttons labels, menu names, menu paths, and menu options.
Textual cross-references to other documents.
www.sap.com/contactsap
Example Emphasized words or expressions.
EXAMPLE Technical names of system objects. These include report names, program names, transaction
codes, table names, and key concepts of a programming language when they are surrounded
by body text, for example, SELECT and INCLUDE.
Example Output on the screen. This includes file and directory names and their paths, messages,
names of variables and parameters, source text, and names of installation, upgrade and data-
base tools.
Example Exact user entry. These are words or characters that you enter in the system exactly as they
appear in the documentation.
<Ex- Variable user entry. Angle brackets indicate that you replace these words and characters with
ample> appropriate entries to make entries in the system.
EXAMPLE Keys on the keyboard, for example, F 2 or E N T E R .
© 2021 SAP SE or an SAP affiliate company. All rights re-
served.
No part of this publication may be reproduced or transmitted
in any form or for any purpose without the express permis-
sion of SAP SE or an SAP affiliate company. The information
contained herein may be changed without prior notice.
Some software products marketed by SAP SE and its distribu-
tors contain proprietary software components of other soft-
ware vendors. National product specifications may vary.
These materials are provided by SAP SE or an SAP affiliate
company for informational purposes only, without representa-
tion or warranty of any kind, and SAP or its affiliated compa-
nies shall not be liable for errors or omissions with respect to
the materials. The only warranties for SAP or SAP affiliate
company products and services are those that are set forth in
the express warranty statements accompanying such prod-
ucts and services, if any. Nothing herein should be construed
as constituting an additional warranty.
SAP and other SAP products and services mentioned herein
as well as their respective logos are trademarks or registered
trademarks of SAP SE (or an SAP affiliate company) in Ger-
Margin Analysis (J55_IN) PUBLIC
many and other countries. All other product and service
Test Procedures names mentionedError: Reference
are the source
trademarks not found
of their respective 31
companies.