C_MatlLdgrDebitCreditDocument

DDL: C_MATLLDGRDEBITCREDITDOCUMENT Type: view_entity CONSUMPTION Package: ODATA_ML_DSPMATLDBCRDOCS

ML Documents for Debit Credit

C_MatlLdgrDebitCreditDocument is a Consumption CDS View that provides data about "ML Documents for Debit Credit" in SAP S/4HANA. It reads from 1 data source (R_DebitCreditDocument) and exposes 26 fields with key fields PriceChangeDocument, MaterialLedgerDocumentYear. It has 1 association to related views. It is exposed through 2 OData services (ASQL_F8982, FML_DSPMATLDBCRDOCS). Part of development package ODATA_ML_DSPMATLDBCRDOCS.

Data Sources (1)

SourceAliasJoin Type
R_DebitCreditDocument R_DebitCreditDocument projection

Associations (1)

CardinalityTargetAliasCondition
[0..*] C_MatlLdgrDocToAcctgDocument _AccountingDocument $projection.ReferenceDocumentType = _AccountingDocument.ReferenceDocumentType and $projection.OriginalReferenceDocument = _AccountingDocument.OriginalReferenceDocument and $projection.PriceChangeDocument <> _AccountingDocument.AccountingDocument and $projection.CompanyCode = _AccountingDocument.CompanyCode

Annotations (9)

NameValueLevelField
AccessControl.authorizationCheck #MANDATORY view
AccessControl.personalData.blocking #NOT_REQUIRED view
Metadata.allowExtensions true view
VDM.viewType #CONSUMPTION view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
Search.searchable true view
EndUserText.label ML Documents for Debit Credit view

OData Services (2)

ServiceBindingVersionContractRelease
ASQL_F8982 ASQL_F8982 C2 NOT_RELEASED
FML_DSPMATLDBCRDOCS FML_DSPMATLDBCRDOCS V4 C1 NOT_RELEASED

Fields (26)

KeyFieldSource TableSource FieldDescription
KEY PriceChangeDocument PriceChangeDocument
KEY MaterialLedgerDocumentYear MaterialLedgerDocumentYear
ReferenceDocumentType ReferenceDocumentType Reference Document Type
DocumentDate Journal Entry Date
CreationDateTime Timestamp
CreatedByUser CreatedByUser User Name
CreatedByUserName _CreatedBy FullName Name
ExecutedTransaction ExecutedTransaction
DocumentHeaderText DocumentHeaderText Doc.Header Text
CompanyCode Receiver Company Code
CompanyCodeName Company Name
FiscalYear G/L Fiscal Year
FiscalPeriod Tax period
OriginalReferenceDocument Reference Key
virtualPlantwerks_d
virtualPlantNamewerks_name
virtualMaterialmatnr
virtualMaterialNamemaktx
virtualLedgerfins_ledger
virtualLedgerNamefins_ledgername
virtualSalesDocumentvbeln
virtualInvtryValnSpecialStockTypesobkz
virtualWBSElementExternalIDps_posid_edit
virtualWBSDescriptionps_s4_post1
_AccountingDocument _AccountingDocument
_CreatedBy _CreatedBy

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_MatlLdgrDebitCreditDocument.
-- 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.

CREATE VIEW C_MatlLdgrDebitCreditDocument AS
SELECT
  PriceChangeDocument,
  MaterialLedgerDocumentYear,
  ReferenceDocumentType,
  cast(DocumentDate as bldat preserving type ) AS DocumentDate,
  cast(CreationDateTime as fml_mpchd_creationdatetime preserving type ) AS CreationDateTime,
  CreatedByUser,
  _CreatedBy.FullName AS CreatedByUserName,
  ExecutedTransaction,
  DocumentHeaderText,
  cast(CompanyCode as fis_bukrs preserving type) AS CompanyCode,
  cast(CompanyCodeName as fis_butxt preserving type) AS CompanyCodeName,
  cast(FiscalYear as fis_gjahr_no_conv preserving type ) AS FiscalYear,
  cast(FiscalPeriod as fins_fiscalperiod preserving type) AS FiscalPeriod,
  cast(OriginalReferenceDocument as fac_awkey preserving type) AS OriginalReferenceDocument,
  virtual Plant : werks_d AS virtualPlantwerks_d,
  virtual PlantName : werks_name AS virtualPlantNamewerks_name,
  virtual Material : matnr AS virtualMaterialmatnr,
  virtual MaterialName : maktx AS virtualMaterialNamemaktx,
  virtual Ledger : fins_ledger AS virtualLedgerfins_ledger,
  virtual LedgerName : fins_ledgername AS virtualLedgerNamefins_ledgername,
  virtual SalesDocument : vbeln AS virtualSalesDocumentvbeln,
  virtual InvtryValnSpecialStockType : sobkz AS virtualInvtryValnSpecialStockTypesobkz,
  virtual WBSElementExternalID : ps_posid_edit AS virtualWBSElementExternalIDps_posid_edit,
  virtual WBSDescription : ps_s4_post1 AS virtualWBSDescriptionps_s4_post1
FROM R_DebitCreditDocument
LEFT OUTER JOIN C_MatlLdgrDocToAcctgDocument AS _AccountingDocument ON ReferenceDocumentType = _AccountingDocument.ReferenceDocumentType AND OriginalReferenceDocument = _AccountingDocument.OriginalReferenceDocument AND PriceChangeDocument <> _AccountingDocument.AccountingDocument AND CompanyCode = _AccountingDocument.CompanyCode  -- association [0..*]
;