P_ProfitMarginByMonth

DDL: P_PROFITMARGINBYMONTH SQL: PSDPRFTMRGNBYMH Type: view COMPOSITE Package: VDM_SD_ANALYTICS

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)

SourceAliasJoin Type
I_BillingDocumentItemBasic 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_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
;