P_ProfitMarginByMonth

DDL: P_PROFITMARGINBYMONTH SQL: PSDPRFTMRGNBYMH Type: view COMPOSITE

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)

SourceAliasJoin Type
I_BillingDocExtdItemBasic BillingDocItem from

Annotations (8)

NameValueLevelField
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)

KeyFieldSource TableSource FieldDescription
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
;