You are on page 1of 6

8/3/2022

General Ledger Accounting (FI-GL)


Generated on: 2022-08-03 14:13:20 GMT+0000

SAP S/4HANA | 2021 Latest

PUBLIC

Original content: https://help.sap.com/docs/SAP_S4HANA_ON-PREMISE/651d8af3ea974ad1a4d74449122c620e?locale=en-


US&state=PRODUCTION&version=2021.002

Warning

This document has been generated from the SAP Help Portal and is an incomplete version of the official SAP product
documentation. The information included in custom documentation may not re ect the arrangement of topics in the SAP Help
Portal, and may be missing important aspects and/or correlations to other topics. For this reason, it is not for productive use.

For more information, please visit the https://help.sap.com/docs/disclaimer.

This is custom documentation. For more information, please visit the SAP Help Portal 1
8/3/2022

Semantic Tags
Semantic tags are short text identi ers that you use to represent key gures. They are assigned to structures of nancial
statement versions (FSVs) or G/L account hierarchies to simplify calculation of measures and KPIs for analytical reports.

How does it work?


SAP delivers standard semantic tags with built-in calculation logic under the semantic tag groups BS (Balance Sheet Group),
IS (Income Statement), and FIX (Fixed Semantic Tags). See Special Nodes for the xed semantic tag assignments.

You can also assign additional semantic tags to structuring elements of FSVs, such as to FS hierarchy nodes and G/L accounts,
so that the system can determine and display correct results in nancial statements, such as balance sheets, income
statements, and cash ow statements. Examples are as follows:

Cash Flow Statement - Indirect Method

Project Cost Report

SAP releases the following CDS views based on semantic tags:

I_GLAccountLineItemSemTag: G/L Line Item with Semantic Tag

I_PlanLineItemSemTag: Plan Line Item with Semantic Tag

I_ActualPlanLineItemSemTag: Actual/Plan Line Item with Semantic Tag

Using Custom Semantic Tags


Apart from the predelivered semantic tags, you can also create your custom tags to meet your speci c reporting needs. To
achieve that, you also need to assign your custom tags to the relevant FSVs and adapt the corresponding analytical queries to
incorporate the changes.

For more information, see the following sections:

De ning Semantic Tags and Semantic Tag Groups

Assigning Semantic Tags to an FSV

Extending/Creating Queries with New Semantic Tags

De ning Semantic Tags and Semantic Tag Groups


This topic describes how to de ne semantic tags for nancial statement versions and organize them in semantic tag groups.

Create Semantic Tag Groups


1. Run transaction SPRO and select SAP Reference IMG.

2. Expand the path Financial Accounting (New) General Ledger Accounting (New) Master Data G/L Accounts Balance
Sheet/Pro t and Loss Structures Semantic Tags for Balance Sheet/Pro t and Loss Structures .

3. Execute the activity De ne Semantic Tag Groups.

4. Choose New Entries and enter the semantic tag group ID and description.

5. Save your changes.

This is custom documentation. For more information, please visit the SAP Help Portal 2
8/3/2022

 Note
This process is not required if the semantic tag groups SAP delivers meet your needs. However, to use your KPIs across
several applications or business areas, you may want to de ne your own semantic tag groups, for example Pro tability or
Cash Flow Statement, to organize semantic tags.

Create Semantic Tags


1. Run transaction SPRO and select SAP Reference IMG.

2. Expand the path Financial Accounting (New) General Ledger Accounting (New) Master Data G/L Accounts Balance
Sheet/Pro t and Loss Structures Semantic Tags for Balance Sheet/Pro t and Loss Structures .

3. Execute the activity De ne Semantic Tags for Financial Statement Versions.

4. Choose New Entries and enter an ID, a long and short description for the new semantic tag.

5. Assign the semantic tag to a semantic tag group.

6. Save your changes.

 Note
This process is not required if the semantic tags SAP delivers meet your needs. If you want to de ne your own semantic tags,
to apply the semantic tags to analytical reports, you will need to extend the standard CDS views and create your custom
queries with the new semantic tags. For more information, see Extending/Creating Queries with New Semantic Tags.

Assigning Semantic Tags to an FSV


This topic describes how you can assign semantic tags to a nancial statement (FS) item, a G/L account, or a functional area of
nancial statement versions (FSVs). The assignment enables the system to calculate values in analytical reports.

FSVs can be created using Customizing for De ne Financial Statement Versions (transaction OB58) or the Manage Global
Hierarchies. For these two types of FSVs, semantic tag assignment works differently:

For FSVs created with OB58, assign semantic tags as follows:

1. Run transaction SPRO and select SAP Reference IMG.

2. Expand the path Financial Accounting (New) General Ledger Accounting (New) Master Data G/L
Accounts Balance Sheet/Pro t and Loss Structures Semantic Tags for Balance Sheet/Pro t and Loss
Structures .

3. Execute the activity Assign Semantic Tags to Financial Statement Versions.

4. Select New Entries and choose whether to assign the semantic tag to the Financial Statement Item, G/L
Account, or Functional Area.

5. Map the semantic tags to elements of an FSV by specifying values for FS Version, FS Item (or G/L Account or
Functional Area depending on your choice in last step), and Semantic Tag.

6. Save your changes.

The following animated GIF demonstrates how to assign semantic tags to FS items:

This is custom documentation. For more information, please visit the SAP Help Portal 3
8/3/2022

 Note
You can also use the Assign Semantic Tags to FSV app from the SAP Fiori launchpad to make the assignment same
as above.

For FSVs created with the Manage Global Hierarchies app, the semantic tag assignment is made directly within the app.
For more information, see De ne Financial Statement Versions in Global Hierarchies.

Related Information
Assign Semantic Tags for Cash Flow Statement

Extending/Creating Queries with New Semantic Tags


Once you have created new semantic tags, you should extend or create your analytical queries to reference the new tags.

To do that, use either of the following methods:

Extend the standard CDS view

Create custom queries

The following sections describe both procedures, taking the CDS view/query for cash ow statement (indirect method) as an
example.

Extend CDS View


1. In ABAP Development Tools, create a CDS view based on the template Extend View.

2. Open the CDS view. Replace view_name with the standard CDS view you want to extend, in our example,
C_CashFlowIndirectIFRS.

3. Replace data_source_name.element_name with the new measure eld de nition, for example:

@DefaultAggregation: #SUM
@Semantics: { amount : {currencyCode: '$projection.CompanyCodeCUrrency'}}
@EndUserText.label: 'Income Tax'

This is custom documentation. For more information, please visit the SAP Help Portal 4
8/3/2022
case SemanticTag
when 'ZINCOMETAX' then AmountInCompanyCodeCurrency
end as ZZ_IncomeTaxInCCCry

The sample code adds the eld ZZ_IncomeTaxInCCCry (labeled Income Tax) to the standard CDS view (and any
analytical queries that are based on it). The eld sums up all amounts of the FS items or G/L accounts that are assigned
with your new semantic tag ZINCOMETAX. Only amounts in company code currency are relevant.

4. Activate the extended CDS view. A full example of the extended view is as follows:

@AbapCatalog.sqlViewAppendName: '<Your specified SQL view name>'


@EndUserText.label: '<your specified CDS view description>'
extend view C_CashFlowIndirectIFRS with <your specified CDS view name>
{
@DefaultAggregation: #SUM
@Semantics: { amount : {currencyCode: '$projection.CompanyCodeCUrrency'}}
@EndUserText.label: 'Income Tax'
case SemanticTag
when 'ZINCOMETAX' then AmountInCompanyCodeCurrency
end as ZZ_IncomeTaxInCCCry
}

As a result, the new measure eld is now available in all reports that consume the extended CDS view, in our example, the
Design Studio report Cash Flow Statement - Indirect Method.

Create Custom Queries


1. In the Custom Analytical Queries app, create a query by copying the relevant standard query, in our example,
C_CASHFLOWINDIRECTIFRS (Cash Flow Statement - Indirect Method for IFRS).

 Note
The app can only be accessed by the users assigned with role Analytics Specialist
(SAP_BR_ANALYTICS_SPECIALIST) or business catalog Analytics - Query Design (SAP_CA_BC_ANA_AQD).

2. Open the query. Make any necessary changes in the General tab, such as the query label.

3. Go to the Display tab and choose Add Add Restricted Measure to add a eld to the query. In the dialog box, enter the
label text and ID for the eld.

4. On the New Query Field panel, make the following required changes:

a. In Measures, select the relevant measure, such as Amount in CC Crcy (AmountInCompanyCodeCurrency).

b. In the Fixed Values section, choose Add Restriction and select Semantic Tag as the dimension that will appear in
Fixed Value For. Add "= <your new semantic tag>" as an Include lter. Note that you also need to remove the
default restriction.

In this way, the new eld is created. By default, it sums up all amounts of the FS items or G/L accounts that are assigned
with your new semantic tag. You also choose Up or Down to change its position in the query.

 Note
If you want to de ne any calculation logic between existing measures and the elds assigned with your semantic tag,
you also need to add a calculated measure with formula and function de nitions.

5. Check the query in Preview.

6. If everything is OK, choose Save Draft and Publish.

As a result, the query is published for use in analytical reports.

7. Additionally, if you want to provide the query as an app tile to business users, take the following steps:

a. Open the View Browser app.

b. Search for the query you created earlier and select it.

This is custom documentation. For more information, please visit the SAP Help Portal 5
8/3/2022
c. Choose Create Application Multi-Dimensional Report .

d. Enter the title and subtitle for the app. The application is created.

e. Choose Show Application Status. You are brought to the Custom Catalog Extensions app, where you can specify
the business catalogs in which you want to include the access to the application you created just now.

 Example
You may add the business catalog SAP_SFIN_BC_GL_REPORTING, which is part of the business role General
Ledger Accountant (SAP_BR_GL_ACCOUNTANT). In this way, any business users that are assigned with the
business catalog can access the application you created.

f. Choose Publish.

After the status changes to Published, the relevant business users can access the app (a Design Studio report)
from their Fiori launchpad (or nd it in App Finder).

 Note
A G/L account may be assigned with multiple semantic tags assigned. Therefore, in your custom CDS view or analytical
query, restriction by semantic tag (or using "restricted measure") is required to avoid displaying duplicate values in the
relevant reports.

Related Information
CDS Views for Finance
Custom Analytical Queries

This is custom documentation. For more information, please visit the SAP Help Portal 6

You might also like