P_ProfitMarginByMonth
P_ProfitMarginByMonth is a Composite CDS View in SAP S/4HANA. It reads from 1 data source (I_BillingDocExtdItemBasic) and exposes 22 fields with key fields BillingDocument, BillingDocumentItem.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_BillingDocExtdItemBasic | 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_BillingDocExtdItemBasic | BillingDocument | SD Document |
| KEY | BillingDocumentItem | I_BillingDocExtdItemBasic | BillingDocumentItem | Item |
| SDDocumentCategory | I_BillingDocExtdItemBasic | SDDocumentCategory | Document Cat. | |
| BillingDocumentType | I_BillingDocExtdItemBasic | BillingDocumentType | Billing Type | |
| BillingDocumentDate | I_BillingDocExtdItemBasic | BillingDocumentDate | Billing Date | |
| BillingDocDateYearMonth | ||||
| SoldToParty | I_BillingDocExtdItemBasic | SoldToParty | Sold-to Party | |
| _SoldToParty | I_BillingDocExtdItemBasic | _SoldToParty | ||
| SalesOrganization | I_BillingDocExtdItemBasic | SalesOrganization | Sales Organization | |
| _SalesOrganization | I_BillingDocExtdItemBasic | _SalesOrganization | ||
| DistributionChannel | I_BillingDocExtdItemBasic | DistributionChannel | RefDistCh-Cust/Mat. | |
| _DistributionChannel | I_BillingDocExtdItemBasic | _DistributionChannel | ||
| OrganizationDivision | I_BillingDocExtdItemBasic | OrganizationDivision | Org. Division | |
| _OrganizationDivision | I_BillingDocExtdItemBasic | _OrganizationDivision | ||
| SalesOffice | I_BillingDocExtdItemBasic | SalesOffice | Sales Office | |
| _SalesOffice | I_BillingDocExtdItemBasic | _SalesOffice | ||
| SalesGroup | I_BillingDocExtdItemBasic | SalesGroup | Sales Group | |
| _SalesGroup | I_BillingDocExtdItemBasic | _SalesGroup | ||
| ProductHierarchyNode | I_BillingDocExtdItemBasic | ProductHierarchyNode | Prod. Hierarchy | |
| _ProductHierarchyNode | I_BillingDocExtdItemBasic | _ProductHierarchyNode | ||
| TransactionCurrency | I_BillingDocExtdItemBasic | TransactionCurrency | Transaction Currency | |
| _TransactionCurrency | I_BillingDocExtdItemBasic | _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_BillingDocExtdItemBasic 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