I_BillingDocExtdItemBasic

DDL: I_BILLINGDOCEXTDITEMBASIC SQL: ISDBILDOCITMEBAS Type: view BASIC Package: VDM_SD_BIL

Billing Document Item Basic Extended

I_BillingDocExtdItemBasic is a Basic CDS View (Dimension) that provides data about "Billing Document Item Basic Extended" in SAP S/4HANA. It reads from 1 data source (vbrp) and exposes 291 fields with key fields BillingDocument, BillingDocumentItem. It has 112 associations to related views. Part of development package VDM_SD_BIL.

Data Sources (1)

SourceAliasJoin Type
vbrp vbrp from

Associations (112)

CardinalityTargetAliasCondition
[0..*] I_MaterialText _MaterialText $projection.Material = _MaterialText.Material
[0..*] I_ProductText _ProductText $projection.Product = _ProductText.Product
[0..*] I_MaterialText _OriginallyRequestedMatlText $projection.OriginallyRequestedMaterial = _OriginallyRequestedMatlText.Material
[0..*] I_MaterialText _PricingReferenceMaterialText $projection.PricingReferenceMaterial = _PricingReferenceMaterialText.Material
[0..*] I_MaterialText _MainItemPricingRefMatlText $projection.MainItemPricingRefMaterial = _MainItemPricingRefMatlText.Material
[0..*] I_MaterialGroupText _MaterialGroupText $projection.MaterialGroup = _MaterialGroupText.MaterialGroup
[0..*] I_ShippingPointText _ShippingPointText $projection.ShippingPoint = _ShippingPointText.ShippingPoint
[0..*] I_BusinessAreaText _BusinessAreaText $projection.BusinessArea = _BusinessAreaText.BusinessArea
[1..1] I_BillingDocumentBasic _BillingDocumentBasic $projection.BillingDocument = _BillingDocumentBasic.BillingDocument
[0..*] I_BillingDocItemPartnerBasic _PartnerBasic $projection.BillingDocument = _PartnerBasic.BillingDocument and $projection.BillingDocumentItem = _PartnerBasic.BillingDocumentItem
[0..*] I_BillingDocItemPrcgElmntBasic _PricingElementBasic $projection.BillingDocument = _PricingElementBasic.BillingDocument and $projection.BillingDocumentItem = _PricingElementBasic.BillingDocumentItem
[0..1] I_SalesDocumentItemCategory _SalesDocumentItemCategory $projection.SalesDocumentItemCategory = _SalesDocumentItemCategory.SalesDocumentItemCategory
[0..1] I_SalesDocumentItemType _SalesDocumentItemType $projection.SalesDocumentItemType = _SalesDocumentItemType.SalesDocumentItemType
[0..1] I_User _CreatedByUser $projection.CreatedByUser = _CreatedByUser.UserID
[0..1] I_LogicalSystem _ReferenceLogicalSystem $projection.ReferenceLogicalSystem = _ReferenceLogicalSystem.LogicalSystem
[0..1] I_Division _OrganizationDivision $projection.OrganizationDivision = _OrganizationDivision.Division
[0..1] I_Division _Division $projection.Division = _Division.Division
[0..1] I_SalesOffice _SalesOffice $projection.SalesOffice = _SalesOffice.SalesOffice
[0..1] I_Material _Material $projection.Material = _Material.Material
[0..1] I_Product _Product $projection.Product = _Product.Product
[0..1] I_Material _OriginallyRequestedMaterial $projection.OriginallyRequestedMaterial = _OriginallyRequestedMaterial.Material
[0..1] I_Material _PricingReferenceMaterial $projection.PricingReferenceMaterial = _PricingReferenceMaterial.Material
[0..1] I_Batch _Batch $projection.Plant = _Batch.Plant and $projection.Material = _Batch.Material and $projection.Batch = _Batch.Batch
[0..1] I_ProductHierarchyNode _ProductHierarchyNode $projection.ProductHierarchyNode = _ProductHierarchyNode.ProductHierarchyNode
[0..1] I_MaterialGroup _MaterialGroup $projection.MaterialGroup = _MaterialGroup.MaterialGroup
[0..1] I_ProductGroup_2 _ProductGroup $projection.ProductGroup = _ProductGroup.ProductGroup
[0..1] I_AdditionalMaterialGroup1 _AdditionalMaterialGroup1 $projection.AdditionalMaterialGroup1 = _AdditionalMaterialGroup1.AdditionalMaterialGroup1
[0..1] I_AdditionalMaterialGroup2 _AdditionalMaterialGroup2 $projection.AdditionalMaterialGroup2 = _AdditionalMaterialGroup2.AdditionalMaterialGroup2
[0..1] I_AdditionalMaterialGroup3 _AdditionalMaterialGroup3 $projection.AdditionalMaterialGroup3 = _AdditionalMaterialGroup3.AdditionalMaterialGroup3
[0..1] I_AdditionalMaterialGroup4 _AdditionalMaterialGroup4 $projection.AdditionalMaterialGroup4 = _AdditionalMaterialGroup4.AdditionalMaterialGroup4
[0..1] I_AdditionalMaterialGroup5 _AdditionalMaterialGroup5 $projection.AdditionalMaterialGroup5 = _AdditionalMaterialGroup5.AdditionalMaterialGroup5
[0..1] I_MaterialCommissionGroup _MaterialCommissionGroup $projection.MaterialCommissionGroup = _MaterialCommissionGroup.MaterialCommissionGroup
[0..1] I_Plant _Plant $projection.Plant = _Plant.Plant
[0..1] I_StorageLocation _StorageLocation $projection.Plant = _StorageLocation.Plant and $projection.StorageLocation = _StorageLocation.StorageLocation
[0..1] I_Region _PlantRegion $projection.DepartureCountry = _PlantRegion.Country and $projection.PlantRegion = _PlantRegion.Region
[0..1] I_UnitOfMeasure _BillingQuantityUnit $projection.BillingQuantityUnit = _BillingQuantityUnit.UnitOfMeasure
[0..1] I_UnitOfMeasure _BaseUnit $projection.BaseUnit = _BaseUnit.UnitOfMeasure
[0..1] I_UnitOfMeasure _ItemWeightUnit $projection.ItemWeightUnit = _ItemWeightUnit.UnitOfMeasure
[0..1] I_UnitOfMeasure _ItemVolumeUnit $projection.ItemVolumeUnit = _ItemVolumeUnit.UnitOfMeasure
[0..1] I_Country _BillToPartyCountry $projection.BillToPartyCountry = _BillToPartyCountry.Country
[0..1] I_Region _BillToPartyRegion $projection.BillToPartyCountry = _BillToPartyRegion.Country and $projection.BillToPartyRegion = _BillToPartyRegion.Region
[0..1] I_BillingPlanRule _BillingPlanRule $projection.BillingPlanRule = _BillingPlanRule.BillingPlanRule
[0..1] I_Currency _TransactionCurrency $projection.TransactionCurrency = _TransactionCurrency.Currency
[0..1] I_StatisticalValueControl _StatisticalValueControl $projection.StatisticalValueControl = _StatisticalValueControl.StatisticalValueControl
[0..1] I_MaterialPricingGroup _MaterialPricingGroup $projection.MaterialPricingGroup = _MaterialPricingGroup.MaterialPricingGroup
[0..1] I_Material _MainItemPricingRefMaterial $projection.MainItemPricingRefMaterial = _MainItemPricingRefMaterial.Material
[0..1] I_MaterialPricingGroup _MainItemMaterialPricingGroup $projection.MainItemMaterialPricingGroup = _MainItemMaterialPricingGroup.MaterialPricingGroup
[0..1] I_TimeSheetOvertimeCat _TimeSheetOvertimeCat $projection.TimeSheetOvertimeCategory = _TimeSheetOvertimeCat.TimeSheetOvertimeCategory
[0..1] I_Country _DepartureCountry $projection.DepartureCountry = _DepartureCountry.Country
[0..1] I_BusinessArea _BusinessArea $projection.BusinessArea = _BusinessArea.BusinessArea
[0..1] I_WBSElementBasicData _WBSElement $projection.WBSElementInternalID = _WBSElement.WBSElementInternalID
[0..1] I_WBSElementBasicData _WBSElementBasicData $projection.WBSElementInternalID_2 = _WBSElementBasicData.WBSElementInternalID
[0..1] I_ControllingArea _ControllingArea $projection.ControllingArea = _ControllingArea.ControllingArea
[0..1] I_MatlAccountAssignmentGroup _MatlAccountAssignmentGroup $projection.MatlAccountAssignmentGroup = _MatlAccountAssignmentGroup.MatlAccountAssignmentGroup
[0..1] I_CostCenter _CostCenter $projection.CostCenter = _CostCenter.CostCenter and $projection.ControllingArea = _CostCenter.ControllingArea and _CostCenter.ValidityEndDate >= $projection.CreationDate and _CostCenter.ValidityStartDate <= $projection.CreationDate
[0..*] I_CostCenter _CostCenter_2 $projection.CostCenter = _CostCenter_2.CostCenter and $projection.ControllingArea = _CostCenter_2.ControllingArea
[0..*] I_ProfitCenter _ProfitCenter $projection.ProfitCenter = _ProfitCenter.ProfitCenter and $projection.ControllingArea = _ProfitCenter.ControllingArea
[0..1] I_SalesDocumentItem _ReferenceSalesDocumentItem $projection.ReferenceSDDocument = _ReferenceSalesDocumentItem.SalesDocument and $projection.ReferenceSDDocumentItem = _ReferenceSalesDocumentItem.SalesDocumentItem and ( $projection.ReferenceSDDocumentCategory = 'C' or $projection.ReferenceSDDocumentCategory = 'G' or $projection.ReferenceSDDocumentCategory = 'H' or $projection.ReferenceSDDocumentCategory = 'I' or $projection.ReferenceSDDocumentCategory = 'K' or $projection.ReferenceSDDocumentCategory = 'L' or $projection.ReferenceSDDocumentCategory = ':' )
[0..1] I_DeliveryDocumentItem _ReferenceDeliveryDocumentItem $projection.ReferenceSDDocument = _ReferenceDeliveryDocumentItem.DeliveryDocument and $projection.ReferenceSDDocumentItem = _ReferenceDeliveryDocumentItem.DeliveryDocumentItem and ( $projection.ReferenceSDDocumentCategory = 'J' or $projection.ReferenceSDDocumentCategory = 'T' )
[0..1] I_BillingDocumentItemBasic _ReferenceBillingDocItemBasic $projection.ReferenceSDDocument = _ReferenceBillingDocItemBasic.BillingDocument and $projection.ReferenceSDDocumentItem = _ReferenceBillingDocItemBasic.BillingDocumentItem and ( $projection.ReferenceSDDocumentCategory = 'M' or $projection.ReferenceSDDocumentCategory = 'N' or $projection.ReferenceSDDocumentCategory = 'O' or $projection.ReferenceSDDocumentCategory = 'P' or $projection.ReferenceSDDocumentCategory = 'S' or $projection.ReferenceSDDocumentCategory = 'U' or $projection.ReferenceSDDocumentCategory = '3' or $projection.ReferenceSDDocumentCategory = '4' or $projection.ReferenceSDDocumentCategory = '5' or $projection.ReferenceSDDocumentCategory = '6' or $projection.ReferenceSDDocumentCategory = 'EBDR' or $projection.ReferenceSDDocumentCategory = 'PBD' )
[0..1] I_SDDocumentCategory _ReferenceSDDocumentCategory $projection.ReferenceSDDocumentCategory = _ReferenceSDDocumentCategory.SDDocumentCategory
[0..1] I_SalesDocument _SalesDocument $projection.SalesDocument = _SalesDocument.SalesDocument
[0..1] I_SalesDocumentItem _SalesDocumentItem $projection.SalesDocument = _SalesDocumentItem.SalesDocument and $projection.SalesDocumentItem = _SalesDocumentItem.SalesDocumentItem
[0..1] I_SDDocumentCategory _SalesSDDocumentCategory $projection.SalesSDDocumentCategory = _SalesSDDocumentCategory.SDDocumentCategory
[0..1] I_BillingDocumentItemBasic _HigherLevelItemBasic $projection.BillingDocument = _HigherLevelItemBasic.BillingDocument and $projection.HigherLevelItem = _HigherLevelItemBasic.BillingDocumentItem
[0..1] I_PrelimBillingDocument _PrelimBillingDocument $projection.PrelimBillingDocument = _PrelimBillingDocument.PrelimBillingDocument
[0..1] I_PrelimBillingDocumentItem _PrelimBillingDocumentItem $projection.PrelimBillingDocument = _PrelimBillingDocumentItem.PrelimBillingDocument and $projection.PrelimBillingDocumentItem = _PrelimBillingDocumentItem.PrelimBillingDocumentItem
[0..1] I_SalesGroup _SalesGroup $projection.SalesGroup = _SalesGroup.SalesGroup
[0..1] I_AdditionalCustomerGroup1 _AdditionalCustomerGroup1 $projection.AdditionalCustomerGroup1 = _AdditionalCustomerGroup1.AdditionalCustomerGroup1
[0..1] I_AdditionalCustomerGroup2 _AdditionalCustomerGroup2 $projection.AdditionalCustomerGroup2 = _AdditionalCustomerGroup2.AdditionalCustomerGroup2
[0..1] I_AdditionalCustomerGroup3 _AdditionalCustomerGroup3 $projection.AdditionalCustomerGroup3 = _AdditionalCustomerGroup3.AdditionalCustomerGroup3
[0..1] I_AdditionalCustomerGroup4 _AdditionalCustomerGroup4 $projection.AdditionalCustomerGroup4 = _AdditionalCustomerGroup4.AdditionalCustomerGroup4
[0..1] I_AdditionalCustomerGroup5 _AdditionalCustomerGroup5 $projection.AdditionalCustomerGroup5 = _AdditionalCustomerGroup5.AdditionalCustomerGroup5
[0..1] I_SDDocumentReason _SDDocumentReason $projection.SDDocumentReason = _SDDocumentReason.SDDocumentReason
[0..1] I_RetailPromotion _RetailPromotion $projection.RetailPromotion = _RetailPromotion.RetailPromotion
[0..1] I_SalesDeal _SalesDeal $projection.SalesDeal = _SalesDeal.SalesDeal
[0..1] I_SalesDistrict _SalesOrderSalesDistrict $projection.SalesOrderSalesDistrict = _SalesOrderSalesDistrict.SalesDistrict
[0..1] I_CustomerGroup _SalesOrderCustomerGroup $projection.SalesOrderCustomerGroup = _SalesOrderCustomerGroup.CustomerGroup
[0..1] I_CustomerPriceGroup _SalesOrderCustomerPriceGroup $projection.SalesOrderCustomerPriceGroup = _SalesOrderCustomerPriceGroup.CustomerPriceGroup
[0..1] I_PriceListType _SalesOrderPriceListType $projection.SalesOrderPriceListType = _SalesOrderPriceListType.PriceListType
[0..1] I_SalesOrganization _SalesOrderSalesOrganization $projection.SalesOrderSalesOrganization = _SalesOrderSalesOrganization.SalesOrganization
[0..1] I_DistributionChannel _SalesOrderDistributionChannel $projection.SalesOrderDistributionChannel = _SalesOrderDistributionChannel.DistributionChannel
[0..1] I_ShippingPoint _ShippingPoint $projection.ShippingPoint = _ShippingPoint.ShippingPoint
[0..1] I_ServiceDocumentType _ServiceDocumentType $projection.ServiceDocumentType = _ServiceDocumentType.ServiceDocumentType
[0..1] I_SDDocumentCategory _SDDocumentCategory $projection.SDDocumentCategory = _SDDocumentCategory.SDDocumentCategory
[0..1] I_BillingDocumentCategory _BillingDocumentCategory $projection.BillingDocumentCategory = _BillingDocumentCategory.BillingDocumentCategory
[0..1] I_BillingDocumentType _BillingDocumentType $projection.BillingDocumentType = _BillingDocumentType.BillingDocumentType
[0..1] I_SalesOrganization _SalesOrganization $projection.SalesOrganization = _SalesOrganization.SalesOrganization
[0..1] I_DistributionChannel _DistributionChannel $projection.DistributionChannel = _DistributionChannel.DistributionChannel
[0..1] I_CustomerPriceGroup _CustomerPriceGroup $projection.CustomerPriceGroup = _CustomerPriceGroup.CustomerPriceGroup
[0..1] I_CustomerGroup _CustomerGroup $projection.CustomerGroup = _CustomerGroup.CustomerGroup
[0..1] I_Country _Country $projection.Country = _Country.Country
[0..1] I_CityCode _CityCode $projection.CityCode = _CityCode.CityCode and $projection.Country = _CityCode.Country and $projection.Region = _CityCode.Region
[0..1] I_SalesDistrict _SalesDistrict $projection.SalesDistrict = _SalesDistrict.SalesDistrict
[0..1] I_Region _Region $projection.Region = _Region.Region and $projection.Country = _Region.Country
[0..1] I_CountyCode _County $projection.Country = _County.Country and $projection.Region = _County.Region and $projection.County = _County.County
[0..1] I_TaxingCounty _County_2 $projection.Country = _County_2.Country and $projection.Region = _County_2.Region and $projection.County = _County_2.TaxingCounty
[0..1] I_OverallSDProcessStatus _OverallSDProcessStatus $projection.OverallSDProcessStatus = _OverallSDProcessStatus.OverallSDProcessStatus
[0..1] I_OverallBillingStatus _OverallBillingStatus $projection.OverallBillingStatus = _OverallBillingStatus.OverallBillingStatus
[0..1] I_Customer _SoldToParty $projection.SoldToParty = _SoldToParty.Customer
[0..1] I_Customer _PayerParty $projection.PayerParty = _PayerParty.Customer
[0..1] I_CompanyCode _CompanyCode $projection.CompanyCode = _CompanyCode.CompanyCode
[0..1] I_Customer _ShipToParty $projection.ShipToParty = _ShipToParty.Customer
[0..1] I_Customer _BillToParty $projection.BillToParty = _BillToParty.Customer
[0..1] I_Employee _SalesEmployee $projection.SalesEmployee = _SalesEmployee.PersonnelNumber
[0..1] I_Employee _ResponsibleEmployee $projection.ResponsibleEmployee = _ResponsibleEmployee.PersonnelNumber
[0..1] I_PersonWorkAgreement_1 _SalesEmployee_2 $projection.SalesEmployee = _SalesEmployee_2.PersonWorkAgreement
[0..1] I_PersonWorkAgreement_1 _ResponsibleEmployee_2 $projection.ResponsibleEmployee = _ResponsibleEmployee_2.PersonWorkAgreement
[0..1] I_ServiceDocumentEnhcd _SolutionOrder $projection.BusinessSolutionOrder = _SolutionOrder.ServiceDocument and _SolutionOrder.ServiceObjectType = 'BUS2000172'
[1] I_ServiceDocumentItemEnhcd _SolutionOrderItem _SolutionOrderItem.ServiceObjectType = 'BUS2000172' and $projection.BusinessSolutionOrder = _SolutionOrderItem.ServiceDocument and $projection.BusinessSolutionOrderItem = _SolutionOrderItem.ServiceDocumentItem
[0..1] I_BillingDocumentBasic _CancelledBillingDocumentBasic $projection.CancelledBillingDocument = _CancelledBillingDocumentBasic.BillingDocument
[1] E_BillingDocumentItem _Extension $projection.BillingDocument = _Extension.BillingDocument and $projection.BillingDocumentItem = _Extension.BillingDocumentItem

Annotations (17)

NameValueLevelField
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AbapCatalog.sqlViewName ISDBILDOCITMEBAS view
AccessControl.authorizationCheck #CHECK view
Analytics.dataCategory #DIMENSION view
ClientHandling.algorithm #SESSION_VARIABLE view
EndUserText.label Billing Document Item Basic Extended view
Metadata.allowExtensions true view
Metadata.ignorePropagatedAnnotations true view
ObjectModel.modelingPattern #ANALYTICAL_DIMENSION view
ObjectModel.representativeKey BillingDocumentItem view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
ObjectModel.usageType.serviceQuality #A view
ObjectModel.usageType.sizeCategory #XL view
VDM.lifecycle.status #DEPRECATED view
VDM.lifecycle.successor I_BillingDocumentItemBasic view
VDM.viewType #BASIC view

Fields (291)

KeyFieldSource TableSource FieldDescription
KEY BillingDocument vbeln
KEY BillingDocumentItem posnr
SalesDocumentItemCategory pstyv
SalesDocumentItemType posar
ReturnItemProcessingType shkzg
CreatedByUser ernam
CreationDate erdat
CreationTime erzet
ReferenceLogicalSystem logsys
OrganizationDivision spara
Division spart
SalesOffice vkbur
Material matnr
Product
OriginallyRequestedMaterial matwa
InternationalArticleNumber ean11
PricingReferenceMaterial pmatn
Batch charg
ProductHierarchyNode prodh
MaterialGroup matkl
ProductGroup
AdditionalMaterialGroup1 mvgr1
AdditionalMaterialGroup2 mvgr2
AdditionalMaterialGroup3 mvgr3
AdditionalMaterialGroup4 mvgr4
AdditionalMaterialGroup5 mvgr5
ProductConfiguration cuobj
MaterialCommissionGroup provg
Plant werks
StorageLocation lgort
ReplacementPartType atpkz
MaterialGroupHierarchy1 wgru1
MaterialGroupHierarchy2 wgru2
PlantRegion wkreg
PlantCounty wkcou
PlantCity wkcty
BOMExplosion sernr
MaterialDeterminationType prosa
BillingDocumentItemText arktx
ServicesRenderedDate fbuda
BillingQuantity fkimg
BillingQuantityUnit vrkme
BillingQuantityInBaseUnit fklmg
BaseUnit meins
MRPRequiredQuantityInBaseUnit lmeng
BillingToBaseQuantityDnmntr umvkn
BillingToBaseQuantityNmrtr umvkz
ItemGrossWeight brgew
ItemNetWeight ntgew
ItemWeightUnit gewei
ItemVolume volum
ItemVolumeUnit voleh
BillToPartyCountry lland_auft
BillToPartyRegion regio_auft
BillingPlanRule fareg
BillingPlan fplnr
BillingPlanItem fpltr
DocumentBillingStatus fksaa
NetAmount netwr
TransactionCurrency waerk
GrossAmount brtwr
PricingDate prsdt
PriceDetnExchangeRate
PricingScaleQuantityInBaseUnit smeng
TaxAmount mwsbp
CostAmount wavwr
Subtotal1Amount kzwi1
Subtotal2Amount kzwi2
Subtotal3Amount kzwi3
Subtotal4Amount kzwi4
Subtotal5Amount kzwi5
Subtotal6Amount kzwi6
StatisticalValueControl kowrr
CashDiscountIsDeductible sktof
CustomerConditionGroup1 kdkg1
CustomerConditionGroup2 kdkg2
CustomerConditionGroup3 kdkg3
CustomerConditionGroup4 kdkg4
CustomerConditionGroup5 kdkg5
ManualPriceChangeType mprok
MaterialPricingGroup kondm
StatisticsExchangeRate
MainItemPricingRefMaterial upmat
MainItemMaterialPricingGroup ukonm
TimeSheetOvertimeCategory cats_overtime_category
DepartureCountry aland
TaxJurisdiction txjcd
ProductTaxClassification1 taxm1
ProductTaxClassification2 taxm2
ProductTaxClassification3 taxm3
ProductTaxClassification4 taxm4
ProductTaxClassification5 taxm5
ProductTaxClassification6 taxm6
ProductTaxClassification7 taxm7
ProductTaxClassification8 taxm8
ProductTaxClassification9 taxm9
ZeroVATRsn j_1arfz
TaxCode mwsk1
TaxRateValidityStartDate txdat_from
EligibleAmountForCashDiscount skfbp
BusinessArea gsber
ProfitCenter prctr
WBSElementInternalID ps_psp_pnr
WBSElementInternalID_2
ControllingArea kokrs
ProfitabilitySegment
ProfitabilitySegment_2
OrderID aufnr
CostCenter kostl
OriginSDDocument vbelv
OriginSDDocumentItem posnv
PriceDetnExchangeRateDate kursk_dat
MatlAccountAssignmentGroup ktgrm
ReferenceSDDocument vgbel
ReferenceSDDocumentItem vgpos
ReferenceSDDocumentCategory vgtyp
SalesDocument aubel
SalesDocumentItem aupos
SalesSDDocumentCategory autyp
HigherLevelItem uepos
BillingDocumentItemInPartSgmt pospa
ExternalReferenceDocument
ExternalReferenceDocumentItem
BillingDocExtReferenceDocItem
PrelimBillingDocument pbd_id
PrelimBillingDocumentItem pbd_item_id
SalesGroup vkgrp
AdditionalCustomerGroup1 kvgr1
AdditionalCustomerGroup2 kvgr2
AdditionalCustomerGroup3 kvgr3
AdditionalCustomerGroup4 kvgr4
AdditionalCustomerGroup5 kvgr5
SDDocumentReason augru_auft
RetailPromotion aktnr
RebateBasisAmount bonba
VolumeRebateGroup bonus
ItemIsRelevantForCredit cmpnt
CreditRelatedPrice cmpre
SalesDeal knuma_ag
SalesPromotion knuma_pi
SalesOrderSalesDistrict bzirk_auft
SalesOrderCustomerGroup kdgrp_auft
SalesOrderCustomerPriceGroup konda_auft
SalesOrderPriceListType pltyp_auft
SalesOrderSalesOrganization vkorg_auft
SalesOrderDistributionChannel vtweg_auft
SalesDocIsCreatedFromReference auref
ShippingPoint vstel
ServiceDocumentType service_doc_type
ServiceDocument service_doc_id
ServiceDocumentItem service_doc_item_id
BusinessSolutionOrder solution_order_id
BusinessSolutionOrderItem solution_order_item_id
HigherLevelItemUsage uepvw
SDDocumentCategory vbtyp_ana
BillingDocumentType fkart_ana
SalesOrganization vkorg_ana
DistributionChannel vtweg_ana
CustomerPriceGroup konda_ana
CustomerGroup kdgrp_ana
Country land1_ana
Region regio_ana
CityCode cityc_ana
SalesDistrict bzirk_ana
OverallSDProcessStatus gbstk_ana
OverallBillingStatus vf_status_ana
SoldToParty kunag_ana
PayerParty kunrg_ana
BillingDocumentDate fkdat_ana
CompanyCode bukrs_ana
County counc_ana
CustomerRebateAgreement knuma_ana
BillingDocumentCategory fktyp_ana
PricingDocument knumv_ana
CancelledBillingDocument sfakn_ana
BillingDocumentIsTemporary draft
ShipToParty kunwe_ana
BillToParty kunre_ana
SalesEmployee perve_ana
ResponsibleEmployee perzm_ana
_BillingDocumentBasic _BillingDocumentBasic
_PartnerBasic _PartnerBasic
_PricingElementBasic _PricingElementBasic
_SalesDocumentItemCategory _SalesDocumentItemCategory
_SalesDocumentItemType _SalesDocumentItemType
_CreatedByUser _CreatedByUser
_ReferenceLogicalSystem _ReferenceLogicalSystem
_OrganizationDivision _OrganizationDivision
_Division _Division
_SalesOffice _SalesOffice
_Material _Material
_Product _Product
_OriginallyRequestedMaterial _OriginallyRequestedMaterial
_PricingReferenceMaterial _PricingReferenceMaterial
_Batch _Batch
_ProductHierarchyNode _ProductHierarchyNode
_MaterialGroup _MaterialGroup
_ProductGroup _ProductGroup
_AdditionalMaterialGroup1 _AdditionalMaterialGroup1
_AdditionalMaterialGroup2 _AdditionalMaterialGroup2
_AdditionalMaterialGroup3 _AdditionalMaterialGroup3
_AdditionalMaterialGroup4 _AdditionalMaterialGroup4
_AdditionalMaterialGroup5 _AdditionalMaterialGroup5
_MaterialCommissionGroup _MaterialCommissionGroup
_Plant _Plant
_StorageLocation _StorageLocation
_PlantRegion _PlantRegion
_BillingQuantityUnit _BillingQuantityUnit
_BaseUnit _BaseUnit
_ItemWeightUnit _ItemWeightUnit
_ItemVolumeUnit _ItemVolumeUnit
_BillToPartyCountry _BillToPartyCountry
_BillToPartyRegion _BillToPartyRegion
_BillingPlanRule _BillingPlanRule
_TransactionCurrency _TransactionCurrency
_StatisticalValueControl _StatisticalValueControl
_MaterialPricingGroup _MaterialPricingGroup
_MainItemPricingRefMaterial _MainItemPricingRefMaterial
_MainItemMaterialPricingGroup _MainItemMaterialPricingGroup
_TimeSheetOvertimeCat _TimeSheetOvertimeCat
_DepartureCountry _DepartureCountry
_BusinessArea _BusinessArea
_ProfitCenter _ProfitCenter
_WBSElement _WBSElement
_WBSElementBasicData _WBSElementBasicData
_ControllingArea _ControllingArea
_MatlAccountAssignmentGroup _MatlAccountAssignmentGroup
_CostCenter _CostCenter
_CostCenter_2 _CostCenter_2
_ReferenceSalesDocumentItem _ReferenceSalesDocumentItem
_ReferenceDeliveryDocumentItem _ReferenceDeliveryDocumentItem
_ReferenceBillingDocItemBasic _ReferenceBillingDocItemBasic
_ReferenceSDDocumentCategory _ReferenceSDDocumentCategory
_SalesDocument _SalesDocument
_SalesDocumentItem _SalesDocumentItem
_SalesSDDocumentCategory _SalesSDDocumentCategory
_HigherLevelItemBasic _HigherLevelItemBasic
_PrelimBillingDocument _PrelimBillingDocument
_PrelimBillingDocumentItem _PrelimBillingDocumentItem
_SalesGroup _SalesGroup
_AdditionalCustomerGroup1 _AdditionalCustomerGroup1
_AdditionalCustomerGroup2 _AdditionalCustomerGroup2
_AdditionalCustomerGroup3 _AdditionalCustomerGroup3
_AdditionalCustomerGroup4 _AdditionalCustomerGroup4
_AdditionalCustomerGroup5 _AdditionalCustomerGroup5
_SDDocumentReason _SDDocumentReason
_RetailPromotion _RetailPromotion
_SalesDeal _SalesDeal
_SalesOrderSalesDistrict _SalesOrderSalesDistrict
_SalesOrderCustomerGroup _SalesOrderCustomerGroup
_SalesOrderCustomerPriceGroup _SalesOrderCustomerPriceGroup
_SalesOrderPriceListType _SalesOrderPriceListType
_SalesOrderSalesOrganization _SalesOrderSalesOrganization
_SalesOrderDistributionChannel _SalesOrderDistributionChannel
_ShippingPoint _ShippingPoint
_ServiceDocumentType _ServiceDocumentType
_SDDocumentCategory _SDDocumentCategory
_BillingDocumentCategory _BillingDocumentCategory
_BillingDocumentType _BillingDocumentType
_SalesOrganization _SalesOrganization
_DistributionChannel _DistributionChannel
_CustomerPriceGroup _CustomerPriceGroup
_CustomerGroup _CustomerGroup
_Country _Country
_Region _Region
_CityCode _CityCode
_SalesDistrict _SalesDistrict
_OverallSDProcessStatus _OverallSDProcessStatus
_OverallBillingStatus _OverallBillingStatus
_SoldToParty _SoldToParty
_PayerParty _PayerParty
_CompanyCode _CompanyCode
_County _County
_County_2 _County_2
_ShipToParty _ShipToParty
_BillToParty _BillToParty
_SalesEmployee _SalesEmployee
_SalesEmployee_2 _SalesEmployee_2
_ResponsibleEmployee _ResponsibleEmployee
_ResponsibleEmployee_2 _ResponsibleEmployee_2
_SolutionOrder _SolutionOrder
_SolutionOrderItem _SolutionOrderItem
_CancelledBillingDocumentBasic _CancelledBillingDocumentBasic
_MaterialGroupText _MaterialGroupText
_ShippingPointText _ShippingPointText
_BusinessAreaText _BusinessAreaText
_MaterialText _MaterialText
_ProductText _ProductText
_PricingReferenceMaterialText _PricingReferenceMaterialText
_MainItemPricingRefMatlText _MainItemPricingRefMatlText
_OriginallyRequestedMatlText _OriginallyRequestedMatlText
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AbapCatalog.sqlViewName: 'ISDBILDOCITMEBAS'

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

@AccessControl.privilegedAssociations: [ '_MaterialGroupText',
                                         '_MainItemPricingRefMatlText',
                                         '_PricingReferenceMaterialText',
                                         '_OriginallyRequestedMatlText',
                                         '_MaterialText',
                                         '_ProductText',
                                         '_CreatedByUser',
                                         '_ShippingPointText',
                                         '_BusinessAreaText' ]

@Analytics.dataCategory: #DIMENSION

@ClientHandling.algorithm: #SESSION_VARIABLE

@EndUserText.label: 'Billing Document Item Basic Extended'

@Metadata.allowExtensions: true
@Metadata.ignorePropagatedAnnotations: true

@ObjectModel.modelingPattern: #ANALYTICAL_DIMENSION
@ObjectModel.representativeKey: 'BillingDocumentItem'

@ObjectModel.supportedCapabilities: [ #ANALYTICAL_DIMENSION,
                                      #CDS_MODELING_DATA_SOURCE,
                                      #CDS_MODELING_ASSOCIATION_TARGET,
                                      #SQL_DATA_SOURCE ]

@ObjectModel.usageType: { dataClass: #TRANSACTIONAL, serviceQuality: #A, sizeCategory: #XL }

@VDM.lifecycle: { status: #DEPRECATED, successor: 'I_BillingDocumentItemBasic' }
@VDM.viewType: #BASIC

define view I_BillingDocExtdItemBasic
  as select from vbrp
  // Association


  association [0..*] to I_MaterialText                 as _MaterialText
    on $projection.Material = _MaterialText.Material

  association [0..*] to I_ProductText                  as _ProductText
    on $projection.Product = _ProductText.Product

  association [0..*] to I_MaterialText                 as _OriginallyRequestedMatlText
    on $projection.OriginallyRequestedMaterial = _OriginallyRequestedMatlText.Material

  association [0..*] to I_MaterialText                 as _PricingReferenceMaterialText
    on $projection.PricingReferenceMaterial = _PricingReferenceMaterialText.Material

  association [0..*] to I_MaterialText                 as _MainItemPricingRefMatlText
    on $projection.MainItemPricingRefMaterial = _MainItemPricingRefMatlText.Material

  association [0..*] to I_MaterialGroupText            as _MaterialGroupText
    on $projection.MaterialGroup = _MaterialGroupText.MaterialGroup

  association [0..*] to I_ShippingPointText            as _ShippingPointText
    on $projection.ShippingPoint = _ShippingPointText.ShippingPoint

  association [0..*] to I_BusinessAreaText             as _BusinessAreaText
    on $projection.BusinessArea = _BusinessAreaText.BusinessArea

  association [1..1] to I_BillingDocumentBasic         as _BillingDocumentBasic
    on $projection.BillingDocument = _BillingDocumentBasic.BillingDocument

  association [0..*] to I_BillingDocItemPartnerBasic   as _PartnerBasic
    on  $projection.BillingDocument     = _PartnerBasic.BillingDocument
    and $projection.BillingDocumentItem = _PartnerBasic.BillingDocumentItem

  association [0..*] to I_BillingDocItemPrcgElmntBasic as _PricingElementBasic
    on  $projection.BillingDocument     = _PricingElementBasic.BillingDocument
    and $projection.BillingDocumentItem = _PricingElementBasic.BillingDocumentItem

  association [0..1] to I_SalesDocumentItemCategory    as _SalesDocumentItemCategory
    on $projection.SalesDocumentItemCategory = _SalesDocumentItemCategory.SalesDocumentItemCategory

  association [0..1] to I_SalesDocumentItemType        as _SalesDocumentItemType
    on $projection.SalesDocumentItemType = _SalesDocumentItemType.SalesDocumentItemType

  association [0..1] to I_User                         as _CreatedByUser
    on $projection.CreatedByUser = _CreatedByUser.UserID

  association [0..1] to I_LogicalSystem                as _ReferenceLogicalSystem
    on $projection.ReferenceLogicalSystem = _ReferenceLogicalSystem.LogicalSystem

  association [0..1] to I_Division                     as _OrganizationDivision
    on $projection.OrganizationDivision = _OrganizationDivision.Division

  association [0..1] to I_Division                     as _Division
    on $projection.Division = _Division.Division

  association [0..1] to I_SalesOffice                  as _SalesOffice
    on $projection.SalesOffice = _SalesOffice.SalesOffice

  association [0..1] to I_Material                     as _Material
    on $projection.Material = _Material.Material

  association [0..1] to I_Product                      as _Product
    on $projection.Product = _Product.Product

  association [0..1] to I_Material                     as _OriginallyRequestedMaterial
    on $projection.OriginallyRequestedMaterial = _OriginallyRequestedMaterial.Material

  association [0..1] to I_Material                     as _PricingReferenceMaterial
    on $projection.PricingReferenceMaterial = _PricingReferenceMaterial.Material

  association [0..1] to I_Batch                        as _Batch
    on  $projection.Plant    = _Batch.Plant
    and $projection.Material = _Batch.Material
    and $projection.Batch    = _Batch.Batch

  association [0..1] to I_ProductHierarchyNode         as _ProductHierarchyNode
    on $projection.ProductHierarchyNode = _ProductHierarchyNode.ProductHierarchyNode

  association [0..1] to I_MaterialGroup                as _MaterialGroup
    on $projection.MaterialGroup = _MaterialGroup.MaterialGroup

  association [0..1] to I_ProductGroup_2               as _ProductGroup
    on $projection.ProductGroup = _ProductGroup.ProductGroup

  association [0..1] to I_AdditionalMaterialGroup1     as _AdditionalMaterialGroup1
    on $projection.AdditionalMaterialGroup1 = _AdditionalMaterialGroup1.AdditionalMaterialGroup1

  association [0..1] to I_AdditionalMaterialGroup2     as _AdditionalMaterialGroup2
    on $projection.AdditionalMaterialGroup2 = _AdditionalMaterialGroup2.AdditionalMaterialGroup2

  association [0..1] to I_AdditionalMaterialGroup3     as _AdditionalMaterialGroup3
    on $projection.AdditionalMaterialGroup3 = _AdditionalMaterialGroup3.AdditionalMaterialGroup3

  association [0..1] to I_AdditionalMaterialGroup4     as _AdditionalMaterialGroup4
    on $projection.AdditionalMaterialGroup4 = _AdditionalMaterialGroup4.AdditionalMaterialGroup4

  association [0..1] to I_AdditionalMaterialGroup5     as _AdditionalMaterialGroup5
    on $projection.AdditionalMaterialGroup5 = _AdditionalMaterialGroup5.AdditionalMaterialGroup5

  association [0..1] to I_MaterialCommissionGroup      as _MaterialCommissionGroup
    on $projection.MaterialCommissionGroup = _MaterialCommissionGroup.MaterialCommissionGroup

  association [0..1] to I_Plant                        as _Plant
    on $projection.Plant = _Plant.Plant

  association [0..1] to I_StorageLocation              as _StorageLocation
    on  $projection.Plant           = _StorageLocation.Plant
    and $projection.StorageLocation = _StorageLocation.StorageLocation

  association [0..1] to I_Region                       as _PlantRegion
    on  $projection.DepartureCountry = _PlantRegion.Country
    and $projection.PlantRegion      = _PlantRegion.Region

  association [0..1] to I_UnitOfMeasure                as _BillingQuantityUnit
    on $projection.BillingQuantityUnit = _BillingQuantityUnit.UnitOfMeasure

  association [0..1] to I_UnitOfMeasure                as _BaseUnit
    on $projection.BaseUnit = _BaseUnit.UnitOfMeasure

  association [0..1] to I_UnitOfMeasure                as _ItemWeightUnit
    on $projection.ItemWeightUnit = _ItemWeightUnit.UnitOfMeasure

  association [0..1] to I_UnitOfMeasure                as _ItemVolumeUnit
    on $projection.ItemVolumeUnit = _ItemVolumeUnit.UnitOfMeasure

  association [0..1] to I_Country                      as _BillToPartyCountry
    on $projection.BillToPartyCountry = _BillToPartyCountry.Country

  association [0..1] to I_Region                       as _BillToPartyRegion
    on  $projection.BillToPartyCountry = _BillToPartyRegion.Country
    and $projection.BillToPartyRegion  = _BillToPartyRegion.Region

  association [0..1] to I_BillingPlanRule              as _BillingPlanRule
    on $projection.BillingPlanRule = _BillingPlanRule.BillingPlanRule

  association [0..1] to I_Currency                     as _TransactionCurrency
    on $projection.TransactionCurrency = _TransactionCurrency.Currency

  association [0..1] to I_StatisticalValueControl      as _StatisticalValueControl
    on $projection.StatisticalValueControl = _StatisticalValueControl.StatisticalValueControl

  association [0..1] to I_MaterialPricingGroup         as _MaterialPricingGroup
    on $projection.MaterialPricingGroup = _MaterialPricingGroup.MaterialPricingGroup

  association [0..1] to I_Material                     as _MainItemPricingRefMaterial
    on $projection.MainItemPricingRefMaterial = _MainItemPricingRefMaterial.Material

  association [0..1] to I_MaterialPricingGroup         as _MainItemMaterialPricingGroup
    on $projection.MainItemMaterialPricingGroup = _MainItemMaterialPricingGroup.MaterialPricingGroup

  association [0..1] to I_TimeSheetOvertimeCat         as _TimeSheetOvertimeCat
    on $projection.TimeSheetOvertimeCategory = _TimeSheetOvertimeCat.TimeSheetOvertimeCategory

  association [0..1] to I_Country                      as _DepartureCountry
    on $projection.DepartureCountry = _DepartureCountry.Country

  association [0..1] to I_BusinessArea                 as _BusinessArea
    on $projection.BusinessArea = _BusinessArea.BusinessArea

  association [0..1] to I_WBSElementBasicData          as _WBSElement
    on $projection.WBSElementInternalID = _WBSElement.WBSElementInternalID

  association [0..1] to I_WBSElementBasicData          as _WBSElementBasicData
    on $projection.WBSElementInternalID_2 = _WBSElementBasicData.WBSElementInternalID

  association [0..1] to I_ControllingArea              as _ControllingArea
    on $projection.ControllingArea = _ControllingArea.ControllingArea

  association [0..1] to I_MatlAccountAssignmentGroup   as _MatlAccountAssignmentGroup
    on $projection.MatlAccountAssignmentGroup = _MatlAccountAssignmentGroup.MatlAccountAssignmentGroup

  association [0..1] to I_CostCenter                   as _CostCenter
    on  $projection.CostCenter         = _CostCenter.CostCenter
    and $projection.ControllingArea    = _CostCenter.ControllingArea
    and _CostCenter.ValidityEndDate   >= $projection.CreationDate
    and _CostCenter.ValidityStartDate <= $projection.CreationDate

  association [0..*] to I_CostCenter                   as _CostCenter_2
    on  $projection.CostCenter      = _CostCenter_2.CostCenter
    and $projection.ControllingArea = _CostCenter_2.ControllingArea

  association [0..*] to I_ProfitCenter                 as _ProfitCenter
    on  $projection.ProfitCenter    = _ProfitCenter.ProfitCenter
    and $projection.ControllingArea = _ProfitCenter.ControllingArea

  association [0..1] to I_SalesDocumentItem            as _ReferenceSalesDocumentItem
    on  $projection.ReferenceSDDocument     = _ReferenceSalesDocumentItem.SalesDocument
    and $projection.ReferenceSDDocumentItem = _ReferenceSalesDocumentItem.SalesDocumentItem
    and (   $projection.ReferenceSDDocumentCategory = 'C' // Order

         or $projection.ReferenceSDDocumentCategory = 'G' // Contract

         or $projection.ReferenceSDDocumentCategory = 'H' // Returns

         or $projection.ReferenceSDDocumentCategory = 'I' // Order wo Charge

         or $projection.ReferenceSDDocumentCategory = 'K' // Credit Memo Request

         or $projection.ReferenceSDDocumentCategory = 'L' // Debit Memo Request

         or $projection.ReferenceSDDocumentCategory = ':' // Service Order

       )

  association [0..1] to I_DeliveryDocumentItem         as _ReferenceDeliveryDocumentItem
    on  $projection.ReferenceSDDocument     = _ReferenceDeliveryDocumentItem.DeliveryDocument
    and $projection.ReferenceSDDocumentItem = _ReferenceDeliveryDocumentItem.DeliveryDocumentItem
    and (   $projection.ReferenceSDDocumentCategory = 'J' // Delivery

         or $projection.ReferenceSDDocumentCategory = 'T' // Returns Delivery for Order

       )

  association [0..1] to I_BillingDocumentItemBasic     as _ReferenceBillingDocItemBasic
    on  $projection.ReferenceSDDocument     = _ReferenceBillingDocItemBasic.BillingDocument
    and $projection.ReferenceSDDocumentItem = _ReferenceBillingDocItemBasic.BillingDocumentItem
    and (   $projection.ReferenceSDDocumentCategory = 'M'    // Invoice

         or $projection.ReferenceSDDocumentCategory = 'N'    // Invoice Canceled

         or $projection.ReferenceSDDocumentCategory = 'O'    // Credit Memo

         or $projection.ReferenceSDDocumentCategory = 'P'    // Debit Memo

         or $projection.ReferenceSDDocumentCategory = 'S'    // Credit Memo Canceled

         or $projection.ReferenceSDDocumentCategory = 'U'    // Pro Forma Invoice

         or $projection.ReferenceSDDocumentCategory = '3'    // Invoice List

         or $projection.ReferenceSDDocumentCategory = '4'    // Credit Memo List

         or $projection.ReferenceSDDocumentCategory = '5'    // Intercompany Invoice

         or $projection.ReferenceSDDocumentCategory = '6'    // Intercompany Credit Memo

         or $projection.ReferenceSDDocumentCategory = 'EBDR' // External Billing Document Request

         or $projection.ReferenceSDDocumentCategory = 'PBD'  // Preliminary Billing Document

       )

  association [0..1] to I_SDDocumentCategory           as _ReferenceSDDocumentCategory
    on $projection.ReferenceSDDocumentCategory = _ReferenceSDDocumentCategory.SDDocumentCategory

  association [0..1] to I_SalesDocument                as _SalesDocument
    on $projection.SalesDocument = _SalesDocument.SalesDocument

  association [0..1] to I_SalesDocumentItem            as _SalesDocumentItem
    on  $projection.SalesDocument     = _SalesDocumentItem.SalesDocument
    and $projection.SalesDocumentItem = _SalesDocumentItem.SalesDocumentItem

  association [0..1] to I_SDDocumentCategory           as _SalesSDDocumentCategory
    on $projection.SalesSDDocumentCategory = _SalesSDDocumentCategory.SDDocumentCategory

  association [0..1] to I_BillingDocumentItemBasic     as _HigherLevelItemBasic
    on  $projection.BillingDocument = _HigherLevelItemBasic.BillingDocument
    and $projection.HigherLevelItem = _HigherLevelItemBasic.BillingDocumentItem

  association [0..1] to I_PrelimBillingDocument        as _PrelimBillingDocument
    on $projection.PrelimBillingDocument = _PrelimBillingDocument.PrelimBillingDocument

  association [0..1] to I_PrelimBillingDocumentItem    as _PrelimBillingDocumentItem
    on  $projection.PrelimBillingDocument     = _PrelimBillingDocumentItem.PrelimBillingDocument
    and $projection.PrelimBillingDocumentItem = _PrelimBillingDocumentItem.PrelimBillingDocumentItem

  association [0..1] to I_SalesGroup                   as _SalesGroup
    on $projection.SalesGroup = _SalesGroup.SalesGroup

  association [0..1] to I_AdditionalCustomerGroup1     as _AdditionalCustomerGroup1
    on $projection.AdditionalCustomerGroup1 = _AdditionalCustomerGroup1.AdditionalCustomerGroup1

  association [0..1] to I_AdditionalCustomerGroup2     as _AdditionalCustomerGroup2
    on $projection.AdditionalCustomerGroup2 = _AdditionalCustomerGroup2.AdditionalCustomerGroup2

  association [0..1] to I_AdditionalCustomerGroup3     as _AdditionalCustomerGroup3
    on $projection.AdditionalCustomerGroup3 = _AdditionalCustomerGroup3.AdditionalCustomerGroup3

  association [0..1] to I_AdditionalCustomerGroup4     as _AdditionalCustomerGroup4
    on $projection.AdditionalCustomerGroup4 = _AdditionalCustomerGroup4.AdditionalCustomerGroup4

  association [0..1] to I_AdditionalCustomerGroup5     as _AdditionalCustomerGroup5
    on $projection.AdditionalCustomerGroup5 = _AdditionalCustomerGroup5.AdditionalCustomerGroup5

  association [0..1] to I_SDDocumentReason             as _SDDocumentReason
    on $projection.SDDocumentReason = _SDDocumentReason.SDDocumentReason

  association [0..1] to I_RetailPromotion              as _RetailPromotion
    on $projection.RetailPromotion = _RetailPromotion.RetailPromotion

  association [0..1] to I_SalesDeal                    as _SalesDeal
    on $projection.SalesDeal = _SalesDeal.SalesDeal

  association [0..1] to I_SalesDistrict                as _SalesOrderSalesDistrict
    on $projection.SalesOrderSalesDistrict = _SalesOrderSalesDistrict.SalesDistrict

  association [0..1] to I_CustomerGroup                as _SalesOrderCustomerGroup
    on $projection.SalesOrderCustomerGroup = _SalesOrderCustomerGroup.CustomerGroup

  association [0..1] to I_CustomerPriceGroup           as _SalesOrderCustomerPriceGroup
    on $projection.SalesOrderCustomerPriceGroup = _SalesOrderCustomerPriceGroup.CustomerPriceGroup

  association [0..1] to I_PriceListType                as _SalesOrderPriceListType
    on $projection.SalesOrderPriceListType = _SalesOrderPriceListType.PriceListType

  association [0..1] to I_SalesOrganization            as _SalesOrderSalesOrganization
    on $projection.SalesOrderSalesOrganization = _SalesOrderSalesOrganization.SalesOrganization

  association [0..1] to I_DistributionChannel          as _SalesOrderDistributionChannel
    on $projection.SalesOrderDistributionChannel = _SalesOrderDistributionChannel.DistributionChannel

  association [0..1] to I_ShippingPoint                as _ShippingPoint
    on $projection.ShippingPoint = _ShippingPoint.ShippingPoint

  association [0..1] to I_ServiceDocumentType          as _ServiceDocumentType
    on $projection.ServiceDocumentType = _ServiceDocumentType.ServiceDocumentType

  // Analytics fields

  association [0..1] to I_SDDocumentCategory           as _SDDocumentCategory
    on $projection.SDDocumentCategory = _SDDocumentCategory.SDDocumentCategory

  association [0..1] to I_BillingDocumentCategory      as _BillingDocumentCategory
    on $projection.BillingDocumentCategory = _BillingDocumentCategory.BillingDocumentCategory

  association [0..1] to I_BillingDocumentType          as _BillingDocumentType
    on $projection.BillingDocumentType = _BillingDocumentType.BillingDocumentType

  association [0..1] to I_SalesOrganization            as _SalesOrganization
    on $projection.SalesOrganization = _SalesOrganization.SalesOrganization

  association [0..1] to I_DistributionChannel          as _DistributionChannel
    on $projection.DistributionChannel = _DistributionChannel.DistributionChannel

  association [0..1] to I_CustomerPriceGroup           as _CustomerPriceGroup
    on $projection.CustomerPriceGroup = _CustomerPriceGroup.CustomerPriceGroup

  association [0..1] to I_CustomerGroup                as _CustomerGroup
    on $projection.CustomerGroup = _CustomerGroup.CustomerGroup

  association [0..1] to I_Country                      as _Country
    on $projection.Country = _Country.Country

  association [0..1] to I_CityCode                     as _CityCode
    on  $projection.CityCode = _CityCode.CityCode
    and $projection.Country  = _CityCode.Country
    and $projection.Region   = _CityCode.Region

  association [0..1] to I_SalesDistrict                as _SalesDistrict
    on $projection.SalesDistrict = _SalesDistrict.SalesDistrict

  association [0..1] to I_Region                       as _Region
    on  $projection.Region  = _Region.Region
    and $projection.Country = _Region.Country

  association [0..1] to I_CountyCode                   as _County
    on  $projection.Country = _County.Country
    and $projection.Region  = _County.Region
    and $projection.County  = _County.County

  association [0..1] to I_TaxingCounty                 as _County_2
    on  $projection.Country = _County_2.Country
    and $projection.Region  = _County_2.Region
    and $projection.County  = _County_2.TaxingCounty

  association [0..1] to I_OverallSDProcessStatus       as _OverallSDProcessStatus
    on $projection.OverallSDProcessStatus = _OverallSDProcessStatus.OverallSDProcessStatus

  association [0..1] to I_OverallBillingStatus         as _OverallBillingStatus
    on $projection.OverallBillingStatus = _OverallBillingStatus.OverallBillingStatus

  association [0..1] to I_Customer                     as _SoldToParty
    on $projection.SoldToParty = _SoldToParty.Customer

  association [0..1] to I_Customer                     as _PayerParty
    on $projection.PayerParty = _PayerParty.Customer

  association [0..1] to I_CompanyCode                  as _CompanyCode
    on $projection.CompanyCode = _CompanyCode.CompanyCode

  association [0..1] to I_Customer                     as _ShipToParty
    on $projection.ShipToParty = _ShipToParty.Customer

  association [0..1] to I_Customer                     as _BillToParty
    on $projection.BillToParty = _BillToParty.Customer

  association [0..1] to I_Employee                     as _SalesEmployee
    on $projection.SalesEmployee = _SalesEmployee.PersonnelNumber

  association [0..1] to I_Employee                     as _ResponsibleEmployee
    on $projection.ResponsibleEmployee = _ResponsibleEmployee.PersonnelNumber

  association [0..1] to I_PersonWorkAgreement_1        as _SalesEmployee_2
    on $projection.SalesEmployee = _SalesEmployee_2.PersonWorkAgreement

  association [0..1] to I_PersonWorkAgreement_1        as _ResponsibleEmployee_2
    on $projection.ResponsibleEmployee = _ResponsibleEmployee_2.PersonWorkAgreement

  association [0..1] to I_ServiceDocumentEnhcd         as _SolutionOrder
    on  $projection.BusinessSolutionOrder = _SolutionOrder.ServiceDocument
    and _SolutionOrder.ServiceObjectType  = 'BUS2000172'

  association [1] to    I_ServiceDocumentItemEnhcd     as _SolutionOrderItem
    on  _SolutionOrderItem.ServiceObjectType  = 'BUS2000172'
    and $projection.BusinessSolutionOrder     = _SolutionOrderItem.ServiceDocument
    and $projection.BusinessSolutionOrderItem = _SolutionOrderItem.ServiceDocumentItem

  association [0..1] to I_BillingDocumentBasic         as _CancelledBillingDocumentBasic
    on $projection.CancelledBillingDocument = _CancelledBillingDocumentBasic.BillingDocument

  // Extension Association

  association [1] to    E_BillingDocumentItem          as _Extension
    on  $projection.BillingDocument     = _Extension.BillingDocument
    and $projection.BillingDocumentItem = _Extension.BillingDocumentItem

{
      // Key

      // --[ GENERATED:012:GlBfhyJl7jY4t}SRJ6dMpW

      @Consumption.valueHelpDefinition: [ { entity: { name: 'I_BillingDocumentBasicStdVH', element: 'BillingDocument' } } ]
      // ]--GENERATED

      @ObjectModel.foreignKey.association: '_BillingDocumentBasic'
  key vbeln                                                                                                     as BillingDocument,

      @ObjectModel.text.element: [ 'BillingDocumentItemText' ]
  key posnr                                                                                                     as BillingDocumentItem,

      @ObjectModel.foreignKey.association: '_SalesDocumentItemCategory'
      pstyv                                                                                                     as SalesDocumentItemCategory,

      @ObjectModel.foreignKey.association: '_SalesDocumentItemType'
      posar                                                                                                     as SalesDocumentItemType,

      shkzg                                                                                                     as ReturnItemProcessingType,

      // Admin

      @Semantics.user.createdBy: true
      ernam                                                                                                     as CreatedByUser,

      @Semantics.systemDate.createdAt: true
      erdat                                                                                                     as CreationDate,

      @Semantics.systemTime.createdAt
      erzet                                                                                                     as CreationTime,

      @ObjectModel.foreignKey.association: '_ReferenceLogicalSystem'
      logsys                                                                                                    as ReferenceLogicalSystem,

      // Organization

      @ObjectModel.foreignKey.association: '_OrganizationDivision'
      spara                                                                                                     as OrganizationDivision,

      @ObjectModel.foreignKey.association: '_Division'
      spart                                                                                                     as Division,

      @ObjectModel.foreignKey.association: '_SalesOffice'
      vkbur                                                                                                     as SalesOffice,

      // Product

      @API.element: { releaseState: #DEPRECATED, successor: 'Product' }
      @Consumption.valueHelpDefinition: [ { entity: { name: 'I_MaterialStdVH', element: 'Material' } } ]
      @ObjectModel.foreignKey.association: '_Material'
      @ObjectModel.text.association: '_MaterialText'
      matnr                                                                                                     as Material,

      @Consumption.valueHelpDefinition: [ { entity: { name: 'I_ProductStdVH', element: 'Product' } } ]
      @ObjectModel.foreignKey.association: '_Product'
      @ObjectModel.text.association: '_ProductText'
      cast(matnr as productnumber preserving type)                                                              as Product,

      @Consumption.valueHelpDefinition: [ { entity: { name: 'I_MaterialStdVH', element: 'Material' } } ]
      @ObjectModel.foreignKey.association: '_OriginallyRequestedMaterial'
      @ObjectModel.text.association: '_OriginallyRequestedMatlText'
      matwa                                                                                                     as OriginallyRequestedMaterial,

      ean11                                                                                                     as InternationalArticleNumber,

      // --[ GENERATED:012:GlBfhyJl7jY4t}SRJ6dMpW

      @Consumption.valueHelpDefinition: [ { entity: { name: 'I_MaterialStdVH', element: 'Material' } } ]
      @ObjectModel.foreignKey.association: '_PricingReferenceMaterial'
      @ObjectModel.text.association: '_PricingReferenceMaterialText'
      pmatn                                                                                                     as PricingReferenceMaterial,

      @Consumption.valueHelpDefinition: [ { entity: { name: 'I_BatchStdVH', element: 'Batch' },
                                            additionalBinding: [ { localElement: 'Plant',    element: 'Plant'    },
                                                                 { localElement: 'Material', element: 'Material' } ] } ]
      @ObjectModel.foreignKey.association: '_Batch'
      charg                                                                                                     as Batch,

      @ObjectModel.foreignKey.association: '_ProductHierarchyNode'
      prodh                                                                                                     as ProductHierarchyNode,

      @API.element: { releaseState: #DEPRECATED, successor: 'ProductGroup' }
      @Consumption.valueHelpDefinition: [ { entity: { name: 'I_MaterialGroup', element: 'MaterialGroup' } } ]
      @ObjectModel.foreignKey.association: '_MaterialGroup'
      @ObjectModel.text.association: '_MaterialGroupText'
      matkl                                                                                                     as MaterialGroup,

      @ObjectModel.foreignKey.association: '_ProductGroup'
      cast(matkl as productgroup preserving type)                                                               as ProductGroup,

      @ObjectModel.foreignKey.association: '_AdditionalMaterialGroup1'
      mvgr1                                                                                                     as AdditionalMaterialGroup1,

      @ObjectModel.foreignKey.association: '_AdditionalMaterialGroup2'
      mvgr2                                                                                                     as AdditionalMaterialGroup2,

      @ObjectModel.foreignKey.association: '_AdditionalMaterialGroup3'
      mvgr3                                                                                                     as AdditionalMaterialGroup3,

      @ObjectModel.foreignKey.association: '_AdditionalMaterialGroup4'
      mvgr4                                                                                                     as AdditionalMaterialGroup4,

      @ObjectModel.foreignKey.association: '_AdditionalMaterialGroup5'
      mvgr5                                                                                                     as AdditionalMaterialGroup5,

      cuobj                                                                                                     as ProductConfiguration,

      @ObjectModel.foreignKey.association: '_MaterialCommissionGroup'
      provg                                                                                                     as MaterialCommissionGroup,

      @ObjectModel.foreignKey.association: '_Plant'
      werks                                                                                                     as Plant,

      @ObjectModel.foreignKey.association: '_StorageLocation'
      lgort                                                                                                     as StorageLocation,

      atpkz                                                                                                     as ReplacementPartType,
      wgru1                                                                                                     as MaterialGroupHierarchy1,
      wgru2                                                                                                     as MaterialGroupHierarchy2,

      @ObjectModel.foreignKey.association: '_PlantRegion'
      wkreg                                                                                                     as PlantRegion,

      wkcou                                                                                                     as PlantCounty,
      wkcty                                                                                                     as PlantCity,
      sernr                                                                                                     as BOMExplosion,
      prosa                                                                                                     as MaterialDeterminationType,


      // Billing

      @Semantics.text: true
      arktx                                                                                                     as BillingDocumentItemText,

      fbuda                                                                                                     as ServicesRenderedDate,

      @Semantics.quantity.unitOfMeasure: 'BillingQuantityUnit'
      fkimg                                                                                                     as BillingQuantity,

      @ObjectModel.foreignKey.association: '_BillingQuantityUnit'
      @Semantics.unitOfMeasure: true
      vrkme                                                                                                     as BillingQuantityUnit,

      @Semantics.quantity.unitOfMeasure: 'BaseUnit'
      fklmg                                                                                                     as BillingQuantityInBaseUnit,

      @ObjectModel.foreignKey.association: '_BaseUnit'
      @Semantics.unitOfMeasure: true
      meins                                                                                                     as BaseUnit,

      @Semantics.quantity.unitOfMeasure: 'BaseUnit'
      lmeng                                                                                                     as MRPRequiredQuantityInBaseUnit,

      umvkn                                                                                                     as BillingToBaseQuantityDnmntr,
      umvkz                                                                                                     as BillingToBaseQuantityNmrtr,

      @Semantics.quantity.unitOfMeasure: 'ItemWeightUnit'
      brgew                                                                                                     as ItemGrossWeight,

      @Semantics.quantity.unitOfMeasure: 'ItemWeightUnit'
      ntgew                                                                                                     as ItemNetWeight,

      @ObjectModel.foreignKey.association: '_ItemWeightUnit'
      @Semantics.unitOfMeasure: true
      gewei                                                                                                     as ItemWeightUnit,

      @Semantics.quantity.unitOfMeasure: 'ItemVolumeUnit'
      volum                                                                                                     as ItemVolume,

      @ObjectModel.foreignKey.association: '_ItemVolumeUnit'
      @Semantics.unitOfMeasure: true
      voleh                                                                                                     as ItemVolumeUnit,

      @ObjectModel.foreignKey.association: '_BillToPartyCountry'
      lland_auft                                                                                                as BillToPartyCountry,

      @ObjectModel.foreignKey.association: '_BillToPartyRegion'
      regio_auft                                                                                                as BillToPartyRegion,

      @ObjectModel.foreignKey.association: '_BillingPlanRule'
      fareg                                                                                                     as BillingPlanRule,

      fplnr                                                                                                     as BillingPlan,
      fpltr                                                                                                     as BillingPlanItem,

      // Status

      // foreign key association has to be defined (in next release (?)), target: I_DocBillingStatus

      fksaa                                                                                                     as DocumentBillingStatus,

      // Pricing


      @Semantics.amount.currencyCode: 'TransactionCurrency'
      netwr                                                                                                     as NetAmount,

      @ObjectModel.foreignKey.association: '_TransactionCurrency'
      @Semantics.currencyCode: true
      waerk                                                                                                     as TransactionCurrency,

      @Semantics.amount.currencyCode: 'TransactionCurrency'
      brtwr                                                                                                     as GrossAmount,

      prsdt                                                                                                     as PricingDate,
      cast(kursk as kursk_not_converted preserving type)                                                        as PriceDetnExchangeRate,

      @Semantics.quantity.unitOfMeasure: 'BaseUnit'
      smeng                                                                                                     as PricingScaleQuantityInBaseUnit,

      @Semantics.amount.currencyCode: 'TransactionCurrency'
      mwsbp                                                                                                     as TaxAmount,

      @Semantics.amount.currencyCode: 'TransactionCurrency'
      wavwr                                                                                                     as CostAmount,

      @Semantics.amount.currencyCode: 'TransactionCurrency'
      kzwi1                                                                                                     as Subtotal1Amount,

      @Semantics.amount.currencyCode: 'TransactionCurrency'
      kzwi2                                                                                                     as Subtotal2Amount,

      @Semantics.amount.currencyCode: 'TransactionCurrency'
      kzwi3                                                                                                     as Subtotal3Amount,

      @Semantics.amount.currencyCode: 'TransactionCurrency'
      kzwi4                                                                                                     as Subtotal4Amount,

      @Semantics.amount.currencyCode: 'TransactionCurrency'
      kzwi5                                                                                                     as Subtotal5Amount,

      @Semantics.amount.currencyCode: 'TransactionCurrency'
      kzwi6                                                                                                     as Subtotal6Amount,

      @ObjectModel.foreignKey.association: '_StatisticalValueControl'
      kowrr                                                                                                     as StatisticalValueControl,

      sktof                                                                                                     as CashDiscountIsDeductible,
      kdkg1                                                                                                     as CustomerConditionGroup1,
      kdkg2                                                                                                     as CustomerConditionGroup2,
      kdkg3                                                                                                     as CustomerConditionGroup3,
      kdkg4                                                                                                     as CustomerConditionGroup4,
      kdkg5                                                                                                     as CustomerConditionGroup5,
      mprok                                                                                                     as ManualPriceChangeType,

      @ObjectModel.foreignKey.association: '_MaterialPricingGroup'
      kondm                                                                                                     as MaterialPricingGroup,

      cast(stcur as stcur_ap_not_converted preserving type)                                                     as StatisticsExchangeRate,

      @Consumption.valueHelpDefinition: [ { entity: { name: 'I_MaterialStdVH', element: 'Material' } } ]
      @ObjectModel.foreignKey.association: '_MainItemPricingRefMaterial'
      @ObjectModel.text.association: '_MainItemPricingRefMatlText'
      upmat                                                                                                     as MainItemPricingRefMaterial,

      @ObjectModel.foreignKey.association: '_MainItemMaterialPricingGroup'
      ukonm                                                                                                     as MainItemMaterialPricingGroup,

      @ObjectModel.foreignKey.association: '_TimeSheetOvertimeCat'
      cats_overtime_category                                                                                    as TimeSheetOvertimeCategory,

      // Tax

      @ObjectModel.foreignKey.association: '_DepartureCountry'
      aland                                                                                                     as DepartureCountry,

      txjcd                                                                                                     as TaxJurisdiction,
      taxm1                                                                                                     as ProductTaxClassification1,
      taxm2                                                                                                     as ProductTaxClassification2,
      taxm3                                                                                                     as ProductTaxClassification3,
      taxm4                                                                                                     as ProductTaxClassification4,
      taxm5                                                                                                     as ProductTaxClassification5,
      taxm6                                                                                                     as ProductTaxClassification6,
      taxm7                                                                                                     as ProductTaxClassification7,
      taxm8                                                                                                     as ProductTaxClassification8,
      taxm9                                                                                                     as ProductTaxClassification9,
      j_1arfz                                                                                                   as ZeroVATRsn,
      mwsk1                                                                                                     as TaxCode,
      txdat_from                                                                                                as TaxRateValidityStartDate,

      // Payment


      @Semantics.amount.currencyCode: 'TransactionCurrency'
      skfbp                                                                                                     as EligibleAmountForCashDiscount,

      // Accounting

      @Consumption.valueHelpDefinition: [ { entity: { name: 'I_BusinessAreaStdVH', element: 'BusinessArea' } } ]
      @ObjectModel.foreignKey.association: '_BusinessArea'
      @ObjectModel.text.association: '_BusinessAreaText'
      gsber                                                                                                     as BusinessArea,

      @ObjectModel.foreignKey.association: '_ProfitCenter'
      prctr                                                                                                     as ProfitCenter,

      @API.element: { releaseState: #DEPRECATED, successor: 'WBSElementInternalID_2' }
      @Consumption.valueHelpDefinition: [ { entity: { name: 'I_WBSElementStdVH', element: 'WBSElementInternalID' } } ]
      @ObjectModel.foreignKey.association: '_WBSElement'
      @ObjectModel.text.association: '_WBSElement'
      ps_psp_pnr                                                                                                as WBSElementInternalID,

      @ObjectModel.foreignKey.association: '_WBSElementBasicData'
      cast(ps_psp_pnr as ps_s4_pspnr preserving type)                                                           as WBSElementInternalID_2,

      @Consumption.valueHelpDefinition: [ { entity: { name: 'I_ControllingAreaStdVH', element: 'ControllingArea' } } ]
      @ObjectModel.foreignKey.association: '_ControllingArea'
      kokrs                                                                                                     as ControllingArea,

      @API.element: { releaseState: #DECOMMISSIONED, successor: 'ProfitabilitySegment_2' }
      cast(case when paobjnr > '9999999999' then '9999999999' else lpad(paobjnr, 10, '0') end as rkeobjnr_numc) as ProfitabilitySegment,

      cast(paobjnr as rkeobjnr_char)                                                                            as ProfitabilitySegment_2,

      aufnr                                                                                                     as OrderID,

      @ObjectModel.foreignKey.association: '_CostCenter_2'
      kostl                                                                                                     as CostCenter,

      vbelv                                                                                                     as OriginSDDocument,
      posnv                                                                                                     as OriginSDDocumentItem,
      kursk_dat                                                                                                 as PriceDetnExchangeRateDate,

      @ObjectModel.foreignKey.association: '_MatlAccountAssignmentGroup'
      ktgrm                                                                                                     as MatlAccountAssignmentGroup,

      // Reference

      vgbel                                                                                                     as ReferenceSDDocument,
      vgpos                                                                                                     as ReferenceSDDocumentItem,

      @ObjectModel.foreignKey.association: '_ReferenceSDDocumentCategory'
      vgtyp                                                                                                     as ReferenceSDDocumentCategory,

      @Consumption.valueHelpDefinition: [ { entity: { name: 'I_SalesDocumentStdVH', element: 'SalesDocument' } } ]
      @ObjectModel.foreignKey.association: '_SalesDocument'
      aubel                                                                                                     as SalesDocument,

      @Consumption.valueHelpDefinition: [ { entity: { name: 'I_SalesDocumentItemStdVH', element: 'SalesDocumentItem' },
                                            additionalBinding: [ { localElement: 'SalesDocument',
                                                                   element: 'SalesDocument' } ] } ]
      @ObjectModel.foreignKey.association: '_SalesDocumentItem'
      aupos                                                                                                     as SalesDocumentItem,

      @ObjectModel.foreignKey.association: '_SalesSDDocumentCategory'
      autyp                                                                                                     as SalesSDDocumentCategory,

      @Consumption.valueHelpDefinition: [ { entity: { name: 'I_BillgDocItmBscStdVH', element: 'BillingDocumentItem' },
                                            additionalBinding: [ { localElement: 'BillingDocument',
                                                                   element: 'BillingDocument' } ] } ]
      @ObjectModel.foreignKey.association: '_HigherLevelItemBasic'
      uepos                                                                                                     as HigherLevelItem,

      pospa                                                                                                     as BillingDocumentItemInPartSgmt,
      cast(vgbel_ex as ext_reference_document preserving type)                                                  as ExternalReferenceDocument,

      @API.element: { releaseState: #DEPRECATED, successor: 'BillingDocExtReferenceDocItem' }
      cast(vgpos_ex as ext_reference_document_item preserving type)                                             as ExternalReferenceDocumentItem,

      cast(vgpos_ex as billingdocextreferencedocitem preserving type)                                           as BillingDocExtReferenceDocItem,

      @ObjectModel.foreignKey.association: '_PrelimBillingDocument'
      pbd_id                                                                                                    as PrelimBillingDocument,

      @ObjectModel.foreignKey.association: '_PrelimBillingDocumentItem'
      pbd_item_id                                                                                               as PrelimBillingDocumentItem,

      // Sales

      @ObjectModel.foreignKey.association: '_SalesGroup'
      vkgrp                                                                                                     as SalesGroup,

      @ObjectModel.foreignKey.association: '_AdditionalCustomerGroup1'
      kvgr1                                                                                                     as AdditionalCustomerGroup1,

      @ObjectModel.foreignKey.association: '_AdditionalCustomerGroup2'
      kvgr2                                                                                                     as AdditionalCustomerGroup2,

      @ObjectModel.foreignKey.association: '_AdditionalCustomerGroup3'
      kvgr3                                                                                                     as AdditionalCustomerGroup3,

      @ObjectModel.foreignKey.association: '_AdditionalCustomerGroup4'
      kvgr4                                                                                                     as AdditionalCustomerGroup4,

      @ObjectModel.foreignKey.association: '_AdditionalCustomerGroup5'
      kvgr5                                                                                                     as AdditionalCustomerGroup5,

      @ObjectModel.foreignKey.association: '_SDDocumentReason'
      augru_auft                                                                                                as SDDocumentReason,

      @Consumption.valueHelpDefinition: [ { entity: { name: 'I_RetailPromotionStdVH', element: 'RetailPromotion' } } ]
      @ObjectModel.foreignKey.association: '_RetailPromotion'
      aktnr                                                                                                     as RetailPromotion,

      @Semantics.amount.currencyCode: 'TransactionCurrency'
      bonba                                                                                                     as RebateBasisAmount,

      bonus                                                                                                     as VolumeRebateGroup,
      cmpnt                                                                                                     as ItemIsRelevantForCredit,

      @Semantics.amount.currencyCode: 'TransactionCurrency'
      cmpre                                                                                                     as CreditRelatedPrice,

      @Consumption.valueHelpDefinition: [ { entity: { name: 'I_SalesDealStdVH', element: 'SalesDeal' } } ]
      @ObjectModel.foreignKey.association: '_SalesDeal'
      knuma_ag                                                                                                  as SalesDeal,

      knuma_pi                                                                                                  as SalesPromotion,

      @ObjectModel.foreignKey.association: '_SalesOrderSalesDistrict'
      bzirk_auft                                                                                                as SalesOrderSalesDistrict,

      @ObjectModel.foreignKey.association: '_SalesOrderCustomerGroup'
      kdgrp_auft                                                                                                as SalesOrderCustomerGroup,

      @ObjectModel.foreignKey.association: '_SalesOrderCustomerPriceGroup'
      konda_auft                                                                                                as SalesOrderCustomerPriceGroup,

      @ObjectModel.foreignKey.association: '_SalesOrderPriceListType'
      pltyp_auft                                                                                                as SalesOrderPriceListType,

      @ObjectModel.foreignKey.association: '_SalesOrderSalesOrganization'
      vkorg_auft                                                                                                as SalesOrderSalesOrganization,

      @ObjectModel.foreignKey.association: '_SalesOrderDistributionChannel'
      vtweg_auft                                                                                                as SalesOrderDistributionChannel,

      auref                                                                                                     as SalesDocIsCreatedFromReference,

      // Shipping

      @Consumption.valueHelpDefinition: [ { entity: { name: 'I_ShippingPointStdVH', element: 'ShippingPoint' } } ]
      @ObjectModel.foreignKey.association: '_ShippingPoint'
      @ObjectModel.text.association: '_ShippingPointText'
      vstel                                                                                                     as ShippingPoint,

      // CRM

      @ObjectModel.foreignKey.association: '_ServiceDocumentType'
      service_doc_type                                                                                          as ServiceDocumentType,

      service_doc_id                                                                                            as ServiceDocument,
      service_doc_item_id                                                                                       as ServiceDocumentItem,

      @Analytics.internalName: #LOCAL
      @ObjectModel.foreignKey.association: '_SolutionOrder'
      solution_order_id                                                                                         as BusinessSolutionOrder,

      @Analytics.internalName: #LOCAL
      @ObjectModel.foreignKey.association: '_SolutionOrderItem'
      solution_order_item_id                                                                                    as BusinessSolutionOrderItem,

      // Other fields

      uepvw                                                                                                     as HigherLevelItemUsage,

      // Added Analytics fields

      @ObjectModel.foreignKey.association: '_SDDocumentCategory'
      vbtyp_ana                                                                                                 as SDDocumentCategory,

      @ObjectModel.foreignKey.association: '_BillingDocumentType'
      fkart_ana                                                                                                 as BillingDocumentType,

      @ObjectModel.foreignKey.association: '_SalesOrganization'
      vkorg_ana                                                                                                 as SalesOrganization,

      @ObjectModel.foreignKey.association: '_DistributionChannel'
      vtweg_ana                                                                                                 as DistributionChannel,

      @ObjectModel.foreignKey.association: '_CustomerPriceGroup'
      konda_ana                                                                                                 as CustomerPriceGroup,

      @ObjectModel.foreignKey.association: '_CustomerGroup'
      kdgrp_ana                                                                                                 as CustomerGroup,

      @ObjectModel.foreignKey.association: '_Country'
      land1_ana                                                                                                 as Country,

      @ObjectModel.foreignKey.association: '_Region'
      regio_ana                                                                                                 as Region,

      @ObjectModel.foreignKey.association: '_CityCode'
      cityc_ana                                                                                                 as CityCode,

      @ObjectModel.foreignKey.association: '_SalesDistrict'
      bzirk_ana                                                                                                 as SalesDistrict,

      @ObjectModel.foreignKey.association: '_OverallSDProcessStatus'
      gbstk_ana                                                                                                 as OverallSDProcessStatus,

      @ObjectModel.foreignKey.association: '_OverallBillingStatus'
      vf_status_ana                                                                                             as OverallBillingStatus,

      // sales

      @Consumption.valueHelpDefinition: [ { entity: { name: 'I_Customer_VH', element: 'Customer' } } ]
      @ObjectModel.foreignKey.association: '_SoldToParty'
      kunag_ana                                                                                                 as SoldToParty,

      // payment

      @Consumption.valueHelpDefinition: [ { entity: { name: 'I_Customer_VH', element: 'Customer' } } ]
      @ObjectModel.foreignKey.association: '_PayerParty'
      kunrg_ana                                                                                                 as PayerParty,

      fkdat_ana                                                                                                 as BillingDocumentDate,

      @ObjectModel.foreignKey.association: '_CompanyCode'
      bukrs_ana                                                                                                 as CompanyCode,

      @ObjectModel.foreignKey.association: '_County_2'
      counc_ana                                                                                                 as County,

      knuma_ana                                                                                                 as CustomerRebateAgreement,
      fktyp_ana                                                                                                 as BillingDocumentCategory,
      knumv_ana                                                                                                 as PricingDocument,

      @ObjectModel.foreignKey.association: '_CancelledBillingDocumentBasic'
      sfakn_ana                                                                                                 as CancelledBillingDocument,

      draft                                                                                                     as BillingDocumentIsTemporary,

      // ship-to

      @Consumption.valueHelpDefinition: [ { entity: { name: 'I_Customer_VH', element: 'Customer' } } ]
      @ObjectModel.foreignKey.association: '_ShipToParty'
      kunwe_ana                                                                                                 as ShipToParty,

      // bill-to

      @Consumption.valueHelpDefinition: [ { entity: { name: 'I_Customer_VH', element: 'Customer' } } ]
      @ObjectModel.foreignKey.association: '_BillToParty'
      kunre_ana                                                                                                 as BillToParty,

      @ObjectModel.foreignKey.association: '_SalesEmployee_2'
      perve_ana                                                                                                 as SalesEmployee,

      @ObjectModel.foreignKey.association: '_ResponsibleEmployee_2'
      perzm_ana                                                                                                 as ResponsibleEmployee,

      // association

      @ObjectModel.association.type: [ #TO_COMPOSITION_PARENT, #TO_COMPOSITION_ROOT ]
      _BillingDocumentBasic,

      @ObjectModel.association.type: [ #TO_COMPOSITION_CHILD ]
      _PartnerBasic,

      @ObjectModel.association.type: [ #TO_COMPOSITION_CHILD ]
      _PricingElementBasic,

      _SalesDocumentItemCategory,
      _SalesDocumentItemType,
      _CreatedByUser,
      _ReferenceLogicalSystem,
      _OrganizationDivision,
      _Division,
      _SalesOffice,

      @API.element: { releaseState: #DEPRECATED, successor: '_Product' }
      _Material,

      _Product,
      _OriginallyRequestedMaterial,
      _PricingReferenceMaterial,
      _Batch,
      _ProductHierarchyNode,

      @API.element: { releaseState: #DEPRECATED, successor: '_ProductGroup' }
      _MaterialGroup,

      _ProductGroup,
      _AdditionalMaterialGroup1,
      _AdditionalMaterialGroup2,
      _AdditionalMaterialGroup3,
      _AdditionalMaterialGroup4,
      _AdditionalMaterialGroup5,
      _MaterialCommissionGroup,
      _Plant,
      _StorageLocation,
      _PlantRegion,
      _BillingQuantityUnit,
      _BaseUnit,
      _ItemWeightUnit,
      _ItemVolumeUnit,
      _BillToPartyCountry,
      _BillToPartyRegion,
      _BillingPlanRule,
      _TransactionCurrency,
      _StatisticalValueControl,
      _MaterialPricingGroup,
      _MainItemPricingRefMaterial,
      _MainItemMaterialPricingGroup,
      _TimeSheetOvertimeCat,
      _DepartureCountry,
      _BusinessArea,
      _ProfitCenter,

      @API.element: { releaseState: #DEPRECATED, successor: '_WBSElementBasicData' }
      _WBSElement,

      _WBSElementBasicData,
      _ControllingArea,
      _MatlAccountAssignmentGroup,

      @API.element: { releaseState: #DEPRECATED, successor: '_CostCenter_2' }
      _CostCenter,

      _CostCenter_2,
      _ReferenceSalesDocumentItem,
      _ReferenceDeliveryDocumentItem,
      _ReferenceBillingDocItemBasic,
      _ReferenceSDDocumentCategory,
      _SalesDocument,
      _SalesDocumentItem,
      _SalesSDDocumentCategory,
      _HigherLevelItemBasic,
      _PrelimBillingDocument,
      _PrelimBillingDocumentItem,
      _SalesGroup,
      _AdditionalCustomerGroup1,
      _AdditionalCustomerGroup2,
      _AdditionalCustomerGroup3,
      _AdditionalCustomerGroup4,
      _AdditionalCustomerGroup5,
      _SDDocumentReason,
      _RetailPromotion,
      _SalesDeal,
      _SalesOrderSalesDistrict,
      _SalesOrderCustomerGroup,
      _SalesOrderCustomerPriceGroup,
      _SalesOrderPriceListType,
      _SalesOrderSalesOrganization,
      _SalesOrderDistributionChannel,
      _ShippingPoint,
      _ServiceDocumentType,
      // Analytics

      _SDDocumentCategory,
      _BillingDocumentCategory,
      _BillingDocumentType,
      _SalesOrganization,
      _DistributionChannel,
      _CustomerPriceGroup,
      _CustomerGroup,
      _Country,
      _Region,
      _CityCode,
      _SalesDistrict,
      _OverallSDProcessStatus,
      _OverallBillingStatus,
      _SoldToParty,
      _PayerParty,
      _CompanyCode,

      @API.element: { releaseState: #DEPRECATED, successor: '_County_2' }
      _County,

      _County_2,
      _ShipToParty,
      _BillToParty,

      @API.element: { releaseState: #DEPRECATED, successor: '_SalesEmployee_2' }
      _SalesEmployee,

      _SalesEmployee_2,

      @API.element: { releaseState: #DEPRECATED, successor: '_ResponsibleEmployee_2' }
      _ResponsibleEmployee,

      _ResponsibleEmployee_2,
      _SolutionOrder,
      _SolutionOrderItem,
      _CancelledBillingDocumentBasic,

      @Consumption.hidden: true
      _MaterialGroupText,

      @Consumption.hidden: true
      _ShippingPointText,

      @Consumption.hidden: true
      _BusinessAreaText,

      @API.element: { releaseState: #DEPRECATED, successor: '_ProductText' }
      @Consumption.hidden: true
      _MaterialText,

      @Consumption.hidden: true
      _ProductText,

      @Consumption.hidden: true
      _PricingReferenceMaterialText,

      @Consumption.hidden: true
      _MainItemPricingRefMatlText,

      @Consumption.hidden: true
      _OriginallyRequestedMatlText
}