I_SubscriptionContract

DDL: I_SUBSCRIPTIONCONTRACT Type: view_entity COMPOSITE Package: CRMS4_SOM_LEGACY

Subscription Contract

I_SubscriptionContract is a Composite CDS View that provides data about "Subscription Contract" in SAP S/4HANA. It reads from 1 data source (I_ServiceDocumentEnhcd) and exposes 50 fields with key field SubscriptionContract. It has 3 associations to related views. Part of development package CRMS4_SOM_LEGACY.

Data Sources (1)

SourceAliasJoin Type
I_ServiceDocumentEnhcd I_ServiceDocumentEnhcd from

Associations (3)

CardinalityTargetAliasCondition
[0..*] I_SubscriptionContractItem _Item $projection.SubscriptionContract = _Item.SubscriptionContract
[0..1] I_ServiceDocumentStatus _SubscriptionContractStatus $projection.SubscriptionContractStatus = _SubscriptionContractStatus.ServiceDocumentStatus
[0..1] E_ServiceDocument _Extension _Extension.ServiceCategory = 'BUS2000266' and $projection.SubscriptionContract = _Extension.ServiceOrder

Annotations (9)

NameValueLevelField
EndUserText.label Subscription Contract view
VDM.viewType #COMPOSITE view
VDM.lifecycle.contract.type #SAP_INTERNAL_API view
AccessControl.authorizationCheck #CHECK view
ObjectModel.representativeKey SubscriptionContract view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #L view
Metadata.ignorePropagatedAnnotations true view

Fields (50)

KeyFieldSource TableSource FieldDescription
KEY SubscriptionContract ServiceDocument
SubscriptionContractType ServiceDocumentType
SubscrpnContractDescription ServiceDocumentDescription
SubscriptionContractUUID ServiceDocumentUUID
ServiceObjectType ServiceObjectType
ServiceDocumentType ServiceDocumentType
Language Language
SubscriptionContractPostingDte PostingDate
SubscriptionContractStatus ServiceDocumentStatus
SubscriptionContractHasError ServiceDocumentHasError
PricingDocument PricingDocument
PricingProcedure PricingProcedure
SalesOrganization SalesOrganization
SalesOffice SalesOffice
SalesGroup SalesGroup
SalesOrganizationOrgUnitID SalesOrganizationOrgUnitID
SalesOfficeOrgUnitID SalesOfficeOrgUnitID
SalesGroupOrgUnitID SalesGroupOrgUnitID
DistributionChannel DistributionChannel
Division Division
ServiceOrganization ServiceOrganization
SoldToParty SoldToParty
ShipToParty ShipToParty
BillToParty BillToParty
PayerParty PayerParty
ContactPersonBusinessPartnerId ContactPerson
RespEmployeeBusinessPartnerId ResponsibleEmployee
PurchaseOrderByCustomer PurchaseOrderByCustomer
CreatedByUser ServiceDocumentCreatedByUser
CreationDateTime ServiceDocCreationDateTime
LastChangedByUser ServiceDocumentChangedByUser
LastChangeDateTime ServiceDocChangedDateTime
_ServiceObjType _ServiceObjType
_SoldToParty _SoldToParty
_ShipToParty _ShipToParty
_BillToParty _BillToParty
_PayerParty _PayerParty
_SalesOrganization _SalesOrganization
_SalesOffice _SalesOffice
_SalesGroup _SalesGroup
_SalesOrganizationOrgUnit_2 _SalesOrganizationOrgUnit_2
_SalesOfficeOrgUnit_2 _SalesOfficeOrgUnit_2
_SalesGroupOrgUnit_2 _SalesGroupOrgUnit_2
_DistributionChannel _DistributionChannel
_Division _Division
_ServiceOrganizationOrgUnit_2 _ServiceOrganizationOrgUnit_2
_ContactPerson _ContactPerson
_RespEmployee _RespEmployee
_SubscriptionContractStatus _SubscriptionContractStatus
_Item _Item
@EndUserText.label: 'Subscription Contract'

@VDM: {
  viewType: #COMPOSITE,
  lifecycle.contract.type: #SAP_INTERNAL_API
}

@AccessControl: {
  authorizationCheck: #CHECK,
  personalData.blocking: #('TRANSACTIONAL_DATA')
}

@ObjectModel: {
   representativeKey: 'SubscriptionContract',
   usageType: {
     dataClass:      #TRANSACTIONAL,
     serviceQuality: #C,
     sizeCategory:   #L
   }
}
@Metadata.ignorePropagatedAnnotations: true

define view entity I_SubscriptionContract
  as select from I_ServiceDocumentEnhcd

  association [0..*] to I_SubscriptionContractItem as _Item                       on  $projection.SubscriptionContract = _Item.SubscriptionContract

  association [0..1] to I_ServiceDocumentStatus    as _SubscriptionContractStatus on  $projection.SubscriptionContractStatus = _SubscriptionContractStatus.ServiceDocumentStatus


  association [0..1] to E_ServiceDocument          as _Extension                  on  _Extension.ServiceCategory       = 'BUS2000266'
                                                                                  and $projection.SubscriptionContract = _Extension.ServiceOrder

{
  key ServiceDocument              as SubscriptionContract,
      ServiceDocumentType          as SubscriptionContractType,
      @Semantics.text: true
      ServiceDocumentDescription   as SubscrpnContractDescription,
      ServiceDocumentUUID          as SubscriptionContractUUID,
      ServiceObjectType,
      ServiceDocumentType,

      Language,
      PostingDate                  as SubscriptionContractPostingDte,

      /* STATUS */
      @ObjectModel.foreignKey.association: '_SubscriptionContractStatus'
      ServiceDocumentStatus        as SubscriptionContractStatus,

      @Semantics.booleanIndicator: true
      case
        when ServiceDocumentStatus = 'C' then 'X'
        when ServiceDocumentStatus <> 'C' then ''
      end                          as SubscrpnContractIsCompleted,

      @Semantics.booleanIndicator: true
      ServiceDocumentHasError      as SubscriptionContractHasError,

      /* PRICING */
      PricingDocument,
      PricingProcedure,

      /* Organizational units with the S/4 SD codes */
      SalesOrganization,
      SalesOffice,
      SalesGroup,

      /* ORGANIZATION UNIT */
      SalesOrganizationOrgUnitID,
      SalesOfficeOrgUnitID,
      SalesGroupOrgUnitID,
      DistributionChannel,
      Division,
      ServiceOrganization,

      /* PARTNER */
      SoldToParty,
      ShipToParty,
      BillToParty,
      PayerParty,
      @ObjectModel.foreignKey.association: '_ContactPerson'
      ContactPerson                as ContactPersonBusinessPartnerId,
      @ObjectModel.foreignKey.association: '_RespEmployee'
      ResponsibleEmployee          as RespEmployeeBusinessPartnerId,

      /* EXTERNAL REFERENCE*/
      PurchaseOrderByCustomer,

      ServiceDocumentCreatedByUser as CreatedByUser,
      @Semantics.dateTime:true
      ServiceDocCreationDateTime   as CreationDateTime,
      ServiceDocumentChangedByUser as LastChangedByUser,
      @Semantics.dateTime:true
      ServiceDocChangedDateTime    as LastChangeDateTime,

      //Associations

      _ServiceObjType,
      _SoldToParty,
      _ShipToParty,
      _BillToParty,
      _PayerParty,
      _SalesOrganization,
      _SalesOffice,
      _SalesGroup,
      _SalesOrganizationOrgUnit_2,
      _SalesOfficeOrgUnit_2,
      _SalesGroupOrgUnit_2,
      _DistributionChannel,
      _Division,
      _ServiceOrganizationOrgUnit_2,
      _ContactPerson,
      _RespEmployee,
      _SubscriptionContractStatus,

      _Item

}
where
  ServiceObjectType = 'BUS2000266'