C_MPBillnRecvSummary

DDL: C_MPBILLNRECVSUMMARY SQL: CMPBILLRCVSUM Type: view CONSUMPTION Package: VDM_CPM_WS

Project Bill and Receive Summary

C_MPBillnRecvSummary is a Consumption CDS View that provides data about "Project Bill and Receive Summary" in SAP S/4HANA. It reads from 1 data source (I_MstrProjSummary) and exposes 35 fields with key fields MasterProject, SalesDocument, SalesDocumentItem, BillingDocument. It has 12 associations to related views. Part of development package VDM_CPM_WS.

Data Sources (1)

SourceAliasJoin Type
I_MstrProjSummary Invoice from

Associations (12)

CardinalityTargetAliasCondition
[0..1] I_SalesDocumentItem _SalesDocumentItem $projection.SalesOrder = _SalesDocumentItem.SalesDocument and $projection.SalesOrderItem = _SalesDocumentItem.SalesDocumentItem
[0..1] I_SalesDocument _SalesDocument $projection.SalesDocument = _SalesDocument.SalesDocument
[0..1] I_Material _Material $projection.Material = _Material.Material
[0..1] I_MasterProjectVH _MasterProject $projection.MasterProject = _MasterProject.MasterProject
[0..*] I_MPStructureElementVH _ControllingObject $projection.ControllingObjectExternalID = _ControllingObject.ControllingObjectExternalID
[0..1] I_Customer _Customer $projection.SoldToParty = _Customer.Customer
[0..1] I_SalesOrganizationText _SalesOrganizationText $projection.SalesOrganization = _SalesOrganizationText.SalesOrganization and _SalesOrganizationText.Language = $session.system_language
[0..1] I_BillingDocumentTypeText _BillingDocumentTypeText $projection.BillingDocumentType = _BillingDocumentTypeText.BillingDocumentType and _BillingDocumentTypeText.Language = $session.system_language
[0..1] I_MstrProjCreditSummary _MstrProjCreditSummary $projection.MasterProject = _MstrProjCreditSummary.MasterProject and Invoice.SalesDocument = _MstrProjCreditSummary.SalesDocument and Invoice.SalesDocumentItem = _MstrProjCreditSummary.SalesDocumentItem
[0..1] I_AddressPhoneNumber _DefaultPhoneNumber _DefaultPhoneNumber.AddressID = $projection.AddressID and ( _DefaultPhoneNumber.Person = $projection.Person or _DefaultPhoneNumber.Person = ' ' )
[0..1] I_AddressEmailAddress _DefaultEmailAddress _DefaultEmailAddress.AddressID = $projection.AddressID and ( _DefaultEmailAddress.Person = $projection.Person or _DefaultEmailAddress.Person = ' ' ) and _DefaultEmailAddress.IsDefaultEmailAddress = 'X'
[0..1] E_SalesDocumentItemBasic _Extension $projection.SalesOrder = _Extension.SalesDocument and $projection.SalesOrderItem = _Extension.SalesDocumentItem

Annotations (10)

NameValueLevelField
AbapCatalog.sqlViewName CMPBILLRCVSUM view
AbapCatalog.compiler.compareFilter true view
VDM.viewType #CONSUMPTION view
AccessControl.authorizationCheck #CHECK view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.dataClass #MIXED view
ClientHandling.algorithm #SESSION_VARIABLE view
EndUserText.label Project Bill and Receive Summary view
AccessControl.personalData.blocking #REQUIRED view

Fields (35)

KeyFieldSource TableSource FieldDescription
KEY MasterProject I_MstrProjSummary MasterProject Project ID
KEY SalesDocument
KEY SalesDocumentItem
KEY BillingDocument I_MstrProjSummary BillingDocument SD Document
SalesOrder I_MstrProjSummary SalesDocument SD Document
SalesOrderItem I_MstrProjSummary SalesDocumentItem Sales Document Item
SalesDocumentItemText _SalesDocumentItem SalesDocumentItemText Item Descr.
SDDocumentCategory I_MstrProjSummary SDDocumentCategory Document Cat.
MasterProjectName I_MstrProjSummary MasterProjectName
BillingDocumentType I_MstrProjSummary BillingDocumentType Billing Type
BillingDocumentTypeName _BillingDocumentTypeText BillingDocumentTypeName
SalesOrganization I_MstrProjSummary SalesOrganization Sales Organization
SalesOrganizationName _SalesOrganizationText SalesOrganizationName Sales Organization Description
NetAmount _SalesDocumentItem NetAmount Stated Amount
Material I_MstrProjSummary Material Vehicle Model
MaterialName
ItemGrossAmountOfBillingDoc
TransactionCurrency I_MstrProjSummary TransactionCurrency Transaction Currency
ControllingObjectExternalID
ControllingObjectDescription
SoldToParty I_MstrProjSummary SoldToParty Sold-to Party
CustomerName
AddressID I_MstrProjSummary AddressID Ship-to address
Person I_MstrProjSummary Person Person/ Farm/ Field
EmailAddress _DefaultEmailAddress EmailAddress E-Mail Address
MobilePhoneNumber
PhoneNumber
UserIsInvolved I_MstrProjSummary UserIsInvolved
MasterProjectType I_MstrProjSummary MasterProjectType
_SalesDocumentItem _SalesDocumentItem
_Material _Material
_SalesDocument _SalesDocument
_MasterProject _MasterProject
_ControllingObject _ControllingObject
_Customer _Customer

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 C_MPBillnRecvSummary.
-- 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: CMPBILLRCVSUM

CREATE VIEW C_MPBillnRecvSummary AS
SELECT
  Invoice.MasterProject AS MasterProject,
  ltrim(Invoice.SalesDocument,'0') AS SalesDocument,
  ltrim(Invoice.SalesDocumentItem,'0') AS SalesDocumentItem,
  Invoice.BillingDocument AS BillingDocument,
  Invoice.SalesDocument AS SalesOrder,
  Invoice.SalesDocumentItem AS SalesOrderItem,
  _SalesDocumentItem.SalesDocumentItemText AS SalesDocumentItemText,
  Invoice.SDDocumentCategory AS SDDocumentCategory,
  Invoice.MasterProjectName AS MasterProjectName,
  Invoice.BillingDocumentType AS BillingDocumentType,
  _BillingDocumentTypeText.BillingDocumentTypeName AS BillingDocumentTypeName,
  Invoice.SalesOrganization AS SalesOrganization,
  _SalesOrganizationText.SalesOrganizationName AS SalesOrganizationName,
  _SalesDocumentItem.NetAmount AS NetAmount,
  Invoice.Material AS Material,
  _SalesDocumentItem._Material._Text[1:Language = $session.system_language].MaterialName AS MaterialName,
  cast(Invoice.PurchasingDocumentAmount as /cpd/cpm_receivedamount) AS ItemGrossAmountOfBillingDoc,
  Invoice.TransactionCurrency AS TransactionCurrency,
  cast(Invoice.ControllingObjectExternalID as /cpd/cpm_struct_elm) AS ControllingObjectExternalID,
  cast(Invoice.ControllingObjectDescription as /cpd/cpm_str_elm_nm) AS ControllingObjectDescription,
  Invoice.SoldToParty AS SoldToParty,
  cast( _Customer.CustomerName as /cpd/cpm_customer) AS CustomerName,
  Invoice.AddressID AS AddressID,
  Invoice.Person AS Person,
  _DefaultEmailAddress.EmailAddress AS EmailAddress,
  cast(_DefaultPhoneNumber[PhoneNumberType='3'].PhoneNumber as /cpd/cpm_custmobno) AS MobilePhoneNumber,
  cast(_DefaultPhoneNumber[PhoneNumberType='1'].PhoneNumber as /cpd/cpm_custcontactno) AS PhoneNumber,
  Invoice.UserIsInvolved AS UserIsInvolved,
  Invoice.MasterProjectType AS MasterProjectType
FROM I_MstrProjSummary AS Invoice
LEFT OUTER JOIN I_SalesDocumentItem AS _SalesDocumentItem ON SalesOrder = _SalesDocumentItem.SalesDocument AND SalesOrderItem = _SalesDocumentItem.SalesDocumentItem  -- association [0..1]
LEFT OUTER JOIN I_SalesDocument AS _SalesDocument ON SalesDocument = _SalesDocument.SalesDocument  -- association [0..1]
LEFT OUTER JOIN I_Material AS _Material ON Material = _Material.Material  -- association [0..1]
LEFT OUTER JOIN I_MasterProjectVH AS _MasterProject ON MasterProject = _MasterProject.MasterProject  -- association [0..1]
LEFT OUTER JOIN I_MPStructureElementVH AS _ControllingObject ON ControllingObjectExternalID = _ControllingObject.ControllingObjectExternalID  -- association [0..*]
LEFT OUTER JOIN I_Customer AS _Customer ON SoldToParty = _Customer.Customer  -- association [0..1]
LEFT OUTER JOIN I_SalesOrganizationText AS _SalesOrganizationText ON SalesOrganization = _SalesOrganizationText.SalesOrganization AND _SalesOrganizationText.Language = $session.system_language  -- association [0..1]
LEFT OUTER JOIN I_BillingDocumentTypeText AS _BillingDocumentTypeText ON BillingDocumentType = _BillingDocumentTypeText.BillingDocumentType AND _BillingDocumentTypeText.Language = $session.system_language  -- association [0..1]
LEFT OUTER JOIN I_MstrProjCreditSummary AS _MstrProjCreditSummary ON MasterProject = _MstrProjCreditSummary.MasterProject AND Invoice.SalesDocument = _MstrProjCreditSummary.SalesDocument AND Invoice.SalesDocumentItem = _MstrProjCreditSummary.SalesDocumentItem  -- association [0..1]
LEFT OUTER JOIN I_AddressPhoneNumber AS _DefaultPhoneNumber ON _DefaultPhoneNumber.AddressID = AddressID AND ( _DefaultPhoneNumber.Person = Person OR _DefaultPhoneNumber.Person = ' ' )  -- association [0..1]
LEFT OUTER JOIN I_AddressEmailAddress AS _DefaultEmailAddress ON _DefaultEmailAddress.AddressID = AddressID AND ( _DefaultEmailAddress.Person = Person OR _DefaultEmailAddress.Person = ' ' ) AND _DefaultEmailAddress.IsDefaultEmailAddress = 'X'  -- association [0..1]
LEFT OUTER JOIN E_SalesDocumentItemBasic AS _Extension ON SalesOrder = _Extension.SalesDocument AND SalesOrderItem = _Extension.SalesDocumentItem  -- association [0..1]
;