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 1 OData service (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 and $projection.FiscalYear = _AccountingDocument.FiscalYear

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 (1)

ServiceBindingVersionContractRelease
FML_DSPMATLDBCRDOCS FML_DSPMATLDBCRDOCS V4 C1 NOT_RELEASED

Fields (26)

KeyFieldSource TableSource FieldDescription
KEY PriceChangeDocument PriceChangeDocument
KEY MaterialLedgerDocumentYear MaterialLedgerDocumentYear
ReferenceDocumentType ReferenceDocumentType
DocumentDate
CreationDateTime
CreatedByUser CreatedByUser
CreatedByUserName _CreatedBy FullName
ExecutedTransaction ExecutedTransaction
DocumentHeaderText DocumentHeaderText
CompanyCode
CompanyCodeName
FiscalYear
FiscalPeriod
OriginalReferenceDocument
virtualPlantwerks_d
virtualPlantNamewerks_name
virtualMaterialmatnr
virtualMaterialNamemaktx
virtualLedgerfins_ledger
virtualLedgerNamefins_ledgername
virtualSalesDocumentvbeln
virtualInvtryValnSpecialStockTypesobkz
virtualWBSElementExternalIDps_posid_edit
virtualWBSDescriptionps_s4_post1
_AccountingDocument _AccountingDocument
_CreatedBy _CreatedBy
@AccessControl.authorizationCheck: #MANDATORY
@AccessControl.personalData.blocking: #NOT_REQUIRED
@Metadata.allowExtensions: true
@VDM: {
  viewType: #CONSUMPTION
}
@ObjectModel.usageType:{ serviceQuality: #C,
                         sizeCategory: #XL,
                         dataClass: #TRANSACTIONAL }
@Search.searchable: true
@AccessControl.privilegedAssociations: ['_CreatedBy']
@EndUserText.label: 'ML Documents for Debit Credit'
define root view entity C_MatlLdgrDebitCreditDocument
  provider contract transactional_query
  as projection on R_DebitCreditDocument

  association [0..*] to C_MatlLdgrDocToAcctgDocument as _AccountingDocument on  $projection.ReferenceDocumentType     =  _AccountingDocument.ReferenceDocumentType
                                                                            and $projection.OriginalReferenceDocument =  _AccountingDocument.OriginalReferenceDocument
                                                                            and $projection.PriceChangeDocument       <> _AccountingDocument.AccountingDocument
                                                                            and $projection.CompanyCode               =  _AccountingDocument.CompanyCode
                                                                            and $projection.FiscalYear                =  _AccountingDocument.FiscalYear
{
              @Search: { defaultSearchElement: true, ranking: #HIGH, fuzzinessThreshold: 0.7 }
  key         PriceChangeDocument,
              @Search: { defaultSearchElement: true, ranking: #LOW, fuzzinessThreshold: 0.9 }
  key         MaterialLedgerDocumentYear,
              ReferenceDocumentType,
              @Search: { defaultSearchElement: true, ranking: #MEDIUM, fuzzinessThreshold: 0.95 }
              cast(DocumentDate as bldat preserving type )                                                         as DocumentDate,
              cast(CreationDateTime as fml_mpchd_creationdatetime preserving type )                                as CreationDateTime,
              @ObjectModel.foreignKey.association: '_CreatedBy'
              @ObjectModel: { text.element: ['CreatedByUserName'] }
              @Search: { defaultSearchElement: true, ranking: #MEDIUM, fuzzinessThreshold: 0.8 }
              CreatedByUser,
              @Semantics.nullValueIndicatorFor: 'CreatedByUser'
              ConditionRateValueIsNull,
              @Semantics.text: true
              _CreatedBy.FullName                                                                                  as CreatedByUserName,
              @Search: { defaultSearchElement: true, ranking: #MEDIUM, fuzzinessThreshold: 0.8 }
              ExecutedTransaction,
              @Search: { defaultSearchElement: true, ranking: #MEDIUM, fuzzinessThreshold: 0.8 }
              DocumentHeaderText,
//              cast(PostingDate as fis_budat preserving type)                                                       as PostingDate,

              @ObjectModel: { text.element: ['CompanyCodeName'] }
              cast(CompanyCode as fis_bukrs  preserving type)                                                      as CompanyCode,
              @Semantics.text: true
              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,
    
              @ObjectModel: { virtualElement: true,
                              filter.transformedBy: 'ABAP:CL_FML_MDBCR_FILTER_TRANSFORM',
                              text.element: ['PlantName'] }
  virtual     Plant                          : werks_d,

              @ObjectModel: { virtualElement: true}
              @Semantics.text: true
  virtual     PlantName                      : werks_name,

              @ObjectModel: { virtualElement: true,
                              filter.transformedBy: 'ABAP:CL_FML_MDBCR_FILTER_TRANSFORM',
                              text.element: ['MaterialName']}
  virtual     Material                       : matnr,

              @ObjectModel: { virtualElement: true}
              @Semantics.text: true
  virtual     MaterialName                   : maktx,

              @ObjectModel: { virtualElement: true,
                              filter.transformedBy: 'ABAP:CL_FML_MDBCR_FILTER_TRANSFORM',
                              text.element: ['LedgerName'] }
  virtual     Ledger                         : fins_ledger,

              @ObjectModel: { virtualElement: true}
              @Semantics.text: true
  virtual     LedgerName                     : fins_ledgername,

              @ObjectModel: { virtualElement: true,
                              filter.transformedBy: 'ABAP:CL_FML_MDBCR_FILTER_TRANSFORM',
                              text.element: ['LegalCurrencyRoleName'] }
  virtual     LegalCurrencyRole              : fml_legal_curtype,

              @ObjectModel: { virtualElement: true}
              @Semantics.text: true
  virtual     LegalCurrencyRoleName          : fins_legalcurrencytypename,

              @ObjectModel: { virtualElement: true,
                              filter.transformedBy: 'ABAP:CL_FML_MDBCR_FILTER_TRANSFORM',
                              text.element: ['AcctgValnVwSubviewCombinedName'] }    
              @Semantics.text: true                             
  virtual     AcctgValnVwSubviewCombinedName : fml_umip_valuviewname,

              @ObjectModel: { virtualElement: true,
                              filter.transformedBy: 'ABAP:CL_FML_MDBCR_FILTER_TRANSFORM' }
  virtual     SalesDocument                  : vbeln,


//              @ObjectModel: { virtualElement: true,

//                              filter.transformedBy: 'ABAP:CL_FML_MDBCR_FILTER_TRANSFORM',

//                              text.element: ['SupplierName'] }

//  virtual     InventorySpecialStockSupplier  : lifnr,


              @ObjectModel: { virtualElement: true,
                              filter.transformedBy: 'ABAP:CL_FML_MDBCR_FILTER_TRANSFORM',
                              text.element: ['WBSDescription'] }
  virtual     InvtryValnSpecialStockType     : sobkz,

              @ObjectModel: { virtualElement: true,
                              filter.transformedBy: 'ABAP:CL_FML_MDBCR_FILTER_TRANSFORM',
                              text.element: ['WBSDescription'] }
  virtual     WBSElementExternalID           : ps_posid_edit,

              @ObjectModel: { virtualElement: true,
                            filter.transformedBy: 'ABAP:CL_FML_MDBCR_FILTER_TRANSFORM' }           
  virtual     ValuationType                  : fml_mpchd_valuation_type,  
  
//              @Semantics.text: true

//  virtual     SupplierName                   : md_supplier_name,

      
              @Semantics.text: true
  virtual     WBSDescription                 : ps_s4_post1,

              @ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_FML_MDBCR_VISIBILITY_CALC'
              @UI.hidden: true
  virtual     AccountingDocumentIsHidden   : fml_mdbcr_acc_doc_is_hidden,

              /* Associations */
              _AccountingDocument,
              _CreatedBy,
              _Item : redirected to composition child C_MatlLdgrDebitCreditDocItem

}