P_MATERIALLEDGERDOC

CDS View

Price Change Documents

P_MATERIALLEDGERDOC is a CDS View in S/4HANA. Price Change Documents. 1 CDS views read from this table.

CDS Views using this table (1)

ViewTypeJoinVDMDescription
C_MaterialLedgerDocument view_entity projection CONSUMPTION ML Documents for Price Changes
@AbapCatalog.viewEnhancementCategory: [#NONE]
@AccessControl.authorizationCheck: #MANDATORY
@EndUserText.label: 'Price Change Documents'
@ObjectModel.usageType:{
    serviceQuality: #B,
    sizeCategory: #XL,
    dataClass: #MIXED
}
@VDM: {
  viewType: #COMPOSITE,
  private:true
}
@AccessControl.privilegedAssociations: ['_CreatedBy']
define root view entity P_MaterialLedgerDoc
  as select from I_PriceChangeDocument

  composition [0..*] of P_MaterialLedgerDocItem        as _Item
  association [0..1] to P_MaterialLedgerDocAggregation as _Aggregation             on  $projection.PriceChangeDocument        = _Aggregation.MaterialLedgerDocument
                                                                                   and $projection.MaterialLedgerDocumentYear = _Aggregation.MaterialLedgerDocumentYear
  association [0..1] to C_MatlLdgrDocUserContactCard   as _CreatedBy               on  $projection.CreatedByUser = _CreatedBy.ContactCardID
  association [0..1] to I_LedgerGroup                  as _LedgerGroup             on  $projection.LedgerGroup = _LedgerGroup.LedgerGroup
  association [0..1] to I_MatlPrChgAcctDetnDiffntnRsn  as _Reason                  on  $projection.MatlPrChgAcctDetnDiffntnRsn = _Reason.MatlPrChgAcctDetnDiffntnRsn
                                                                                   and $projection.ExecutedTransaction         = _Reason.TransactionCode
  association [0..1] to I_MatlLdgrTransactionType      as _MatlLdgrTransactionType on  $projection.MaterialLedgerTransactionType = _MatlLdgrTransactionType.MaterialLedgerTransactionType
  association [0..1] to I_BusinessTransactionType      as _BusinessTransactionType on  $projection.BusinessTransactionType = _BusinessTransactionType.BusinessTransactionType
  association [0..1] to I_CompanyCode                  as _CompanyCode             on  $projection.CompanyCode = _CompanyCode.CompanyCode
{
  key PriceChangeDocument,
  key MaterialLedgerDocumentYear,
      MaterialLedgerTransactionType,
      LedgerGroup,
      cast(ReferenceDocumentType as fml_mpchd_ref_document_type preserving type )                                                                          as ReferenceDocumentType,
      cast(ReferenceDocument as fml_mpchd_reference_document preserving type )                                                                             as ReferenceDocument,
      ReferenceDocumentContext,
      cast(ReferenceDocumentLogicalSystem as fml_mpchd_ref_doc_logic_system preserving type )                                                              as ReferenceDocumentLogicalSystem,
      cast(IsReversalDocument as fml_mpchd_reversal_document preserving type )                                                                             as IsReversalDocument,
      DocumentDate,
      CreationDate,
      CreationTime,
      cast(dats_tims_to_tstmp(CreationDate, CreationTime, abap_system_timezone($session.client, 'NULL'), $session.client, 'NULL') as fap_creationdatetime) as CreationDateTime,
      @ObjectModel.foreignKey.association: '_CreatedBy'
      CreatedByUser,
      @Semantics.nullValueIndicatorFor: 'CreatedByUser'
      case when CreatedByUser is initial or CreatedByUser is null then 'X' else '' end                                                                     as ConditionRateValueIsNull,
      ExecutedTransaction,
      BusinessTransactionType,
      LogicalSystem,
      DocumentHeaderText,
      MatlPrChgAcctDetnDiffntnRsn,
      _Aggregation.CompanyCode                                                                                                                             as CompanyCode,
      _Aggregation.CompanyCodeName,
      _Aggregation.PostingDate,
      _Aggregation.FiscalYear,
      _Aggregation.FiscalPeriod,
      cast(concat(PriceChangeDocument, MaterialLedgerDocumentYear) as fac_awkey)                                                                           as OriginalReferenceDocument,     

      _Item,
      _CreatedBy,
      _LedgerGroup,
      _Reason,
      _BusinessTransactionType,
      _MatlLdgrTransactionType,
      _CompanyCode
}
where
  _Aggregation.CompanyCode is not null