P_AgingIncrementUntilDate

DDL: P_AGINGINCREMENTUNTILDATE Type: view_entity COMPOSITE

P_AgingIncrementUntilDate is a Composite CDS View in SAP S/4HANA. It reads from 1 data source (I_GLAgingScopeIncrement) and exposes 3 fields with key fields GeneralLedgerAgingScope, GeneralLedgerAgingIncrement.

Data Sources (1)

SourceAliasJoin Type
I_GLAgingScopeIncrement I_GLAgingScopeIncrement from

Parameters (1)

NameTypeDefault
P_KeyDate abap.dats

Annotations (6)

NameValueLevelField
AccessControl.authorizationCheck #CHECK view
ObjectModel.usageType.dataClass #CUSTOMIZING view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #S view
VDM.private true view
VDM.viewType #COMPOSITE view

Fields (3)

KeyFieldSource TableSource FieldDescription
KEY GeneralLedgerAgingScope GeneralLedgerAgingScope
KEY GeneralLedgerAgingIncrement GeneralLedgerAgingIncrement
incrmt_index GLAgingIncrmtSortSqncValue
@AccessControl.authorizationCheck: #CHECK

@ObjectModel.usageType : { dataClass: #CUSTOMIZING,
                        serviceQuality: #D,
                            sizeCategory: #S }
@VDM.private: true
@VDM.viewType: #COMPOSITE



define view entity P_AgingIncrementUntilDate
  with parameters
    P_KeyDate :abap.dats
  as select from I_GLAgingScopeIncrement
{
  key GeneralLedgerAgingScope,
  key GeneralLedgerAgingIncrement,
      // start date of next aging increment

      case GLAgingIncrmtRelativeMonths
           when 32767              // set ValidityStartDate and ValidityEndDate to 9999-12-31 if GLAgingIncrmtRelativeMonths = max

           then cast('99991231' as abap.dats)
           else dats_add_days(dats_add_months($parameters.P_KeyDate,GLAgingIncrmtRelativeMonths,'INITIAL'),( GLAgingIncrmtRelativeDays ),'INITIAL')
      end                        as ValidityStartDate,
      // end date of current aging incmrent

      case GLAgingIncrmtRelativeMonths
           when 32767
           then cast('99991231' as abap.dats)
           else dats_add_days(dats_add_months($parameters.P_KeyDate,GLAgingIncrmtRelativeMonths,'INITIAL'),( GLAgingIncrmtRelativeDays - 1 ),'INITIAL')
      end                        as ValidityEndDate,
      GLAgingIncrmtSortSqncValue as incrmt_index


}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_GLAGINGSCOPEINCREMENT"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/