I_ServiceEntrySheetItemTP

DDL: I_SERVICEENTRYSHEETITEMTP SQL: ISRVCENTRSH000TP Type: view TRANSACTIONAL Package: APPL_MM_PUR_SES_TR

Service Entry Sheet Item with Draft

I_ServiceEntrySheetItemTP is a Transactional CDS View that provides data about "Service Entry Sheet Item with Draft" in SAP S/4HANA. It reads from 1 data source (I_ServiceEntrySheetItem) and exposes 101 fields with key fields ServiceEntrySheet, ServiceEntrySheetItem. It has 15 associations to related views. Part of development package APPL_MM_PUR_SES_TR.

Data Sources (1)

SourceAliasJoin Type
I_ServiceEntrySheetItem Document from

Associations (15)

CardinalityTargetAliasCondition
[1..1] I_ServiceEntrySheetTP _ServiceEntrySheet _ServiceEntrySheet.ServiceEntrySheet = $projection.ServiceEntrySheet
[1..*] I_SESAccountAssignmentTP _AccountAssignment _AccountAssignment.ServiceEntrySheet = $projection.ServiceEntrySheet and _AccountAssignment.ServiceEntrySheetItem = $projection.ServiceEntrySheetItem
[1..*] I_SESPricingElementTP _SESPricingElementTP _SESPricingElementTP.ServiceEntrySheet = $projection.ServiceEntrySheet and _SESPricingElementTP.ServiceEntrySheetItem = $projection.ServiceEntrySheetItem
[0..1] I_Material _Material _Material.Material = $projection.Service
[0..*] I_MaterialText _MaterialText _MaterialText.Material = $projection.Service
[0..1] I_AccountAssignmentCategory _AccountAssignmentCategory _AccountAssignmentCategory.AccountAssignmentCategory = $projection.AccountAssignmentCategory
[0..1] I_AcctAssignmentCategoryText _AcctAssignmentCategoryText _AcctAssignmentCategoryText.AccountAssignmentCategory = $projection.AccountAssignmentCategory and _AcctAssignmentCategoryText.Language = $session.system_language
[0..1] I_UnitOfMeasure _UnitValueHelp _UnitValueHelp.UnitOfMeasure = $projection.QuantityUnit
[0..*] I_UnitOfMeasureText _UnitText _UnitText.UnitOfMeasure = $projection.QuantityUnit
[0..1] I_UnitOfMeasure _PurOrdUnitOfMsrValHelp _PurOrdUnitOfMsrValHelp.UnitOfMeasure = $projection.PurchaseOrderItemQuantityUnit
[0..*] I_UnitOfMeasureText _PurOrdUnitOfMsrTxt _PurOrdUnitOfMsrTxt.UnitOfMeasure = $projection.PurchaseOrderItemQuantityUnit
[0..1] I_SrvcEntrShtServPrfValHelp _ServicePerformerValueHelp $projection.ServicePerformer = _ServicePerformerValueHelp.ServicePerformer and $projection.Supplier = _ServicePerformerValueHelp.Supplier
[0..1] I_SrvcEntrShtPurOrdItmVH _PurchaseOrderItemVH $projection.PurchaseOrder = _PurchaseOrderItemVH.PurchaseOrder and $projection.PurchaseOrderItem = _PurchaseOrderItemVH.PurchaseOrderItem
[0..1] I_MltplAcctAssgmtDistr _MltplAcctAssgmtDistr $projection.MultipleAcctAssgmtDistribution = _MltplAcctAssgmtDistr.MultipleAcctAssgmtDistribution
[0..1] I_PurgDocumentItemCategoryText _PurgDocumentItemCategoryText _PurgDocumentItemCategoryText.Language = $session.system_language and _PurgDocumentItemCategoryText.PurchasingDocumentItemCategory = Document.PurchaseOrderItemCategory

Annotations (17)

NameValueLevelField
AbapCatalog.sqlViewName ISRVCENTRSH000TP view
AbapCatalog.compiler.compareFilter true view
EndUserText.label Service Entry Sheet Item with Draft view
ObjectModel.writeDraftPersistence SRVCENTRSHTITM_D view
ObjectModel.writeActivePersistence ISRVCENTRSH000TP view
VDM.viewType #TRANSACTIONAL view
ClientHandling.algorithm #SESSION_VARIABLE view
AccessControl.authorizationCheck #MANDATORY view
AccessControl.personalData.blocking #REQUIRED view
ObjectModel.createEnabled true view
ObjectModel.updateEnabled true view
ObjectModel.deleteEnabled true view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.sapObjectNodeType.name ServiceEntrySheet view
VDM.lifecycle.contract.type #SAP_INTERNAL_API view

Fields (101)

KeyFieldSource TableSource FieldDescription
KEY ServiceEntrySheet I_ServiceEntrySheetItem ServiceEntrySheet
KEY ServiceEntrySheetItem I_ServiceEntrySheetItem ServiceEntrySheetItem
PurchaseOrder I_ServiceEntrySheetItem PurchaseOrder
PurchaseOrderItem I_ServiceEntrySheetItem PurchaseOrderItem
IsDeleted I_ServiceEntrySheetItem IsDeleted
Service I_ServiceEntrySheetItem Service
ServiceEntrySheetItemDesc I_ServiceEntrySheetItem ServiceEntrySheetItemDesc
ServicePerformer I_ServiceEntrySheetItem ServicePerformer
ServicePerformerName
FormattedAddress
InternationalPhoneNumber
MobilePhoneNumber
EmailAddress
AccountAssignmentCategory I_ServiceEntrySheetItem AccountAssignmentCategory
MultipleAcctAssgmtDistribution I_ServiceEntrySheetItem MultipleAcctAssgmtDistribution
WorkItem I_ServiceEntrySheetItem WorkItem
ConfirmedQuantity I_ServiceEntrySheetItem ConfirmedQuantity
QuantityUnit I_ServiceEntrySheetItem QuantityUnit
OrderPriceUnit I_ServiceEntrySheetItem OrderPriceUnit
NetPriceQuantity I_ServiceEntrySheetItem NetPriceQuantity
OrderPriceUnitToOrderUnitNmrtr I_ServiceEntrySheetItem OrderPriceUnitToOrderUnitNmrtr
OrdPriceUnitToOrderUnitDnmntr I_ServiceEntrySheetItem OrdPriceUnitToOrderUnitDnmntr
QtyInPurchaseOrderPriceUnit I_ServiceEntrySheetItem QtyInPurchaseOrderPriceUnit
ServicePerformanceDate I_ServiceEntrySheetItem ServicePerformanceDate
ServicePerformanceEndDate I_ServiceEntrySheetItem ServicePerformanceEndDate
PerformancePeriodStartDate I_ServiceEntrySheetItem PerformancePeriodStartDate
PerformancePeriodEndDate I_ServiceEntrySheetItem PerformancePeriodEndDate
OriginObject I_ServiceEntrySheetItem OriginObject
Currency I_ServiceEntrySheetItem Currency
NetPriceAmount I_ServiceEntrySheetItem NetPriceAmount
SESItemMaterialGroupIsInitial
MaterialGroup I_ServiceEntrySheetItem MaterialGroup
IsEndOfPurposeBlocked I_ServiceEntrySheetItem IsEndOfPurposeBlocked
NetAmount I_ServiceEntrySheetItem NetAmount
NetAmountInPurchaseOrderCrcy I_ServiceEntrySheetItem NetAmountInPurchaseOrderCrcy
SESNetAmountInclSalesTax I_ServiceEntrySheetItem SESNetAmountInclSalesTax
CreationDateTime I_ServiceEntrySheetItem CreationDateTime
CreatedByUser
LastChangeDateTime I_ServiceEntrySheetItem LastChangeDateTime
LastChangeUser
PurchasingOrganization I_ServiceEntrySheetItem PurchasingOrganization
PurchasingGroup I_ServiceEntrySheetItem PurchasingGroup
Supplier I_ServiceEntrySheetItem Supplier
PurchaseOrderItemMaterialGroup I_ServiceEntrySheetItem PurchaseOrderItemMaterialGroup
PurchaseOrderItemQuantity I_ServiceEntrySheetItem PurchaseOrderItemQuantity
PurchaseOrderItemQuantityUnit I_ServiceEntrySheetItem PurchaseOrderItemQuantityUnit
PurchaseOrderItemNetAmount I_ServiceEntrySheetItem PurchaseOrderItemNetAmount
PurchaseOrderCurrency I_ServiceEntrySheetItem PurchaseOrderCurrency
Plant I_ServiceEntrySheetItem Plant
PurgDocItemExternalReference I_ServiceEntrySheetItem PurgDocItemExternalReference
PurchaseContract I_ServiceEntrySheetItem PurchaseContract
PurchaseContractItem I_ServiceEntrySheetItem PurchaseContractItem
PurchaseOrderItemCompanyCode I_ServiceEntrySheetItem PurchaseOrderItemCompanyCode
OverdelivTolrtdLmtRatioInPct I_ServiceEntrySheetItem OverdelivTolrtdLmtRatioInPct
PurchaseOrderItemCategory I_ServiceEntrySheetItem PurchaseOrderItemCategory
PurgDocExternalItemCategory _PurgDocumentItemCategoryText PurgDocExternalItemCategory
PurchaseOrderItemCategoryName _PurgDocumentItemCategoryText PurgDocItemCategoryName
ExpectedOverallLimitAmount I_ServiceEntrySheetItem ExpectedOverallLimitAmount
OverallLimitAmount I_ServiceEntrySheetItem OverallLimitAmount
TotalConfirmedQuantity
OpenQuantity
OpenAmountInPurchaseOrderCrcy
OpenAmountInTransCrcy
NonDeductibleInputTaxAmount I_ServiceEntrySheetItem NonDeductibleInputTaxAmount
TaxCode I_ServiceEntrySheetItem TaxCode
SESItemTaxCodeIsInitial
TaxCountry I_ServiceEntrySheetItem TaxCountry
SESItemTaxCountryCodeIsInitial
TaxDeterminationDate I_ServiceEntrySheetItem TaxDeterminationDate
TaxJurisdiction I_ServiceEntrySheetItem TaxJurisdiction
SESItmTaxJurisdictionIsInitial
TaxCalculationProcedure I_ServiceEntrySheetItem TaxCalculationProcedure
PurgDocPriceDate I_ServiceEntrySheetItem PurgDocPriceDate
SESItemIsFinalEntry I_ServiceEntrySheetItem SESItemIsFinalEntry
MaterialType I_ServiceEntrySheetItem MaterialType
ConsumptionPosting I_ServiceEntrySheetItem ConsumptionPosting
InventorySpecialStockType I_ServiceEntrySheetItem InventorySpecialStockType
ProductType I_ServiceEntrySheetItem ProductType
ProductTypeName
_DocumentCurrency I_ServiceEntrySheetItem _DocumentCurrency
_MaterialGroup I_ServiceEntrySheetItem _MaterialGroup
_MaterialGroupValueHelp I_ServiceEntrySheetItem _MaterialGroupValueHelp
_MaterialGroupText I_ServiceEntrySheetItem _MaterialGroupText
_SrvcEntrShtAcctAssgmtCat I_ServiceEntrySheetItem _SrvcEntrShtAcctAssgmtCat
_WorkItemText I_ServiceEntrySheetItem _WorkItemText
PricingDocument _ServiceEntrySheet PricingDocument
_ServiceEntrySheet _ServiceEntrySheet
_AccountAssignment _AccountAssignment
_SESPricingElementTP _SESPricingElementTP
_Material _Material
_MaterialText _MaterialText
_AccountAssignmentCategory _AccountAssignmentCategory
_AcctAssignmentCategoryText _AcctAssignmentCategoryText
_UnitValueHelp _UnitValueHelp
_UnitText _UnitText
_ServicePerformerValueHelp _ServicePerformerValueHelp
_PurOrdUnitOfMsrValHelp _PurOrdUnitOfMsrValHelp
_PurOrdUnitOfMsrTxt _PurOrdUnitOfMsrTxt
_PurchaseOrderItemVH _PurchaseOrderItemVH
_MltplAcctAssgmtDistr _MltplAcctAssgmtDistr
_ProductTypeText _ProductTypeText
@AbapCatalog.sqlViewName: 'ISRVCENTRSH000TP'
@AbapCatalog.compiler.compareFilter: true
@EndUserText.label: 'Service Entry Sheet Item with Draft'
@ObjectModel.writeDraftPersistence: 'SRVCENTRSHTITM_D'
@ObjectModel.writeActivePersistence: 'ISRVCENTRSH000TP'
@VDM.viewType: #TRANSACTIONAL
@ClientHandling.algorithm: #SESSION_VARIABLE

@AccessControl.authorizationCheck: #MANDATORY
@AccessControl.personalData.blocking: #REQUIRED
//@AccessControl.privilegedAssociations: [ '_SrvcEntrShtItmOpnAmtOrdCrcy' ]


@ObjectModel.createEnabled: true
@ObjectModel.updateEnabled: true
@ObjectModel.deleteEnabled: true
@ObjectModel.semanticKey: ['ServiceEntrySheet', 'ServiceEntrySheetItem']
@ObjectModel.usageType.serviceQuality: #C
@ObjectModel.usageType.sizeCategory: #L
@ObjectModel.usageType.dataClass: #MIXED
@ObjectModel.sapObjectNodeType.name: 'ServiceEntrySheet'

@VDM.lifecycle.contract.type: #SAP_INTERNAL_API

define view I_ServiceEntrySheetItemTP
  as select from I_ServiceEntrySheetItem as Document

  association [1..1] to I_ServiceEntrySheetTP         as _ServiceEntrySheet            on  _ServiceEntrySheet.ServiceEntrySheet = $projection.ServiceEntrySheet
  association [1..*] to I_SESAccountAssignmentTP      as _AccountAssignment            on  _AccountAssignment.ServiceEntrySheet     = $projection.ServiceEntrySheet
                                                                                       and _AccountAssignment.ServiceEntrySheetItem = $projection.ServiceEntrySheetItem
  association [1..*] to I_SESPricingElementTP         as _SESPricingElementTP          on  _SESPricingElementTP.ServiceEntrySheet     = $projection.ServiceEntrySheet
                                                                                       and _SESPricingElementTP.ServiceEntrySheetItem = $projection.ServiceEntrySheetItem
  association [0..1] to I_Material                    as _Material                     on  _Material.Material = $projection.Service
  association [0..*] to I_MaterialText                as _MaterialText                 on  _MaterialText.Material = $projection.Service
  association [0..1] to I_AccountAssignmentCategory   as _AccountAssignmentCategory    on  _AccountAssignmentCategory.AccountAssignmentCategory = $projection.AccountAssignmentCategory
  association [0..1] to I_AcctAssignmentCategoryText  as _AcctAssignmentCategoryText   on  _AcctAssignmentCategoryText.AccountAssignmentCategory = $projection.AccountAssignmentCategory
                                                                                       and _AcctAssignmentCategoryText.Language                  = $session.system_language
  association [0..1] to I_UnitOfMeasure               as _UnitValueHelp                on  _UnitValueHelp.UnitOfMeasure = $projection.QuantityUnit
  association [0..*] to I_UnitOfMeasureText           as _UnitText                     on  _UnitText.UnitOfMeasure = $projection.QuantityUnit
  association [0..1] to I_UnitOfMeasure               as _PurOrdUnitOfMsrValHelp       on  _PurOrdUnitOfMsrValHelp.UnitOfMeasure = $projection.PurchaseOrderItemQuantityUnit
  association [0..*] to I_UnitOfMeasureText           as _PurOrdUnitOfMsrTxt           on  _PurOrdUnitOfMsrTxt.UnitOfMeasure = $projection.PurchaseOrderItemQuantityUnit
//  association [0..1] to I_BusinessPartner             as _BusinessPartner              on  _BusinessPartner.BusinessPartner = $projection.ServicePerformer

//  association [0..1] to I_BPCurrentDefaultAddress     as _BPCurrentDefaultAddress      on  _BPCurrentDefaultAddress.BusinessPartner = $projection.ServicePerformer //Performance

  association [0..1] to I_SrvcEntrShtServPrfValHelp   as _ServicePerformerValueHelp    on  $projection.ServicePerformer = _ServicePerformerValueHelp.ServicePerformer
                                                                                       and $projection.Supplier         = _ServicePerformerValueHelp.Supplier
  association [0..1] to I_SrvcEntrShtPurOrdItmVH      as _PurchaseOrderItemVH          on  $projection.PurchaseOrder     = _PurchaseOrderItemVH.PurchaseOrder
                                                                                       and $projection.PurchaseOrderItem = _PurchaseOrderItemVH.PurchaseOrderItem
////-> comment

//  association [0..1] to P_SRVCENTRSHTITMTOTCONFDQTY   as _SrvcEntrShtItmTotConfdQty    on  _SrvcEntrShtItmTotConfdQty.PurchaseOrder     = $projection.PurchaseOrder

//                                                                                       and _SrvcEntrShtItmTotConfdQty.PurchaseOrderItem = $projection.PurchaseOrderItem

//  association [0..1] to I_SrvcEntrShtItmOpnAmtOrdCrcy as _SrvcEntrShtItmOpnAmtOrdCrcy  on  _SrvcEntrShtItmOpnAmtOrdCrcy.ServiceEntrySheet     = $projection.ServiceEntrySheet

//                                                                                       and _SrvcEntrShtItmOpnAmtOrdCrcy.ServiceEntrySheetItem = $projection.ServiceEntrySheetItem

////<-

  association [0..1] to I_MltplAcctAssgmtDistr        as _MltplAcctAssgmtDistr         on  $projection.MultipleAcctAssgmtDistribution = _MltplAcctAssgmtDistr.MultipleAcctAssgmtDistribution

 association [0..1] to I_PurgDocumentItemCategoryText as _PurgDocumentItemCategoryText on _PurgDocumentItemCategoryText.Language = $session.system_language
                                                                                       and _PurgDocumentItemCategoryText.PurchasingDocumentItemCategory = Document.PurchaseOrderItemCategory

{
      //      @ObjectModel.readOnly: true

  key Document.ServiceEntrySheet,
  key Document.ServiceEntrySheetItem,

      Document.PurchaseOrder,

      Document.PurchaseOrderItem,

      @ObjectModel.readOnly: true
      Document.IsDeleted,

      @ObjectModel.text.association: '_MaterialText'
      Document.Service,

      Document.ServiceEntrySheetItemDesc,

      @ObjectModel.text.element: 'ServicePerformerName'
      Document.ServicePerformer,

      @Semantics.text: true
      cast('' as ad_namtext)                                                                                                    as ServicePerformerName,
      @Semantics.text: true
      @ObjectModel.readOnly: true
//      cast(_BusinessPartner._CurrentDefaultAddress.AddressID as ad_addrnum)                                                     as FormattedAddress,

      cast('' as ad_addrnum )                                                                                                   as FormattedAddress,

      @Semantics.text: true
      @ObjectModel.readOnly: true
//      _BPCurrentDefaultAddress._StandardAddress._DefaultPhoneNumber.InternationalPhoneNumber                                    as InternationalPhoneNumber,

      cast( '' as ad_telnrlg )                                                                                                  as InternationalPhoneNumber,
      @Semantics.text: true
      @ObjectModel.readOnly: true
//      _BPCurrentDefaultAddress._StandardAddress._DefaultMobilePhoneNumber.PhoneNumber                                           as MobilePhoneNumber,

      cast( '' as ad_telnrlg )                                                                                                  as MobilePhoneNumber,
      @Semantics.text: true
      @ObjectModel.readOnly: true
//      _BPCurrentDefaultAddress._StandardAddress._DefaultEmailAddress.EmailAddress                                               as EmailAddress,

      cast( '' as ad_smtpadr )                                                                                                  as EmailAddress,

      Document.AccountAssignmentCategory,

      @Consumption.valueHelp: '_MltplAcctAssgmtDistr'
      @ObjectModel.foreignKey.association: '_MltplAcctAssgmtDistr'
      Document.MultipleAcctAssgmtDistribution,

      Document.WorkItem,

      Document.ConfirmedQuantity,

      Document.QuantityUnit,

      @Semantics.unitOfMeasure: true
      Document.OrderPriceUnit,

      @Semantics.quantity.unitOfMeasure: 'OrderPriceUnit'
      Document.NetPriceQuantity,

      Document.OrderPriceUnitToOrderUnitNmrtr,

      Document.OrdPriceUnitToOrderUnitDnmntr,

      Document.QtyInPurchaseOrderPriceUnit,

      Document.ServicePerformanceDate,

      Document.ServicePerformanceEndDate,

      Document.PerformancePeriodStartDate,

      Document.PerformancePeriodEndDate,

      //      @ObjectModel.readOnly: true

      Document.OriginObject,

      @Semantics.currencyCode:true
      Document.Currency,

      @Semantics.amount.currencyCode: 'Currency'
      Document.NetPriceAmount,

      cast( ' ' as ismaterialgroupinitial) as SESItemMaterialGroupIsInitial,
      Document.MaterialGroup,

      Document.IsEndOfPurposeBlocked,

      @Semantics.amount.currencyCode: 'PurchaseOrderCurrency'
      Document.NetAmount,

      @Semantics.amount.currencyCode: 'PurchaseOrderCurrency'
      Document.NetAmountInPurchaseOrderCrcy,

      @Semantics.amount.currencyCode: 'PurchaseOrderCurrency'
      Document.SESNetAmountInclSalesTax,

      Document.CreationDateTime,
      //      @ObjectModel.readOnly: true

      cast(Document.CreatedByUser as mmpur_ses_createdbyuser preserving type )                                                  as CreatedByUser,
      //      Document.CreatedByUser,

      Document.LastChangeDateTime,
      //      @ObjectModel.readOnly: true

      cast(Document.LastChangeUser as mmpur_ses_lastchangeuser preserving type )                                                as LastChangeUser,
      //      Document.LastChangeUser,


      Document.PurchasingOrganization,
      Document.PurchasingGroup,
      Document.Supplier,
      Document.PurchaseOrderItemMaterialGroup,

      @Aggregation.default: #NONE
      @DefaultAggregation:null
      Document.PurchaseOrderItemQuantity,
      Document.PurchaseOrderItemQuantityUnit,

      @Semantics.amount.currencyCode: 'PurchaseOrderCurrency'
      @Aggregation.default: #NONE
      @DefaultAggregation:null
      Document.PurchaseOrderItemNetAmount,
      @Semantics.currencyCode:true
      Document.PurchaseOrderCurrency,

      Document.Plant,
      Document.PurgDocItemExternalReference,
      Document.PurchaseContract,
      Document.PurchaseContractItem,
      Document.PurchaseOrderItemCompanyCode,
      Document.OverdelivTolrtdLmtRatioInPct,
      //      @ObjectModel.readOnly: true

      Document.PurchaseOrderItemCategory,
      _PurgDocumentItemCategoryText.PurgDocExternalItemCategory  as PurgDocExternalItemCategory,
      _PurgDocumentItemCategoryText.PurgDocItemCategoryName      as PurchaseOrderItemCategoryName,

      @Semantics.amount.currencyCode: 'PurchaseOrderCurrency'
      Document.ExpectedOverallLimitAmount,
      Document.OverallLimitAmount,

////////-> insert

      cast( 0 as mmpur_ses_confirmedquantity)                          as TotalConfirmedQuantity,
      cast( 0 as mmpur_ses_openquantity)                               as OpenQuantity,

      @Semantics.amount.currencyCode: 'PurchaseOrderCurrency'
      cast( 0 as mmpur_ses_open_amount_po_crcy)                        as OpenAmountInPurchaseOrderCrcy,
      
      @ObjectModel.readOnly: true
      @Semantics.amount.currencyCode: 'Currency'
      @Aggregation.default: #NONE
      cast( 0 as mmpur_ses_open_amount)                                as OpenAmountInTransCrcy,
////////<-

////-> comment/delete

////      cast ( ( _SrvcEntrShtItmTotConfdQty.TotalConfirmedQuantity - Document.ConfirmedQuantity ) as mmpur_ses_confirmedquantity) as TotalConfirmedQuantity,

////

////      case

////        when Document.PurchaseOrderItemCategory = 'A'

////        then cast( 0 as mmpur_ses_openquantity )

////        else cast( coalesce( (Document.PurchaseOrderItemQuantity - _SrvcEntrShtItmTotConfdQty.TotalConfirmedQuantity),

////                             Document.PurchaseOrderItemQuantity )

////             as mmpur_ses_openquantity )

////      end                                                                                                                       as OpenQuantity,

////

////      @Semantics.amount.currencyCode: 'PurchaseOrderCurrency'

////      cast( _SrvcEntrShtItmOpnAmtOrdCrcy.OpenAmountInPurchaseOrderCrcy as mmpur_ses_open_amount_po_crcy preserving type )       as OpenAmountInPurchaseOrderCrcy,

////

////      @ObjectModel.readOnly: true

////      @Semantics.amount.currencyCode: 'Currency'

////      @Aggregation.default: #NONE

////      cast(

////        case

////          when Document.PurchaseOrderItemCategory = 'A' and Document.Currency <> ''

////          then _SrvcEntrShtItmOpnAmtOrdCrcy.OpenAmountInPurchaseOrderCrcy

////          else 0

////      end as mmpur_ses_open_amount preserving type )                                                                            as OpenAmountInTransCrcy,

////<-


      @Semantics.amount.currencyCode: 'Currency'
      Document.NonDeductibleInputTaxAmount,

      @ObjectModel: { readOnly: 'EXTERNAL_CALCULATION'}
      Document.TaxCode,
      cast( ' ' as istaxcodeinitial) as SESItemTaxCodeIsInitial,
      
      @ObjectModel: { readOnly: true}
      Document.TaxCountry,
      cast( ' ' as istaxcountrycodeinitial) as SESItemTaxCountryCodeIsInitial,

      @ObjectModel: { readOnly: 'EXTERNAL_CALCULATION'}
      Document.TaxDeterminationDate,

      @ObjectModel: { readOnly: 'EXTERNAL_CALCULATION'}
      Document.TaxJurisdiction,
      cast( ' ' as istaxjurisdictioncodeinitial) as SESItmTaxJurisdictionIsInitial,

      @ObjectModel: { readOnly: true}
      Document.TaxCalculationProcedure,

      @ObjectModel: { readOnly: 'EXTERNAL_CALCULATION'}
      Document.PurgDocPriceDate,
      Document.SESItemIsFinalEntry,

      Document.MaterialType,
      Document.ConsumptionPosting,
      Document.InventorySpecialStockType,

      Document.ProductType,
      Document._ProductTypeText.Name                                                                                            as ProductTypeName,

      Document._DocumentCurrency,
      Document._MaterialGroup,
      Document._MaterialGroupValueHelp, //to be deleted

      Document._MaterialGroupText,
      Document._SrvcEntrShtAcctAssgmtCat,
      Document._WorkItemText,
      
      _ServiceEntrySheet.PricingDocument,

      @ObjectModel.association.type: [ #TO_COMPOSITION_PARENT, #TO_COMPOSITION_ROOT ]
      _ServiceEntrySheet,
      @ObjectModel.association.type: [ #TO_COMPOSITION_CHILD ]
      _AccountAssignment,
      @ObjectModel.association.type: [ #TO_COMPOSITION_CHILD ]
      _SESPricingElementTP,

      _Material,
      _MaterialText,
      _AccountAssignmentCategory,
      _AcctAssignmentCategoryText,
      _UnitValueHelp,
      _UnitText,
      _ServicePerformerValueHelp,
      _PurOrdUnitOfMsrValHelp,
      _PurOrdUnitOfMsrTxt,
//      _BusinessPartner,

      _PurchaseOrderItemVH,
      //      @Consumption.hidden: true

      _MltplAcctAssgmtDistr,
      _ProductTypeText
}
where
  Document.IsDeleted = ' '