P_ProfitMarginByMonth
Profit Margin by Month
P_ProfitMarginByMonth is a Composite CDS View that provides data about "Profit Margin by Month" in SAP S/4HANA. It reads from 1 data source (I_BillingDocumentItemBasic) and exposes 22 fields with key fields BillingDocument, BillingDocumentItem. Part of development package VDM_SD_ANALYTICS.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_BillingDocumentItemBasic | BillingDocItem | from |
Annotations (8)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PSDPRFTMRGNBYMH | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| ObjectModel.usageType.dataClass | #MIXED | view | |
| ObjectModel.usageType.serviceQuality | #D | view | |
| ObjectModel.usageType.sizeCategory | #XL | view | |
| VDM.private | true | view | |
| VDM.viewType | #COMPOSITE | view |
Fields (22)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | BillingDocument | I_BillingDocumentItemBasic | BillingDocument | SD Document |
| KEY | BillingDocumentItem | I_BillingDocumentItemBasic | BillingDocumentItem | Item |
| SDDocumentCategory | I_BillingDocumentItemBasic | SDDocumentCategory | Document Cat. | |
| BillingDocumentType | I_BillingDocumentItemBasic | BillingDocumentType | Billing Type | |
| BillingDocumentDate | I_BillingDocumentItemBasic | BillingDocumentDate | Billing Date | |
| BillingDocDateYearMonth | ||||
| SoldToParty | I_BillingDocumentItemBasic | SoldToParty | Sold-to Party | |
| _SoldToParty | I_BillingDocumentItemBasic | _SoldToParty | ||
| SalesOrganization | I_BillingDocumentItemBasic | SalesOrganization | Sales Organization | |
| _SalesOrganization | I_BillingDocumentItemBasic | _SalesOrganization | ||
| DistributionChannel | I_BillingDocumentItemBasic | DistributionChannel | RefDistCh-Cust/Mat. | |
| _DistributionChannel | I_BillingDocumentItemBasic | _DistributionChannel | ||
| OrganizationDivision | I_BillingDocumentItemBasic | OrganizationDivision | Org. Division | |
| _OrganizationDivision | I_BillingDocumentItemBasic | _OrganizationDivision | ||
| SalesOffice | I_BillingDocumentItemBasic | SalesOffice | Sales Office | |
| _SalesOffice | I_BillingDocumentItemBasic | _SalesOffice | ||
| SalesGroup | I_BillingDocumentItemBasic | SalesGroup | Sales Group | |
| _SalesGroup | I_BillingDocumentItemBasic | _SalesGroup | ||
| ProductHierarchyNode | I_BillingDocumentItemBasic | ProductHierarchyNode | Prod. Hierarchy | |
| _ProductHierarchyNode | I_BillingDocumentItemBasic | _ProductHierarchyNode | ||
| TransactionCurrency | I_BillingDocumentItemBasic | TransactionCurrency | Transaction Currency | |
| _TransactionCurrency | I_BillingDocumentItemBasic | _TransactionCurrency |
Derived SQL interpretation, reconstructed from the parsed view metadata (data sources, associations, and field mappings). SAP annotations are omitted and the structure is reformulated as SQL — this is a functional approximation, not the verbatim SAP source.
-- Derived SQL interpretation of CDS view P_ProfitMarginByMonth.
-- Reconstructed from parsed metadata (data sources, associations, fields).
-- SAP annotations are omitted and the structure is reformulated as SQL;
-- this is a functional approximation, not the verbatim SAP source. Some join
-- conditions may be unavailable and a few CDS constructs are kept as-is.
-- SQL view name: PSDPRFTMRGNBYMH
CREATE VIEW P_ProfitMarginByMonth AS
SELECT
BillingDocItem.BillingDocument AS BillingDocument,
BillingDocItem.BillingDocumentItem AS BillingDocumentItem,
BillingDocItem.SDDocumentCategory AS SDDocumentCategory,
BillingDocItem.BillingDocumentType AS BillingDocumentType,
BillingDocItem.BillingDocumentDate AS BillingDocumentDate,
cast(BillingDocCalendarDate.YearMonth as billing_doc_date_year_month) AS BillingDocDateYearMonth,
BillingDocItem.SoldToParty AS SoldToParty,
BillingDocItem._SoldToParty AS _SoldToParty,
BillingDocItem.SalesOrganization AS SalesOrganization,
BillingDocItem._SalesOrganization AS _SalesOrganization,
BillingDocItem.DistributionChannel AS DistributionChannel,
BillingDocItem._DistributionChannel AS _DistributionChannel,
BillingDocItem.OrganizationDivision AS OrganizationDivision,
BillingDocItem._OrganizationDivision AS _OrganizationDivision,
BillingDocItem.SalesOffice AS SalesOffice,
BillingDocItem._SalesOffice AS _SalesOffice,
BillingDocItem.SalesGroup AS SalesGroup,
BillingDocItem._SalesGroup AS _SalesGroup,
BillingDocItem.ProductHierarchyNode AS ProductHierarchyNode,
BillingDocItem._ProductHierarchyNode AS _ProductHierarchyNode,
BillingDocItem.TransactionCurrency AS TransactionCurrency,
BillingDocItem._TransactionCurrency AS _TransactionCurrency
FROM I_BillingDocumentItemBasic AS BillingDocItem
;
Learn More
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- CDS View Annotations — A Complete Guide
- What Is a CDS View in SAP S/4HANA?
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- CDS View Field Mapping and Associations
- Understanding the SAP S/4HANA Data Model
- CDS View Extensions and Custom Fields in SAP S/4HANA
- Released APIs and Stability Contracts in SAP S/4HANA
- BSEG to ACDOCA: The Universal Journal Migration
- Business Partner Migration: KNA1/LFA1 to BUT000
- Material Document Migration: MSEG/MKPF to MATDOC
- How to Find the Right CDS View for an SAP Table
- BW Extractor to CDS View Migration Guide
- S/4HANA CDS View Deprecation: What You Need to Know
- ABAP CDS View Tutorial — From Basics to Real-World Examples
- RAP and CDS Views — Building Transactional Apps in SAP S/4HANA
- Sales Document Status Migration: VBUP/VBUK Removal in S/4HANA
- CO Tables in S/4HANA: COEP, COBK, COSS, COSP to ACDOCA