I_MstrProjCreditMemoSummary

DDL: I_MSTRPROJCREDITMEMOSUMMARY SQL: IMSTRCREDITSUM Type: view COMPOSITE

Master Project Credit Memo Summary

I_MstrProjCreditMemoSummary is a Composite CDS View that provides data about "Master Project Credit Memo Summary" in SAP S/4HANA. It reads from 2 data sources (I_BillingDocumentItem, I_MstrProjBillingDocFlow) and exposes 34 fields with key fields SalesDocument, SalesDocumentItem, BillingDocument. It has 4 associations to related views.

Data Sources (2)

SourceAliasJoin Type
I_BillingDocumentItem BillingDocumentItem inner
I_MstrProjBillingDocFlow Hierarchy from

Associations (4)

CardinalityTargetAliasCondition
[0..1] I_MPCustomerClearedItem _ClearingAccountingDocument ( $projection.BillingDocument = _ClearingAccountingDocument.ReferenceDocument and Hierarchy.SalesDocument = _ClearingAccountingDocument.SalesDocument and Hierarchy.SalesDocumentItem = _ClearingAccountingDocument.SalesDocumentItem ) or ( $projection.BillingDocument = _ClearingAccountingDocument.ReferenceDocument and _ClearingAccountingDocument.SalesDocument='')
[0..1] I_MPPartialPayment _PartiallyReceivable $projection.BillingDocument = _PartiallyReceivable.BillingDocument
[0..1] I_SalesDocument _SalesDocument $projection.SalesDocument = _SalesDocument.SalesDocument
[0..1] I_Customer _Customer $projection.soldtoparty = _Customer.Customer

Annotations (10)

NameValueLevelField
AbapCatalog.sqlViewName IMSTRCREDITSUM view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #MANDATORY view
AccessControl.personalData.blocking #NOT_REQUIRED view
VDM.viewType #COMPOSITE view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.dataClass #MIXED view
ClientHandling.algorithm #SESSION_VARIABLE view
EndUserText.label Master Project Credit Memo Summary view

Fields (34)

KeyFieldSource TableSource FieldDescription
KEY SalesDocument I_MstrProjBillingDocFlow SalesDocument SD Document
KEY SalesDocumentItem I_MstrProjBillingDocFlow SalesDocumentItem Sales Document Item
KEY BillingDocument I_BillingDocumentItem BillingDocument SD Document
SDDocumentCategory I_MstrProjBillingDocFlow SDDocumentCategory Document Cat.
BillingQuantity I_BillingDocumentItem BillingQuantity Invoiced Qty
BillingQuantityUnit I_BillingDocumentItem BillingQuantityUnit Sales Unit
BaseUnit I_BillingDocumentItem BaseUnit Unit of Measure
ItemNetAmountOfBillingDoc
ItemGrossAmountOfBillingDoc I_BillingDocumentItem GrossAmount Gross value
BillDocItemTaxAmt I_BillingDocumentItem TaxAmount Tax Amt in Rptg Crcy
Material I_BillingDocumentItem Material Vehicle Model
TotalNetAmount
InvoiceListStatus
BillingDocumentDate
TransactionCurrency
BillingDocumentType
CreationDate
ExchangeRateDate I_BillingDocumentItem PriceDetnExchangeRateDate
NetAmountendasPurchasingDocumentAmount
MasterProject
MasterProjectType I_MstrProjBillingDocFlow MasterProjectType
MasterProjectIsConfidential I_MstrProjBillingDocFlow MasterProjectIsConfidential
MasterProjectOrganization I_MstrProjBillingDocFlow MasterProjectOrganization
MasterProjectUUID I_MstrProjBillingDocFlow MasterProjectUUID NodeID
MasterProjectName I_MstrProjBillingDocFlow MasterProjectName
ControllingObjectExternalID
ControllingObjectDescription I_MstrProjBillingDocFlow ControllingObjectDescription
UserIsInvolved I_MstrProjBillingDocFlow UserIsInvolved
SoldToParty _SalesDocument SoldToParty Sold-to Party
SalesOrganization _SalesDocument SalesOrganization Sales Organization
SubsequentDocumentCategory I_MstrProjBillingDocFlow SubsequentDocumentCategory
_Customer _Customer
_SalesDocument _SalesDocument
_BillingDocument _BillingDocument

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 I_MstrProjCreditMemoSummary.
-- 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: IMSTRCREDITSUM

CREATE VIEW I_MstrProjCreditMemoSummary AS
SELECT
  Hierarchy.SalesDocument AS SalesDocument,
  Hierarchy.SalesDocumentItem AS SalesDocumentItem,
  BillingDocumentItem.BillingDocument AS BillingDocument,
  Hierarchy.SDDocumentCategory AS SDDocumentCategory,
  BillingDocumentItem.BillingQuantity AS BillingQuantity,
  BillingDocumentItem.BillingQuantityUnit AS BillingQuantityUnit,
  BillingDocumentItem.BaseUnit AS BaseUnit,
  (BillingDocumentItem.NetAmount + BillingDocumentItem.TaxAmount) AS ItemNetAmountOfBillingDoc,
  BillingDocumentItem.GrossAmount AS ItemGrossAmountOfBillingDoc,
  BillingDocumentItem.TaxAmount AS BillDocItemTaxAmt,
  BillingDocumentItem.Material AS Material,
  (BillingDocumentItem._BillingDocument.TotalNetAmount + BillingDocumentItem._BillingDocument.TotalTaxAmount) AS TotalNetAmount,
  BillingDocumentItem._BillingDocument.OverallBillingStatus AS InvoiceListStatus,
  BillingDocumentItem._BillingDocument.BillingDocumentDate AS BillingDocumentDate,
  BillingDocumentItem._BillingDocument.TransactionCurrency AS TransactionCurrency,
  BillingDocumentItem._BillingDocument.BillingDocumentType AS BillingDocumentType,
  cast(BillingDocumentItem.CreationDate as /cpd/cpm_creationdate ) AS CreationDate,
  BillingDocumentItem.PriceDetnExchangeRateDate AS ExchangeRateDate,
  case when _ClearingAccountingDocument.PurchasingDocumentAmount is not null then _ClearingAccountingDocument.PurchasingDocumentAmount when _PartiallyReceivable.AmountInCompanyCodeCurrency is not null then -(_PartiallyReceivable.AmountInCompanyCodeCurrency) when _ClearingAccountingDocument.SalesDocument is initial and _ClearingAccountingDocument.ReferenceDocument = BillingDocumentItem.BillingDocument then BillingDocumentItem.NetAmount end as PurchasingDocumentAmount AS NetAmountendasPurchasingDocumentAmount,
  cast(Hierarchy.MasterProject as /cpd/cpm_comlprojid) AS MasterProject,
  Hierarchy.MasterProjectType AS MasterProjectType,
  Hierarchy.MasterProjectIsConfidential AS MasterProjectIsConfidential,
  Hierarchy.MasterProjectOrganization AS MasterProjectOrganization,
  Hierarchy.MasterProjectUUID AS MasterProjectUUID,
  Hierarchy.MasterProjectName AS MasterProjectName,
  ltrim(Hierarchy.ControllingObjectExternalID,'0') AS ControllingObjectExternalID,
  Hierarchy.ControllingObjectDescription AS ControllingObjectDescription,
  Hierarchy.UserIsInvolved AS UserIsInvolved,
  _SalesDocument.SoldToParty AS SoldToParty,
  _SalesDocument.SalesOrganization AS SalesOrganization,
  Hierarchy.SubsequentDocumentCategory AS SubsequentDocumentCategory
FROM I_MstrProjBillingDocFlow AS Hierarchy
INNER JOIN I_BillingDocumentItem AS BillingDocumentItem ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_MPCustomerClearedItem AS _ClearingAccountingDocument ON ( BillingDocument = _ClearingAccountingDocument.ReferenceDocument AND Hierarchy.SalesDocument = _ClearingAccountingDocument.SalesDocument AND Hierarchy.SalesDocumentItem = _ClearingAccountingDocument.SalesDocumentItem ) OR ( BillingDocument = _ClearingAccountingDocument.ReferenceDocument AND _ClearingAccountingDocument.SalesDocument='')  -- association [0..1]
LEFT OUTER JOIN I_MPPartialPayment AS _PartiallyReceivable ON BillingDocument = _PartiallyReceivable.BillingDocument  -- association [0..1]
LEFT OUTER JOIN I_SalesDocument AS _SalesDocument ON SalesDocument = _SalesDocument.SalesDocument  -- association [0..1]
LEFT OUTER JOIN I_Customer AS _Customer ON soldtoparty = _Customer.Customer  -- association [0..1]
;