A_SubscriptionContract

DDL: A_SUBSCRIPTIONCONTRACT Type: view_entity CONSUMPTION Package: CRMS4_SOM_LEGACY

Subscription Contract Header

A_SubscriptionContract is a Consumption CDS View that provides data about "Subscription Contract Header" in SAP S/4HANA. It reads from 1 data source (I_ServiceDocumentEnhcd) and exposes 27 fields with key field SubscriptionContract. It has 7 associations to related views. It is exposed through 1 OData service (API_SUBSCRIPTIONCONTRACT). Part of development package CRMS4_SOM_LEGACY.

Data Sources (1)

SourceAliasJoin Type
I_ServiceDocumentEnhcd I_ServiceDocumentEnhcd from

Associations (7)

CardinalityTargetAliasCondition
[0..*] A_SubscriptionContractItem _Item $projection.SubscriptionContract = _Item.SubscriptionContract
[0..*] A_SubscriptionContractText _Text $projection.SubscriptionContract = _Text.SubscriptionContract
[0..1] E_ServiceDocument _Extension _Extension.ServiceCategory = 'BUS2000266' and $projection.SubscriptionContract = _Extension.ServiceOrder
[0..*] A_SbscrContrPrdcssrBusSolnQtn _PredecessorSolutionQuotation $projection.SubscriptionContract = _PredecessorSolutionQuotation.SubscriptionContract
[0..*] A_SbscrContrPrdcssrSubscrpnOrd _PredecessorSubscriptionOrder $projection.SubscriptionContract = _PredecessorSubscriptionOrder.SubscriptionContract
[0..*] A_SbscrContrFUPSubscrpnOrd _FollowUpSubscriptionOrder $projection.SubscriptionContract = _FollowUpSubscriptionOrder.SubscriptionContract
[0..*] A_SubscriptionContractPartner _SubscriptionContractPartner $projection.SubscriptionContract = _SubscriptionContractPartner.SubscriptionContract

Annotations (9)

NameValueLevelField
EndUserText.label Subscription Contract Header view
VDM.viewType #CONSUMPTION view
VDM.lifecycle.contract.type #PUBLIC_REMOTE_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

OData Services (1)

ServiceBindingVersionContractRelease
API_SUBSCRIPTIONCONTRACT API_SUBSCRIPTIONCONTRACT V2 C2 C1

Fields (27)

KeyFieldSource TableSource FieldDescription
KEY SubscriptionContract ServiceDocument
SubscriptionContractType ServiceDocumentType
SubscrpnContractDescription ServiceDocumentDescription
SubscriptionContractUUID ServiceDocumentUUID
Language Language
SalesOrganization SalesOrganization
DistributionChannel DistributionChannel
Division Division
SalesOffice SalesOffice
SalesGroup SalesGroup
SoldToParty SoldToParty
ShipToParty ShipToParty
BillToParty BillToParty
PayerParty PayerParty
PersonResponsible
ContactPerson
CreatedByUser ServiceDocumentCreatedByUser
CreationDateTime ServiceDocCreationDateTime
LastChangedByUser ServiceDocumentChangedByUser
LastChangeDateTime ServiceDocChangedDateTime
PurchaseOrderByCustomer PurchaseOrderByCustomer
_Item _Item
_Text _Text
_PredecessorSolutionQuotation _PredecessorSolutionQuotation
_PredecessorSubscriptionOrder _PredecessorSubscriptionOrder
_FollowUpSubscriptionOrder _FollowUpSubscriptionOrder
_SubscriptionContractPartner _SubscriptionContractPartner
@EndUserText.label: 'Subscription Contract Header'
@VDM: {
  viewType: #CONSUMPTION,
  lifecycle.contract.type: #PUBLIC_REMOTE_API,
  usage.type: [#TRANSACTIONAL_PROCESSING_SERVICE]
}

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

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

define root view entity A_SubscriptionContract
  as select from I_ServiceDocumentEnhcd

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

  association [0..*] to A_SubscriptionContractText     as _Text                         on  $projection.SubscriptionContract = _Text.SubscriptionContract

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

  association [0..*] to A_SbscrContrPrdcssrBusSolnQtn  as _PredecessorSolutionQuotation on  $projection.SubscriptionContract = _PredecessorSolutionQuotation.SubscriptionContract

  association [0..*] to A_SbscrContrPrdcssrSubscrpnOrd as _PredecessorSubscriptionOrder on  $projection.SubscriptionContract = _PredecessorSubscriptionOrder.SubscriptionContract

  association [0..*] to A_SbscrContrFUPSubscrpnOrd     as _FollowUpSubscriptionOrder    on  $projection.SubscriptionContract = _FollowUpSubscriptionOrder.SubscriptionContract

  association [0..*] to A_SubscriptionContractPartner as _SubscriptionContractPartner on $projection.SubscriptionContract = _SubscriptionContractPartner.SubscriptionContract
{

  key ServiceDocument                               as SubscriptionContract,
      ServiceDocumentType                           as SubscriptionContractType,
      ServiceDocumentDescription                    as SubscrpnContractDescription,
      ServiceDocumentUUID                           as SubscriptionContractUUID,
      Language,

      /* STATUS */
      case ServiceDocumentStatus
      when 'C' then 'X'
      else ''
      end                                           as SubscrpnContractIsCompleted,

      /* ORG */
      SalesOrganization,
      DistributionChannel,
      Division,
      SalesOffice,
      SalesGroup,

      /* PARTNER */
      SoldToParty,
      ShipToParty,
      BillToParty,
      PayerParty,
      cast( ResponsibleEmployee as abap.char( 12 )) as PersonResponsible,
      cast( ContactPerson as abap.numc( 10 ))       as ContactPerson,


      ServiceDocumentCreatedByUser                  as CreatedByUser,
      ServiceDocCreationDateTime                    as CreationDateTime,
      ServiceDocumentChangedByUser                  as LastChangedByUser,
      ServiceDocChangedDateTime                     as LastChangeDateTime,
      
      // Sales Set

      PurchaseOrderByCustomer,

      //Associations

      _Item,
      _Text,
      _PredecessorSolutionQuotation,
      _PredecessorSubscriptionOrder,
      _FollowUpSubscriptionOrder,
      _SubscriptionContractPartner
}
where
  ServiceObjectType = 'BUS2000266'