P_BusSolnOrdHdrData

DDL: P_BUSSOLNORDHDRDATA SQL: PBUSSOLNORDDATA Type: view COMPOSITE

P_BusSolnOrdHdrData is a Composite CDS View in SAP S/4HANA. It reads from 1 data source (I_ServiceDocumentEnhcd) and exposes 38 fields with key fields ServiceObjectType, BusinessSolutionOrder. It has 1 association to related views.

Data Sources (1)

SourceAliasJoin Type
I_ServiceDocumentEnhcd I_ServiceDocumentEnhcd from

Associations (1)

CardinalityTargetAliasCondition
[0..1] I_CalendarDate _Period $projection.ServiceDocumentCreationDate = _Period.CalendarDate

Annotations (9)

NameValueLevelField
AbapCatalog.sqlViewName PBUSSOLNORDDATA view
ClientHandling.algorithm #SESSION_VARIABLE view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
VDM.private true view
VDM.viewType #COMPOSITE view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #XXL view

Fields (38)

KeyFieldSource TableSource FieldDescription
KEY ServiceObjectType ServiceObjectType
KEY BusinessSolutionOrder ServiceDocument
BusSolnOrdType ServiceDocumentType
BusSolnOrdDescription ServiceDocumentDescription
DistributionChannel DistributionChannel
Division Division
SalesOrganization SalesOrganization
SalesOffice SalesOffice
SalesGroup SalesGroup
SoldToParty SoldToParty
SoldToPartyCountry SoldToPartyCountry
SoldToPartyRegion SoldToPartyRegion
TransactionCurrency TransactionCurrency
BusSolnOrdStatus ServiceDocumentStatus
int4asNrOfOpenBusSolnOrders
int4asNrOfReldBusSolnOrders
int4asNrOfCmpltdBusSolnOrders
NrOfCrtedBusSolnOrders
ServiceDocNetAmount ServiceDocNetAmount
ServiceDocumentCreationDate ServiceDocumentCreationDate
BusSolnOrdCreationQuarter _Period CalendarQuarter
BusSolnOrdCreationMonth _Period CalendarMonth
BusSolnOrdCreationYear _Period CalendarYear
PostingDate PostingDate
_Period _Period
_ServiceObjType _ServiceObjType
_ServiceDocumentType _ServiceDocumentType
_DistributionChannel _DistributionChannel
_Division _Division
_SalesOrganization _SalesOrganization
_SalesOffice _SalesOffice
_SalesGroup _SalesGroup
_SoldToParty _SoldToParty
_SoldToPartyCountry _SoldToPartyCountry
_SoldToPartyRegion _SoldToPartyRegion
_TransactionCurrency _TransactionCurrency
_ServiceDocumentStatus _ServiceDocumentStatus
_SrvcDocLifecycleStatus _SrvcDocLifecycleStatus
@AbapCatalog.sqlViewName: 'PBUSSOLNORDDATA'
@ClientHandling.algorithm: #SESSION_VARIABLE
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@VDM: {
   private:true,
   viewType: #COMPOSITE
}

@AccessControl: {
  personalData.blocking: #('TRANSACTIONAL_DATA')
}
@ObjectModel: {
   usageType: {
     dataClass:      #MIXED,
     serviceQuality: #D,
     sizeCategory:   #XXL
   }
}

define view P_BusSolnOrdHdrData
  as select from I_ServiceDocumentEnhcd
  association [0..1] to I_CalendarDate as _Period on $projection.ServiceDocumentCreationDate = _Period.CalendarDate
{
      @ObjectModel.foreignKey.association: '_ServiceObjType'
  key ServiceObjectType,
      @ObjectModel.text.element: 'ServiceDocumentDescription'
  key ServiceDocument            as BusinessSolutionOrder,
      @ObjectModel.foreignKey.association: '_ServiceDocumentType'
      ServiceDocumentType        as BusSolnOrdType,
      @Semantics.text: true
      ServiceDocumentDescription as BusSolnOrdDescription,
      @ObjectModel.foreignKey.association: '_DistributionChannel'
      DistributionChannel,
      @ObjectModel.foreignKey.association: '_Division'
      Division,
      @ObjectModel.foreignKey.association: '_SalesOrganization'
      SalesOrganization,
      @ObjectModel.foreignKey.association: '_SalesOffice'
      SalesOffice,
      @ObjectModel.foreignKey.association: '_SalesGroup'
      SalesGroup,
      @ObjectModel.foreignKey.association: '_SoldToParty'
      SoldToParty,
      @ObjectModel.foreignKey.association: '_SoldToPartyCountry'
      SoldToPartyCountry,
      @ObjectModel.foreignKey.association: '_SoldToPartyRegion'
      SoldToPartyRegion,
      @ObjectModel.foreignKey.association: '_TransactionCurrency'
      @Semantics.currencyCode:true
      TransactionCurrency,
      @ObjectModel.foreignKey.association: '_SrvcDocLifecycleStatus'
      ServiceDocumentStatus      as BusSolnOrdStatus,
      @DefaultAggregation: #SUM
      cast( case when (ServiceDocumentIsOpen = 'X' and ServiceDocumentIsReleased = '')
            then 1
            else 0
            end as abap.int4 )   as NrOfOpenBusSolnOrders,
      @DefaultAggregation: #SUM
      cast( case when ServiceDocumentIsReleased = 'X'
            then 1
            else 0
            end as abap.int4 )   as NrOfReldBusSolnOrders,
      @DefaultAggregation: #SUM
      cast( case when (ServiceDocumentIsOpen = '' and ServiceDocumentIsReleased = '')
            then 1
            else 0
            end as abap.int4 )   as NrOfCmpltdBusSolnOrders,






      @DefaultAggregation: #SUM
      cast(1 as abap.int4)       as NrOfCrtedBusSolnOrders,
      @DefaultAggregation: #SUM
      @Semantics: { amount : {currencyCode: 'TransactionCurrency'} }
      ServiceDocNetAmount,
      ServiceDocumentCreationDate,
      @Semantics.calendar.quarter
      _Period.CalendarQuarter    as BusSolnOrdCreationQuarter,
      @Semantics.calendar.month
      _Period.CalendarMonth      as BusSolnOrdCreationMonth,
      @Semantics.calendar.year
      _Period.CalendarYear       as BusSolnOrdCreationYear,
      PostingDate,

      _Period,
      _ServiceObjType,
      _ServiceDocumentType,
      _DistributionChannel,
      _Division,
      _SalesOrganization,
      _SalesOffice,
      _SalesGroup,
      _SoldToParty,
      _SoldToPartyCountry,
      _SoldToPartyRegion,
      _TransactionCurrency,
      @API.element.releaseState: #DEPRECATED
      @API.element.successor: '_SrvcDocLifecycleStatus'
      _ServiceDocumentStatus,
      _SrvcDocLifecycleStatus

}
where
  ServiceObjectType = 'BUS2000172'
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_CALENDARDATE",
"I_SERVICEDOCUMENTENHCD"
],
"ASSOCIATED":
[
"I_BUSINESSPARTNER",
"I_CALENDARDATE",
"I_COUNTRY",
"I_CURRENCY",
"I_CUSTMGMTBUSOBJTYPE",
"I_DISTRIBUTIONCHANNEL",
"I_DIVISION",
"I_REGION",
"I_SALESGROUP",
"I_SALESOFFICE",
"I_SALESORGANIZATION",
"I_SERVICEDOCUMENTSTATUS",
"I_SERVICEDOCUMENTTYPE",
"I_SRVCDOCLIFECYCLESTATUS"
],
"BASE":
[
"I_SERVICEDOCUMENTENHCD"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/