I_SubscriptionOrderItem

DDL: I_SUBSCRIPTIONORDERITEM Type: view_entity COMPOSITE

Subscription Order Item

I_SubscriptionOrderItem is a Composite CDS View that provides data about "Subscription Order Item" in SAP S/4HANA. It reads from 1 data source (I_ServiceDocumentItemEnhcd) and exposes 86 fields with key fields SubscriptionOrder, SubscriptionOrderItem. It has 21 associations to related views.

Data Sources (1)

SourceAliasJoin Type
I_ServiceDocumentItemEnhcd I_ServiceDocumentItemEnhcd from

Associations (21)

CardinalityTargetAliasCondition
[0..1] I_StatusObjectUUIDStatus _SrvcOrdItmStatus $projection.SubscriptionOrderItemUUID = _SrvcOrdItmStatus.StatusObjectUUID and ( _SrvcOrdItmStatus.StatusCode = 'I1002' or _SrvcOrdItmStatus.StatusCode = 'I1003' or _SrvcOrdItmStatus.StatusCode = 'I1004' or _SrvcOrdItmStatus.StatusCode = 'I1005' ) and _SrvcOrdItmStatus.StatusIsActive = 'X'
[1..1] I_SubscriptionOrder _SubscriptionOrder $projection.SubscriptionOrder = _SubscriptionOrder.SubscriptionOrder
[0..*] I_SubscrpnOrdItemPriceElement _ItemPriceElement $projection.SubscriptionOrder = _ItemPriceElement.SubscriptionOrder and $projection.SubscriptionOrderItem = _ItemPriceElement.SubscriptionOrderItem
[0..*] I_SubscriptionOrderItemPartner _ItemPartner $projection.SubscriptionOrder = _ItemPartner.SubscriptionOrder and $projection.SubscriptionOrderItem = _ItemPartner.SubscriptionOrderItem
[0..*] I_SubscrpnOrdItemUserStatus _ItemUserStatus $projection.SubscriptionOrder = _ItemUserStatus.SubscriptionOrder and $projection.SubscriptionOrderItem = _ItemUserStatus.SubscriptionOrderItem
[0..*] I_SubscrpnOrdItmAppt _ItemAppointment $projection.SubscriptionOrder = _ItemAppointment.SubscriptionOrder and $projection.SubscriptionOrderItem = _ItemAppointment.SubscriptionOrderItem
[0..*] I_SubscrpnOrdItemDuration _ItemDuration $projection.SubscriptionOrder = _ItemDuration.SubscriptionOrder and $projection.SubscriptionOrderItem = _ItemDuration.SubscriptionOrderItem
[0..1] I_SubscrpnOrdItemExtRef _ItemExternalReference $projection.SubscriptionOrder = _ItemExternalReference.SubscriptionOrder and $projection.SubscriptionOrderItem = _ItemExternalReference.SubscriptionOrderItem
[0..*] I_SubscrpnOrdItemConfign _ItemConfig $projection.SubscriptionOrder = _ItemConfig.SubscriptionOrder and $projection.SubscriptionOrderItem = _ItemConfig.SubscriptionOrderItem
[0..*] I_SubscrpnOrdItmFUPContrItm _FollowUpContractItem $projection.SubscriptionOrder = _FollowUpContractItem.SubscriptionOrder and $projection.SubscriptionOrderItem = _FollowUpContractItem.SubscriptionOrderItem
[0..*] I_SubscrpnOrdItmFUPSlsOrdItm _FollowUpSalesOrderItem $projection.SubscriptionOrder = _FollowUpSalesOrderItem.SubscriptionOrder and $projection.SubscriptionOrderItem = _FollowUpSalesOrderItem.SubscriptionOrderItem
[0..*] I_SubscrpnOrdItemCnvChrg _ConvergentCharging $projection.SubscriptionOrder = _ConvergentCharging.SubscriptionOrder and $projection.SubscriptionOrderItem = _ConvergentCharging.SubscriptionOrderItem
[0..*] I_SubscrpnOrdItemTechRsce _TechnicalResource $projection.SubscriptionOrder = _TechnicalResource.SubscriptionOrder and $projection.SubscriptionOrderItem = _TechnicalResource.SubscriptionOrderItem
[0..*] I_ChgOrdItmPrdcssrContrItm _PredecessorContItem $projection.SubscriptionOrder = _PredecessorContItem.SubscriptionOrder and $projection.SubscriptionOrderItem = _PredecessorContItem.SubscriptionOrderItem
[0..*] I_WBSElementBasicData _WBSElement $projection.WBSElementExternalID = _WBSElement.WBSElementExternalID
[0..1] I_CustMgmtPartner _ShipToDetails _ShipToDetails.CustMgmtObjectType = 'BUS2000265' and $projection.SubscriptionOrder = _ShipToDetails.CustMgmtDocument and $projection.SubscriptionOrderItem = _ShipToDetails.CustMgmtDocumentItem and $projection.ShipToParty = _ShipToDetails.CustMgmtBusinessPartner and _ShipToDetails.CustMgmtPartFunctionCategory = '0002'
[0..1] I_CustMgmtPartner _BillToDetails _BillToDetails.CustMgmtObjectType = 'BUS2000265' and $projection.SubscriptionOrder = _BillToDetails.CustMgmtDocument and $projection.SubscriptionOrderItem = _BillToDetails.CustMgmtDocumentItem and $projection.BillToParty = _BillToDetails.CustMgmtBusinessPartner and _BillToDetails.CustMgmtPartFunctionCategory = '0003'
[0..1] I_CustMgmtPartner _PayerPartyDetails _PayerPartyDetails.CustMgmtObjectType = 'BUS2000265' and $projection.SubscriptionOrder = _PayerPartyDetails.CustMgmtDocument and $projection.SubscriptionOrderItem = _PayerPartyDetails.CustMgmtDocumentItem and $projection.PayerParty = _PayerPartyDetails.CustMgmtBusinessPartner and _PayerPartyDetails.CustMgmtPartFunctionCategory = '0004'
[0..1] I_CustMgmtPartner _ShipToDetailsHeader _ShipToDetailsHeader.CustMgmtObjectType = 'BUS2000265' and $projection.SubscriptionOrder = _ShipToDetailsHeader.CustMgmtDocument and _ShipToDetailsHeader.CustMgmtDocumentItem = '000000' and $projection.ShipToParty = _ShipToDetailsHeader.CustMgmtBusinessPartner and _ShipToDetailsHeader.CustMgmtPartFunctionCategory = '0002'
[0..1] I_CustMgmtPartner _BillToDetailsHeader _BillToDetailsHeader.CustMgmtObjectType = 'BUS2000265' and $projection.SubscriptionOrder = _BillToDetailsHeader.CustMgmtDocument and _BillToDetailsHeader.CustMgmtDocumentItem = '000000' and $projection.BillToParty = _BillToDetailsHeader.CustMgmtBusinessPartner and _BillToDetailsHeader.CustMgmtPartFunctionCategory = '0003'
[0..1] I_CustMgmtPartner _PayerPartyDetailsHeader _PayerPartyDetailsHeader.CustMgmtObjectType = 'BUS2000265' and $projection.SubscriptionOrder = _PayerPartyDetailsHeader.CustMgmtDocument and _PayerPartyDetailsHeader.CustMgmtDocumentItem = '000000' and $projection.PayerParty = _PayerPartyDetailsHeader.CustMgmtBusinessPartner and _PayerPartyDetailsHeader.CustMgmtPartFunctionCategory = '0004'

Annotations (8)

NameValueLevelField
AccessControl.authorizationCheck #CHECK view
VDM.viewType #COMPOSITE view
VDM.lifecycle.contract.type #SAP_INTERNAL_API view
Metadata.ignorePropagatedAnnotations true view
EndUserText.label Subscription Order Item view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #XL view

Fields (86)

KeyFieldSource TableSource FieldDescription
KEY SubscriptionOrder ServiceDocument
KEY SubscriptionOrderItem ServiceDocumentItem
ServiceObjectType ServiceObjectType
ServiceDocumentItemObjectType ServiceDocumentItemObjectType
SubscrpnOrdItemCategory ServiceDocItemCategory
SubscriptionOrderItemUUID ServiceDocumentItemUUID
ParentSubscriptionOrderItem _ParentServiceDocItem_2 ServiceDocumentItem
SubscrpnOrdItmDescription ServiceDocumentItemDescription
Language Language
CreationDateTime ServiceDocItemCreationDateTime
LastChangeDateTime ServiceDocItemChangedDateTime
CreatedByUser ServiceDocItemCreatedByUser
LastChangedByUser ServiceDocItemChangedByUser
Product Product
Quantity ServiceDocumentItemQuantity
QuantityUnit ServiceDocItemQuantityUnit
SubscrpnOrdRjcnReason ServiceDocItemRejectionReason
PurchaseOrderByShipToParty PurchaseOrderByShipToParty
SubscrpnOrdItemIsRejected ServiceDocumentItemIsRejected
SubscrpnOrdItmHasError ServiceDocumentItemHasError
SubscrpnOrdItemCreditStatus SrvcDocItemCreditStatus
SoldToParty SoldToParty
ShipToParty ShipToParty
BillToParty BillToParty
PayerParty PayerParty
ContactPerson
PersonResponsible
ShipToPartyAddressID
BillToPartyAddressIdentifier
PayerToPartyAddressIdentifier
PaymentTerms PaymentTerms
CABillgCycle CABillgCycle
ContractAccount ContractAccount
SubscrpnContrItmStartDateTime ServiceContrItemStartDateTime
SubscrpnContrItmEndDateTime ServiceContrItemEndDateTime
SbscrContrTimeSliceStrtDteTme SrvcDocItmTmeSliceStrtDteTme
SbscrContrTimeSliceEndDteTme SrvcDocItmTmeSliceEndDteTme
SbscrContrItmGrcePerdDteTme SrvcDocItmGrcePerdEndDateTime
SbscrContrItmBizValdStrtDteTme SbscrContrItmBizValdStrtDteTme
SbscrContrItmBizValdEndDteTme SbscrContrItmBizValdEndDteTme
SubscrpnContrAutoRnwlIsActv SubscrpnContrAutoRnwlIsActv
SubscrpnContrArnwlStrtDurn SrvcContrItemRnwlDuration
SubscrpnContrArnwlStrtDurnUnit SrvcContrItemRnwlDurationUnit
SubscrpnContrAutoRnwlDurn
SubscrpnContrAutoRnwlDurnUnit
RevenueAccountingReference RevenueAccountingReference
RevenueAccountingRefType RevenueAccountingRefType
CrsCatalogMappingVersionNumber CrsCatalogMappingVersionNumber
ConfigurationNumber ConfigurationNumber
SubscrpnOrdItemIsPhased BusSolutionQtnItemIsPhased
SubscrpnOrdItmPhasedPrdcssrItm BusSolnQtnItmPhasedPrdcssrItem
SbscrContrItemCanclnParty ServiceDocumentItemCanclnParty
SbscrContrItemCanclnReason ServiceDocumentItmCanclnReason
SbscrContrItmCanclnProcedure SrvcDocItmCanclnProcedure
TransactionCurrency TransactionCurrency
SrvcDocItmRecrrgChrgNetAmount SrvcDocItmRecrrgChrgNetAmount
SrvcDocItmRecrrgChrgTaxAmount SrvcDocItmRecrrgChrgTaxAmount
SrvcDocItmRecrrgChrgGrossAmt SrvcDocItmRecrrgChrgGrossAmt
SrvcDocItmRecrrgChrgDuration SrvcDocItmRecrrgChrgDuration
SrvcDocItmRecrrgChrgDurnUnit SrvcDocItmRecrrgChrgDurnUnit
SubscriptionContractExternalID SubscriptionContract
CustMgmtMasterAgreement CustMgmtMasterAgreement
CustMgmtMstrAgrmtItem CustMgmtMstrAgrmtItem
CustMgmtMstrAgrmtParentItem CustMgmtMstrAgrmtParentItem
SharingContractID SharingContractID
SubscrpnContractSharingGroupID SubscrpnContractSharingGroupID
BillOfMaterialItemNodeNumber BillOfMaterialItemNodeNumber
_SubscriptionOrder _SubscriptionOrder
_ItemPriceElement _ItemPriceElement
_ItemPartner _ItemPartner
_ItemUserStatus _ItemUserStatus
_ItemAppointment _ItemAppointment
_ItemDuration _ItemDuration
_ItemExternalReference _ItemExternalReference
_ItemConfig _ItemConfig
_FollowUpContractItem _FollowUpContractItem
_FollowUpSalesOrderItem _FollowUpSalesOrderItem
_ConvergentCharging _ConvergentCharging
_TechnicalResource _TechnicalResource
_PredecessorContItem _PredecessorContItem
_ServiceDocument _ServiceDocument
_ServiceObjType _ServiceObjType
_Product _Product
_PaymentTerms _PaymentTerms
_ServiceDocItemMainRefObj _ServiceDocItemMainRefObj
_WBSElement _WBSElement
@AccessControl: {
  authorizationCheck: #CHECK,
  personalData.blocking: #('TRANSACTIONAL_DATA')
}
@VDM: {
  viewType: #COMPOSITE,
  lifecycle.contract.type: #SAP_INTERNAL_API
}
@Metadata:
{
  ignorePropagatedAnnotations: true
}

@EndUserText.label: 'Subscription Order Item'
@ObjectModel: {
   usageType: {dataClass:      #TRANSACTIONAL,
                serviceQuality: #C,
                sizeCategory:   #XL}
}
define view entity I_SubscriptionOrderItem
  as select from I_ServiceDocumentItemEnhcd
  association [0..1] to I_StatusObjectUUIDStatus       as _SrvcOrdItmStatus       on  $projection.SubscriptionOrderItemUUID = _SrvcOrdItmStatus.StatusObjectUUID
                                                                                  and (
                                                                                     _SrvcOrdItmStatus.StatusCode           = 'I1002'
                                                                                     or _SrvcOrdItmStatus.StatusCode        = 'I1003'
                                                                                     or _SrvcOrdItmStatus.StatusCode        = 'I1004'
                                                                                     or _SrvcOrdItmStatus.StatusCode        = 'I1005'
                                                                                   )
                                                                                  and _SrvcOrdItmStatus.StatusIsActive      = 'X'

  association [1..1] to I_SubscriptionOrder            as _SubscriptionOrder      on  $projection.SubscriptionOrder = _SubscriptionOrder.SubscriptionOrder
  association [0..*] to I_SubscrpnOrdItemPriceElement  as _ItemPriceElement       on  $projection.SubscriptionOrder     = _ItemPriceElement.SubscriptionOrder
                                                                                  and $projection.SubscriptionOrderItem = _ItemPriceElement.SubscriptionOrderItem
  association [0..*] to I_SubscriptionOrderItemPartner as _ItemPartner            on  $projection.SubscriptionOrder     = _ItemPartner.SubscriptionOrder
                                                                                  and $projection.SubscriptionOrderItem = _ItemPartner.SubscriptionOrderItem
  association [0..*] to I_SubscrpnOrdItemUserStatus    as _ItemUserStatus         on  $projection.SubscriptionOrder     = _ItemUserStatus.SubscriptionOrder
                                                                                  and $projection.SubscriptionOrderItem = _ItemUserStatus.SubscriptionOrderItem
  association [0..*] to I_SubscrpnOrdItmAppt           as _ItemAppointment        on  $projection.SubscriptionOrder     = _ItemAppointment.SubscriptionOrder
                                                                                  and $projection.SubscriptionOrderItem = _ItemAppointment.SubscriptionOrderItem
  association [0..*] to I_SubscrpnOrdItemDuration      as _ItemDuration           on  $projection.SubscriptionOrder     = _ItemDuration.SubscriptionOrder
                                                                                  and $projection.SubscriptionOrderItem = _ItemDuration.SubscriptionOrderItem
  association [0..1] to I_SubscrpnOrdItemExtRef        as _ItemExternalReference  on  $projection.SubscriptionOrder     = _ItemExternalReference.SubscriptionOrder
                                                                                  and $projection.SubscriptionOrderItem = _ItemExternalReference.SubscriptionOrderItem
  association [0..*] to I_SubscrpnOrdItemConfign       as _ItemConfig             on  $projection.SubscriptionOrder     = _ItemConfig.SubscriptionOrder
                                                                                  and $projection.SubscriptionOrderItem = _ItemConfig.SubscriptionOrderItem
  association [0..*] to I_SubscrpnOrdItmFUPContrItm    as _FollowUpContractItem   on  $projection.SubscriptionOrder     = _FollowUpContractItem.SubscriptionOrder
                                                                                  and $projection.SubscriptionOrderItem = _FollowUpContractItem.SubscriptionOrderItem
  association [0..*] to I_SubscrpnOrdItmFUPSlsOrdItm   as _FollowUpSalesOrderItem on  $projection.SubscriptionOrder     = _FollowUpSalesOrderItem.SubscriptionOrder
                                                                                  and $projection.SubscriptionOrderItem = _FollowUpSalesOrderItem.SubscriptionOrderItem
  association [0..*] to I_SubscrpnOrdItemCnvChrg       as _ConvergentCharging     on  $projection.SubscriptionOrder     = _ConvergentCharging.SubscriptionOrder
                                                                                  and $projection.SubscriptionOrderItem = _ConvergentCharging.SubscriptionOrderItem
  association [0..*] to I_SubscrpnOrdItemTechRsce      as _TechnicalResource      on  $projection.SubscriptionOrder     = _TechnicalResource.SubscriptionOrder
                                                                                  and $projection.SubscriptionOrderItem = _TechnicalResource.SubscriptionOrderItem
  association [0..*] to I_ChgOrdItmPrdcssrContrItm     as _PredecessorContItem    on  $projection.SubscriptionOrder     = _PredecessorContItem.SubscriptionOrder
                                                                                  and $projection.SubscriptionOrderItem = _PredecessorContItem.SubscriptionOrderItem
  association [0..*] to I_WBSElementBasicData          as _WBSElement             on  $projection.WBSElementExternalID  = _WBSElement.WBSElementExternalID

/*+[hideWarning] { "IDS" : [ "CARDINALITY_CHECK" ] } */
  association [0..1] to I_CustMgmtPartner             as _ShipToDetails           on  _ShipToDetails.CustMgmtObjectType                             = 'BUS2000265'
                                                                                  and $projection.SubscriptionOrder                                 = _ShipToDetails.CustMgmtDocument
                                                                                  and $projection.SubscriptionOrderItem                             = _ShipToDetails.CustMgmtDocumentItem
                                                                                  and $projection.ShipToParty                                       = _ShipToDetails.CustMgmtBusinessPartner
                                                                                  and _ShipToDetails.CustMgmtPartFunctionCategory                   = '0002'
  /*+[hideWarning] { "IDS" : [ "CARDINALITY_CHECK" ] } */
  association [0..1] to I_CustMgmtPartner             as _BillToDetails           on  _BillToDetails.CustMgmtObjectType                             = 'BUS2000265'
                                                                                  and $projection.SubscriptionOrder                                 = _BillToDetails.CustMgmtDocument
                                                                                  and $projection.SubscriptionOrderItem                             = _BillToDetails.CustMgmtDocumentItem
                                                                                  and $projection.BillToParty                                       = _BillToDetails.CustMgmtBusinessPartner
                                                                                  and _BillToDetails.CustMgmtPartFunctionCategory                   = '0003'
  /*+[hideWarning] { "IDS" : [ "CARDINALITY_CHECK" ] } */
  association [0..1] to I_CustMgmtPartner             as _PayerPartyDetails       on  _PayerPartyDetails.CustMgmtObjectType                         = 'BUS2000265'
                                                                                  and $projection.SubscriptionOrder                                 = _PayerPartyDetails.CustMgmtDocument
                                                                                  and $projection.SubscriptionOrderItem                             = _PayerPartyDetails.CustMgmtDocumentItem
                                                                                  and $projection.PayerParty                                        = _PayerPartyDetails.CustMgmtBusinessPartner
                                                                                  and _PayerPartyDetails.CustMgmtPartFunctionCategory               = '0004'
   /*+[hideWarning] { "IDS" : [ "CARDINALITY_CHECK" ] } */
  association [0..1] to I_CustMgmtPartner             as _ShipToDetailsHeader           on  _ShipToDetailsHeader.CustMgmtObjectType                 = 'BUS2000265'
                                                                                        and $projection.SubscriptionOrder                           = _ShipToDetailsHeader.CustMgmtDocument
                                                                                        and _ShipToDetailsHeader.CustMgmtDocumentItem               = '000000'
                                                                                        and $projection.ShipToParty                                 = _ShipToDetailsHeader.CustMgmtBusinessPartner
                                                                                        and _ShipToDetailsHeader.CustMgmtPartFunctionCategory       = '0002'
  /*+[hideWarning] { "IDS" : [ "CARDINALITY_CHECK" ] } */
  association [0..1] to I_CustMgmtPartner             as _BillToDetailsHeader           on  _BillToDetailsHeader.CustMgmtObjectType                 = 'BUS2000265'
                                                                                        and $projection.SubscriptionOrder                           = _BillToDetailsHeader.CustMgmtDocument
                                                                                        and _BillToDetailsHeader.CustMgmtDocumentItem               = '000000'
                                                                                        and $projection.BillToParty                                 = _BillToDetailsHeader.CustMgmtBusinessPartner
                                                                                        and _BillToDetailsHeader.CustMgmtPartFunctionCategory       = '0003'
  /*+[hideWarning] { "IDS" : [ "CARDINALITY_CHECK" ] } */
  association [0..1] to I_CustMgmtPartner             as _PayerPartyDetailsHeader       on  _PayerPartyDetailsHeader.CustMgmtObjectType             = 'BUS2000265'
                                                                                        and $projection.SubscriptionOrder                           = _PayerPartyDetailsHeader.CustMgmtDocument
                                                                                        and _PayerPartyDetailsHeader.CustMgmtDocumentItem           = '000000'
                                                                                        and $projection.PayerParty                                  = _PayerPartyDetailsHeader.CustMgmtBusinessPartner
                                                                                        and _PayerPartyDetailsHeader.CustMgmtPartFunctionCategory   = '0004'
{
      // Administrative Fields

      @ObjectModel.foreignKey.association: '_ServiceDocument'
  key ServiceDocument                                          as SubscriptionOrder,
  key ServiceDocumentItem                                      as SubscriptionOrderItem,
      @ObjectModel.foreignKey.association: '_ServiceObjType'
      ServiceObjectType,
      ServiceDocumentItemObjectType,
      ServiceDocItemCategory                                   as SubscrpnOrdItemCategory,
      ServiceDocumentItemUUID                                  as SubscriptionOrderItemUUID,
      _ParentServiceDocItem_2.ServiceDocumentItem              as ParentSubscriptionOrderItem,
      ServiceDocumentItemDescription                           as SubscrpnOrdItmDescription,
      Language,
      ServiceDocItemCreationDateTime                           as CreationDateTime,
      ServiceDocItemChangedDateTime                            as LastChangeDateTime,
      ServiceDocItemCreatedByUser                              as CreatedByUser,
      ServiceDocItemChangedByUser                              as LastChangedByUser,

      // Item Fields

      @ObjectModel.foreignKey.association: '_Product'
      Product,
      @Semantics.quantity.unitOfMeasure: 'QuantityUnit'
      ServiceDocumentItemQuantity                              as Quantity,
      ServiceDocItemQuantityUnit                               as QuantityUnit,
      ServiceDocItemRejectionReason                            as SubscrpnOrdRjcnReason,
      PurchaseOrderByShipToParty,

      // Status

      cast( case _SrvcOrdItmStatus.StatusCode
      when 'I1002' then 'X'
      else ' '
      end                  as   xfeld preserving type     )    as SubscrpnOrdItemIsNew,
      cast( case _SrvcOrdItmStatus.StatusCode
      when 'I1003' then 'X'
      else ' '
      end                  as   xfeld preserving type     )    as SubscrpnOrdItemIsInProcess,
      cast( case _SrvcOrdItmStatus.StatusCode
      when 'I1004' then 'X'
      else ' '
      end                  as   xfeld preserving type     )    as SubscrpnOrdItemIsReleased,
      cast( case _SrvcOrdItmStatus.StatusCode
      when 'I1005' then 'X'
      else ' '
      end                  as   xfeld preserving type     )    as SubscrpnOrdItemIsCompleted,
      @Semantics.booleanIndicator
      ServiceDocumentItemIsRejected                            as SubscrpnOrdItemIsRejected,
      @Semantics.booleanIndicator
      ServiceDocumentItemHasError                              as SubscrpnOrdItmHasError,
      SrvcDocItemCreditStatus                                  as SubscrpnOrdItemCreditStatus,

      // Partners

      SoldToParty,
      ShipToParty,
      BillToParty,
      PayerParty,
      cast( ContactPerson as abap.numc( 10 ))                  as ContactPerson,
      cast( ResponsibleEmployee as abap.char( 12 ))            as PersonResponsible,
      case when _ShipToDetails.AddressID is null then _ShipToDetailsHeader.AddressID else _ShipToDetails.AddressID end as ShipToPartyAddressID,
      case when _BillToDetails.AddressID is null then _BillToDetailsHeader.AddressID else _BillToDetails.AddressID end as BillToPartyAddressIdentifier,
      case when _PayerPartyDetails.AddressID is null then _PayerPartyDetailsHeader.AddressID else _PayerPartyDetails.AddressID end as PayerToPartyAddressIdentifier,
      //Billing and Payment

      @ObjectModel.foreignKey.association: '_PaymentTerms'
      PaymentTerms,
      CABillgCycle,
      ContractAccount,

      //      //Dates

      //      @Semantics.dateTime:true

      //      case ServiceContrItemStartDateTime

      //      when 0

      //      then  cast( 99991231000000 as abap.dec( 15 ) )

      //      else ServiceContrItemStartDateTime

      //      end                                                      as SubscrpnContrItmStartDateTime,


      //Dates

      @Semantics.dateTime:true
      ServiceContrItemStartDateTime                            as SubscrpnContrItmStartDateTime,


      //      @Semantics.dateTime:true

      //      case ServiceContrItemEndDateTime

      //      when 0

      //      then cast( 99991231000000 as abap.dec( 15 ) )

      //      else ServiceContrItemEndDateTime

      //      end                                                      as SubscrpnContrItmEndDateTime,

      @Semantics.dateTime:true
      ServiceContrItemEndDateTime                              as   SubscrpnContrItmEndDateTime,

      //      @Semantics.dateTime:true

      //      case SrvcDocItmTmeSliceStrtDteTme

      //      when 0

      //      then cast( 99991231000000 as abap.dec( 15 ) )

      //      else SrvcDocItmTmeSliceStrtDteTme

      //      end                                                      as SbscrContrTimeSliceStrtDteTme,


      @Semantics.dateTime:true
      SrvcDocItmTmeSliceStrtDteTme                             as SbscrContrTimeSliceStrtDteTme,

      //      @Semantics.dateTime:true

      //      case SrvcDocItmTmeSliceEndDteTme

      //      when 0 then cast( 99991231000000 as abap.dec( 15 ) )

      //      else

      //      SrvcDocItmTmeSliceEndDteTme end                          as SbscrContrTimeSliceEndDteTme,


      @Semantics.dateTime:true
      SrvcDocItmTmeSliceEndDteTme                              as SbscrContrTimeSliceEndDteTme,
      @Semantics.dateTime:true
      SrvcDocItmGrcePerdEndDateTime                            as SbscrContrItmGrcePerdDteTme,
      @Semantics.dateTime:true
      SbscrContrItmBizValdStrtDteTme,
      @Semantics.dateTime:true
      SbscrContrItmBizValdEndDteTme,
      //Autorenewal

      SubscrpnContrAutoRnwlIsActv                              as SubscrpnContrAutoRnwlIsActv,
      @Semantics: { quantity : {unitOfMeasure: 'SubscrpnContrArnwlStrtDurnUnit'} }
      SrvcContrItemRnwlDuration                                as SubscrpnContrArnwlStrtDurn,
      SrvcContrItemRnwlDurationUnit                            as SubscrpnContrArnwlStrtDurnUnit,
      @Semantics: { quantity : {unitOfMeasure: 'SubscrpnContrArnwlStrtDurnUnit'} }
      cast( SrvcContrItemExtensionDuration   as timedura)      as SubscrpnContrAutoRnwlDurn,
      cast(SrvcContrItemExtnDurationUnit      as  timeunitdu ) as SubscrpnContrAutoRnwlDurnUnit,

      //Revenue Accounting

      RevenueAccountingReference,
      RevenueAccountingRefType,

      // Convergent Charging

      CrsCatalogMappingVersionNumber,

      //Configuration

      @ObjectModel.readOnly: true
      ConfigurationNumber,

      //Phases

      BusSolutionQtnItemIsPhased                               as SubscrpnOrdItemIsPhased,
      BusSolnQtnItmPhasedPrdcssrItem                           as SubscrpnOrdItmPhasedPrdcssrItm,

      //Cancelation

      ServiceDocumentItemCanclnParty                           as SbscrContrItemCanclnParty,
      ServiceDocumentItmCanclnReason                           as SbscrContrItemCanclnReason,
      SrvcDocItmCanclnProcedure                                as SbscrContrItmCanclnProcedure,


      // Values

      @ObjectModel.readOnly: true
      TransactionCurrency,
      @ObjectModel.readOnly: true
      @Semantics: { amount : {currencyCode: 'TransactionCurrency'} }
      SrvcDocItmRecrrgChrgNetAmount,
      @ObjectModel.readOnly: true
      @Semantics: { amount : {currencyCode: 'TransactionCurrency'} }
      SrvcDocItmRecrrgChrgTaxAmount,
      @ObjectModel.readOnly: true
      @Semantics: { amount : {currencyCode: 'TransactionCurrency'} }
      SrvcDocItmRecrrgChrgGrossAmt,
      @ObjectModel.readOnly: true
      SrvcDocItmRecrrgChrgDuration,
      @ObjectModel.readOnly: true
      SrvcDocItmRecrrgChrgDurnUnit,

      // Subscription Contract

      SubscriptionContract                                     as SubscriptionContractExternalID,

      // Related Documents

      CustMgmtMasterAgreement,
      CustMgmtMstrAgrmtItem,
      CustMgmtMstrAgrmtParentItem,
      SharingContractID,
      SubscrpnContractSharingGroupID,
      BillOfMaterialItemNodeNumber,
      // WBS element

      case SrvcDocItmAcctAssgmtObjectType
      when '03' then cast(SrvcDocItmAcctAssgmtObject as ps_posid_edit)
      else ' '
      end as WBSElementExternalID,


      //Associations

      _SubscriptionOrder,
      _ItemPriceElement,
      _ItemPartner,
      _ItemUserStatus,
      _ItemAppointment,
      _ItemDuration,
      _ItemExternalReference,
      _ItemConfig,
      _FollowUpContractItem,
      _FollowUpSalesOrderItem,
      _ConvergentCharging,
      _TechnicalResource,
      _PredecessorContItem,
      _ServiceDocument,
      _ServiceObjType,
      _Product,
      _PaymentTerms,
      _ServiceDocItemMainRefObj,
      _WBSElement
}
where
  ServiceObjectType = 'BUS2000265' // Subscription Process

/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_CUSTMGMTPARTNER",
"I_SERVICEDOCUMENTITEMENHCD",
"I_STATUSOBJECTUUIDSTATUS"
],
"ASSOCIATED":
[
"I_CHGORDITMPRDCSSRCONTRITM",
"I_CUSTMGMTBUSOBJTYPE",
"I_PAYMENTTERMS",
"I_PRODUCT",
"I_SERVICEDOCUMENTENHCD",
"I_SERVICEDOCUMENTREFOBJECT",
"I_SUBSCRIPTIONORDER",
"I_SUBSCRIPTIONORDERITEMPARTNER",
"I_SUBSCRPNORDITEMCNVCHRG",
"I_SUBSCRPNORDITEMCONFIGN",
"I_SUBSCRPNORDITEMDURATION",
"I_SUBSCRPNORDITEMEXTREF",
"I_SUBSCRPNORDITEMPRICEELEMENT",
"I_SUBSCRPNORDITEMTECHRSCE",
"I_SUBSCRPNORDITEMUSERSTATUS",
"I_SUBSCRPNORDITMAPPT",
"I_SUBSCRPNORDITMFUPCONTRITM",
"I_SUBSCRPNORDITMFUPSLSORDITM",
"I_WBSELEMENTBASICDATA"
],
"BASE":
[
"I_SERVICEDOCUMENTITEMENHCD"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/