C_MasterProjectBillingPlan

DDL: C_MASTERPROJECTBILLINGPLAN SQL: CMPBILLPLAN Type: view CONSUMPTION Package: VDM_CPM_WS

Master Project Billing Plans

C_MasterProjectBillingPlan is a Consumption CDS View that provides data about "Master Project Billing Plans" in SAP S/4HANA. It reads from 1 data source (I_BPMasterProject) and exposes 42 fields with key fields MasterProject, BillingPlan, BillingPlanItem, SalesDocument. It has 9 associations to related views. Part of development package VDM_CPM_WS.

Data Sources (1)

SourceAliasJoin Type
I_BPMasterProject BillingPlan from

Associations (9)

CardinalityTargetAliasCondition
[0..1] I_MasterProjectVH _MasterProject $projection.MasterProject = _MasterProject.MasterProject
[0..1] I_SalesDocument _SalesDocument $projection.SalesDocument = _SalesDocument.SalesDocument
[0..1] I_MPStructureElement _ControllingObject $projection.ControllingObjectExternalID = _ControllingObject.ControllingObjectExternalID and $projection.MasterProject = _ControllingObject.MasterProject
[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_SalesDocumentItem _SalesDocumentItem $projection.SalesOrder = _SalesDocumentItem.SalesDocument and $projection.SalesOrderItem = _SalesDocumentItem.SalesDocumentItem
[0..1] E_MPBillPlanRRB _ExtensionRRB $projection.BillingPlan = _ExtensionRRB.BillingPlan
[0..1] E_MPBillPlanBAP _ExtensionBAP $projection.BillingPlan = _ExtensionBAP.BillingPlan
[0..1] E_MPBillPlanFixed _ExtensionFixed $projection.BillingPlan = _ExtensionFixed.BillingPlan

Annotations (10)

NameValueLevelField
AbapCatalog.sqlViewName CMPBILLPLAN view
VDM.viewType #CONSUMPTION view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #CHECK view
EndUserText.label Master Project Billing Plans view
ObjectModel.usageType.sizeCategory #XXL view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.dataClass #MIXED view
ClientHandling.algorithm #SESSION_VARIABLE view
AccessControl.personalData.blocking #REQUIRED view

Fields (42)

KeyFieldSource TableSource FieldDescription
KEY MasterProject I_BPMasterProject MasterProject Project ID
KEY BillingPlan I_BPMasterProject BillingPlan Bill. Plan No.
KEY BillingPlanItem I_BPMasterProject BillingPlanItem Item
KEY SalesDocument
SalesOrder SalesDocument SD Document
SalesOrderItem SalesDocumentItem Sales Document Item
SalesDocumentItemText _SalesDocumentItem SalesDocumentItemText Item Descr.
SalesDocumentItem
SalesDocumentType
SalesOrganization I_BPMasterProject SalesOrganization Sales Organization
SalesOrganizationName _SalesOrganizationText SalesOrganizationName Sales Organization Description
ControllingObjectExternalID
ControllingObjectDescription
MasterProjectName I_BPMasterProject MasterProjectName
BillingDate I_BPMasterProject BillingDate Billing Date
PostingDate
PricingDate
EventType I_BPMasterProject EventType Event date type
BillingEventTypeName
BillingPlanBillingDateText I_BPMasterProject BillingPlanBillingDateText
SDDocumentStatus I_BPMasterProject SDDocumentStatus
DocumentStatusName I_BPMasterProject DocumentStatusName Status Text
DocumentStatusDesc
Material
MaterialName
NetAmount I_BPMasterProject NetAmount Stated Amount
MstrProjResourceQuantity
TransactionCurrency I_BPMasterProject TransactionCurrency Transaction Currency
UnitOfMeasure I_BPMasterProject UnitOfMeasure Unit Protected Qty
BillingBlockReasonDescription I_BPMasterProject BillingBlockReasonDescription
IsBillingCreatedInAdvance I_BPMasterProject IsBillingCreatedInAdvance
BillingPlanCategoryName I_BPMasterProject BillingPlanCategoryName
BillingPlanRuleName I_BPMasterProject BillingPlanRuleName
SoldToParty I_BPMasterProject SoldToParty Sold-to Party
CustomerName I_BPMasterProject CustomerName Name of Customer
SDDocumentCategory
UserIsInvolved _MasterProject UserIsInvolved
MasterProjectType _MasterProject MasterProjectType
_MasterProject _MasterProject
_SalesDocument _SalesDocument
_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_MasterProjectBillingPlan.
-- 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: CMPBILLPLAN

CREATE VIEW C_MasterProjectBillingPlan AS
SELECT
  BillingPlan.MasterProject AS MasterProject,
  BillingPlan.BillingPlan AS BillingPlan,
  BillingPlan.BillingPlanItem AS BillingPlanItem,
  cast(BillingPlan.SalesDocument as /cpd/pws_rcb_vbeln) AS SalesDocument,
  SalesDocument AS SalesOrder,
  SalesDocumentItem AS SalesOrderItem,
  _SalesDocumentItem.SalesDocumentItemText AS SalesDocumentItemText,
  (ltrim(SalesDocumentItem,'0') ) AS SalesDocumentItem,
  cast(BillingPlan._SalesDocument.SalesDocumentType as auart) AS SalesDocumentType,
  BillingPlan.SalesOrganization AS SalesOrganization,
  _SalesOrganizationText.SalesOrganizationName AS SalesOrganizationName,
  cast(BillingPlan.ControllingObjectExternalID as /cpd/cpm_struct_elm) AS ControllingObjectExternalID,
  cast(BillingPlan.ControllingObjectDescription as /cpd/cpm_str_elm_nm) AS ControllingObjectDescription,
  BillingPlan.MasterProjectName AS MasterProjectName,
  BillingPlan.BillingDate AS BillingDate,
  cast(BillingPlan.PostingDate as /cpd/pws_rcb_budat) AS PostingDate,
  cast(BillingPlan.PricingDate as /cpd/pws_rcb_pridat) AS PricingDate,
  BillingPlan.EventType AS EventType,
  cast(BillingPlan.BillingEventTypeName as /cpd/pws_ws_bilevnt_typ_desc) AS BillingEventTypeName,
  BillingPlan.BillingPlanBillingDateText AS BillingPlanBillingDateText,
  BillingPlan.SDDocumentStatus AS SDDocumentStatus,
  BillingPlan.DocumentStatusName AS DocumentStatusName,
  cast(BillingPlan.DocumentStatusDesc as /cpd/pws_ws_bildoc_stsdesc) AS DocumentStatusDesc,
  cast(BillingPlan.MaterialName as matnr) AS Material,
  cast(BillingPlan.MaterialDesc as /cpd/pws_ws_material_desc) AS MaterialName,
  BillingPlan.NetAmount AS NetAmount,
  cast(BillingPlan.MstrProjResourceQuantity as /cpd/pws_ws_bilrcv_rescqty) AS MstrProjResourceQuantity,
  BillingPlan.TransactionCurrency AS TransactionCurrency,
  BillingPlan.UnitOfMeasure AS UnitOfMeasure,
  BillingPlan.BillingBlockReasonDescription AS BillingBlockReasonDescription,
  BillingPlan.IsBillingCreatedInAdvance AS IsBillingCreatedInAdvance,
  BillingPlan.BillingPlanCategoryName AS BillingPlanCategoryName,
  BillingPlan.BillingPlanRuleName AS BillingPlanRuleName,
  BillingPlan.SoldToParty AS SoldToParty,
  BillingPlan.CustomerName AS CustomerName,
  BillingPlan._SalesDocument.SDDocumentCategory AS SDDocumentCategory,
  _MasterProject.UserIsInvolved AS UserIsInvolved,
  _MasterProject.MasterProjectType AS MasterProjectType
FROM I_BPMasterProject AS BillingPlan
LEFT OUTER JOIN I_MasterProjectVH AS _MasterProject ON MasterProject = _MasterProject.MasterProject  -- association [0..1]
LEFT OUTER JOIN I_SalesDocument AS _SalesDocument ON SalesDocument = _SalesDocument.SalesDocument  -- association [0..1]
LEFT OUTER JOIN I_MPStructureElement AS _ControllingObject ON ControllingObjectExternalID = _ControllingObject.ControllingObjectExternalID AND MasterProject = _ControllingObject.MasterProject  -- association [0..1]
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_SalesDocumentItem AS _SalesDocumentItem ON SalesOrder = _SalesDocumentItem.SalesDocument AND SalesOrderItem = _SalesDocumentItem.SalesDocumentItem  -- association [0..1]
LEFT OUTER JOIN E_MPBillPlanRRB AS _ExtensionRRB ON BillingPlan = _ExtensionRRB.BillingPlan  -- association [0..1]
LEFT OUTER JOIN E_MPBillPlanBAP AS _ExtensionBAP ON BillingPlan = _ExtensionBAP.BillingPlan  -- association [0..1]
LEFT OUTER JOIN E_MPBillPlanFixed AS _ExtensionFixed ON BillingPlan = _ExtensionFixed.BillingPlan  -- association [0..1]
;