P_RAMNLREVNSPRDGBYPERIODTP

CDS View

Private RA Manual Spreading per Period

P_RAMNLREVNSPRDGBYPERIODTP is a CDS View in S/4HANA. Private RA Manual Spreading per Period. It contains 4 fields. 1 CDS views read from this table.

CDS Views using this table (1)

ViewTypeJoinVDMDescription
C_RAMnlRevnSprdgByPeriodTP view_entity from CONSUMPTION RA Manual Spreading By Period

Fields (4)

KeyField CDS FieldsUsed in Views
KEY FiscalPeriod FiscalPeriod 1
KEY FiscalYear FiscalYear 1
KEY PerformanceObligation PerformanceObligation 1
KEY RevenueAccountingContract RevenueAccountingContract 1
@AbapCatalog.viewEnhancementCategory: [ #NONE ]

@AccessControl.authorizationCheck: #NOT_REQUIRED

@Metadata.ignorePropagatedAnnotations: true

@ObjectModel.usageType: { serviceQuality: #X, sizeCategory: #S, dataClass: #MIXED }

@VDM.private: true
@VDM.viewType: #COMPOSITE

define view entity P_RAMnlRevnSprdgByPeriodTP
  as select from P_RAPerfOblignAllPeriods

  association [0..1] to P_RADeferralItemAggrgdRevn as _aggregatedRevenue
    on  $projection.PerformanceObligation     = _aggregatedRevenue.PerformanceObligation
    and $projection.RevenueAccountingContract = _aggregatedRevenue.RevenueAccountingContract
    and $projection.FiscalYear                = _aggregatedRevenue.FiscalYear
    and $projection.FiscalPeriod              = _aggregatedRevenue.FiscalPeriod

  association [0..1] to P_RAFlfmtAggrgdMnlSprdgAmt as _aggregatedMnlSprdgAmt
    on  $projection.PerformanceObligation     = _aggregatedMnlSprdgAmt.PerformanceObligation
    and $projection.RevenueAccountingContract = _aggregatedMnlSprdgAmt.RevenueAccountingContract
    and $projection.FiscalYear                = _aggregatedMnlSprdgAmt.FiscalYear
    and $projection.FiscalPeriod              = _aggregatedMnlSprdgAmt.FiscalPeriod

  association [0..1] to P_RAContrLastSplitFull    as _lastSplit
    on $projection.RevenueAccountingContract = _lastSplit.RevenueAccountingContract

  association [0..1] to I_RAPeriodSetting          as _periodSetting
    on  $projection.AccountingPrinciple = _periodSetting.AccountingPrinciple
    and $projection.CompanyCode         = _periodSetting.CompanyCode

{
  key PerformanceObligation,
  key FiscalYear,
  key FiscalPeriod,
      RevenueAccountingContract,

      CompanyCode,

      AccountingPrinciple,

      @Semantics.amount.currencyCode: 'SalesDocumentCurrency'
      _aggregatedRevenue.DeltaRecognizedAmtInSlsDocCrcy,

      @Semantics.amount.currencyCode: 'SalesDocumentCurrency'
      _aggregatedRevenue.RecgdCatchUpAmtInSlsDocCrcy,

      @Semantics.amount.currencyCode: 'SalesDocumentCurrency'
      _aggregatedMnlSprdgAmt.FulfilledAmountInSlsDocCrcy,

      _aggregatedRevenue.SalesDocumentCurrency,

      @Semantics.quantity.unitOfMeasure: 'FulfilledQuantityUnit'
      _aggregatedMnlSprdgAmt.ReportedFulfilledQuantity,

      _aggregatedMnlSprdgAmt.FulfilledQuantityUnit,


      // split edit field status

      case when FiscalYear < _lastSplit.FiscalYear
           then 'X'
           else case
                  when FiscalYear   = _lastSplit.FiscalYear
                   and FiscalPeriod < _lastSplit.FiscalPeriod
                  then 'X'
                  else ' '
                end
      end as NotEditableSplit,

      // period edit field status

      case
        when FiscalYear < _periodSetting.FiscalYear
        then 'X'
        else case
               when (     FiscalYear    = _periodSetting.FiscalYear
                      and FiscalPeriod  < _periodSetting.FiscalPeriod
                      and _periodSetting.PostingPeriodStatus <> 'I' )
                 or (     FiscalYear    = _periodSetting.FiscalYear
                      and FiscalPeriod <= _periodSetting.FiscalPeriod
                      and _periodSetting.PostingPeriodStatus  = 'I' )
               then 'X'
               else ' '
             end

      end as NotEditablePeriod

}