C_MaterialLedgerDocument

DDL: C_MATERIALLEDGERDOCUMENT Type: view_entity CONSUMPTION Package: ODATA_ML_DSPMATLPRCHGDOCS

ML Documents for Price Changes

C_MaterialLedgerDocument is a Consumption CDS View that provides data about "ML Documents for Price Changes" in SAP S/4HANA. It reads from 1 data source (P_MaterialLedgerDoc) and exposes 43 fields with key fields PriceChangeDocument, MaterialLedgerDocumentYear. It has 1 association to related views. It is exposed through 1 OData service (FML_DSPMATLPRCHGDOCS). Part of development package ODATA_ML_DSPMATLPRCHGDOCS.

Data Sources (1)

SourceAliasJoin Type
P_MaterialLedgerDoc P_MaterialLedgerDoc 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 (8)

NameValueLevelField
AccessControl.authorizationCheck #MANDATORY 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 Price Changes view

OData Services (1)

ServiceBindingVersionContractRelease
FML_DSPMATLPRCHGDOCS FML_DSPMATLPRCHGDOCS V4 C1 NOT_RELEASED

Fields (43)

KeyFieldSource TableSource FieldDescription
KEY PriceChangeDocument PriceChangeDocument
KEY MaterialLedgerDocumentYear MaterialLedgerDocumentYear
MaterialLedgerTransactionType MaterialLedgerTransactionType
MatlLedgerTransactionTypeName
LedgerGroup LedgerGroup
LedgerGroupName
ReferenceDocumentType ReferenceDocumentType
ReferenceDocument ReferenceDocument
ReferenceDocumentContext ReferenceDocumentContext
ReferenceDocumentLogicalSystem ReferenceDocumentLogicalSystem
IsReversalDocument IsReversalDocument
DocumentDate
CreationDateTime
CreatedByUser CreatedByUser
CreatedByUserName _CreatedBy FullName
ExecutedTransaction ExecutedTransaction
BusinessTransactionType
BusinessTransactionTypeName
LogicalSystem LogicalSystem
DocumentHeaderText DocumentHeaderText
MatlPrChgAcctDetnDiffntnRsn
MatlPrChgAcctDetnDiffntnRsnTxt
PostingDate
CompanyCode
CompanyCodeName
OriginalReferenceDocument
FiscalYear
FiscalPeriod
virtualPlantwerks_d
virtualPlantNamewerks_name
virtualMaterialmatnr
virtualMaterialNamemaktx
virtualLedgerfins_ledger
virtualLedgerNamefins_ledgername
virtualSalesDocumentvbeln
virtualSalesDocumentItemTextarktx
virtualSalesDocumentItemposnr
virtualInvtryValnSpecialStockTypesobkz
virtualWBSElementExternalIDps_posid_edit
virtualSupplierNamemd_supplier_name
virtualWBSDescriptionps_s4_post1
_AccountingDocument _AccountingDocument
_CreatedBy _CreatedBy
@AccessControl.authorizationCheck: #MANDATORY
@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 Price Changes'
define root view entity C_MaterialLedgerDocument
  provider contract transactional_query
  as projection on P_MaterialLedgerDoc

  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,
              @ObjectModel: { text.element: ['MatlLedgerTransactionTypeName'] }
              @Search: { defaultSearchElement: true, ranking: #MEDIUM, fuzzinessThreshold: 0.8 }
              MaterialLedgerTransactionType,
              @Semantics.text: true
              _MatlLdgrTransactionType._Text[1: Language = $session.system_language].MatlLedgerTransactionTypeName as MatlLedgerTransactionTypeName,
              @ObjectModel: { text.element: ['LedgerGroupName'] }
              @Search: { defaultSearchElement: true, ranking: #MEDIUM, fuzzinessThreshold: 0.8 }
              LedgerGroup,
              @Semantics.text: true
              _LedgerGroup._Text[1: Language = $session.system_language].LedgerGroupName                           as LedgerGroupName,
              @Search: { defaultSearchElement: true, ranking: #MEDIUM, fuzzinessThreshold: 0.8 }
              ReferenceDocumentType,
              @Search: { defaultSearchElement: true, ranking: #MEDIUM, fuzzinessThreshold: 0.8 }
              ReferenceDocument,
              @Search: { defaultSearchElement: true, ranking: #MEDIUM, fuzzinessThreshold: 0.8 }
              ReferenceDocumentContext,
              @Search: { defaultSearchElement: true, ranking: #MEDIUM, fuzzinessThreshold: 0.8 }
              ReferenceDocumentLogicalSystem,
              IsReversalDocument,
              @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,
              @ObjectModel: { text.element: ['BusinessTransactionTypeName'] }
              @Search: { defaultSearchElement: true, ranking: #MEDIUM, fuzzinessThreshold: 0.8 }
              cast(BusinessTransactionType as glvor preserving type)                                               as BusinessTransactionType,
              @Semantics.text: true
              _BusinessTransactionType._Text[1: Language = $session.system_language].BusinessTransactionTypeName   as BusinessTransactionTypeName,
              @Search: { defaultSearchElement: true, ranking: #MEDIUM, fuzzinessThreshold: 0.8 }
              LogicalSystem,
              @Search: { defaultSearchElement: true, ranking: #MEDIUM, fuzzinessThreshold: 0.8 }
              DocumentHeaderText,
              @ObjectModel: { text.element: ['MatlPrChgAcctDetnDiffntnRsnTxt'] }
              @Search: { defaultSearchElement: true, ranking: #MEDIUM, fuzzinessThreshold: 0.8 }
              cast(MatlPrChgAcctDetnDiffntnRsn as fml_mpchd_revaluation_reason preserving type)                    as MatlPrChgAcctDetnDiffntnRsn,
              @Semantics.text: true
              _Reason._Text[1: Language = $session.system_language].MatlPrChgAcctDetnDiffntnRsnTxt                 as MatlPrChgAcctDetnDiffntnRsnTxt,
              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(OriginalReferenceDocument as fac_awkey preserving type)                                         as OriginalReferenceDocument,
              cast(FiscalYear as fins_gjahr preserving type)                                                       as FiscalYear,
              cast(FiscalPeriod as fins_fiscalperiod preserving type)                                              as FiscalPeriod,

              @ObjectModel: { virtualElement: true,
                              filter.transformedBy: 'ABAP:CL_FML_MPCHD_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_MPCHD_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_MPCHD_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_MPCHD_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_MPCHD_FILTER_TRANSFORM',
                              text.element: ['AcctgValnVwSubviewCombinedName']}
  virtual     AcctgValnVwSubviewCombinedName : fml_umip_valuviewname,

              @ObjectModel: { virtualElement: true,
                              filter.transformedBy: 'ABAP:CL_FML_MPCHD_FILTER_TRANSFORM' }
  virtual     SalesDocument                  : vbeln,
              @ObjectModel: { virtualElement: true}
              @Semantics.text: true
  virtual     SalesDocumentItemText          : arktx,

              @ObjectModel: { virtualElement: true,
                              filter.transformedBy: 'ABAP:CL_FML_MPCHD_FILTER_TRANSFORM' }
              @ObjectModel.text.element:  [ 'SalesDocumentItemText' ]                
  virtual     SalesDocumentItem              : posnr,

              @ObjectModel: { virtualElement: true,
                              filter.transformedBy: 'ABAP:CL_FML_MPCHD_FILTER_TRANSFORM',
                              text.element: ['SupplierName'] }
  virtual     InventorySpecialStockSupplier  : lifnr,

              @ObjectModel: { virtualElement: true,
                              filter.transformedBy: 'ABAP:CL_FML_MPCHD_FILTER_TRANSFORM' }
  virtual     InvtryValnSpecialStockType     : sobkz,

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

              @ObjectModel: { virtualElement: true,
                            filter.transformedBy: 'ABAP:CL_FML_MPCHD_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_MPCHD_VISIBILITY_CALC'
              @UI.hidden: true
  virtual     UICT_RelatedDocumentIsHidden   : abap_boolean,

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

}