I_BILLINGDOCUMENTITEM

CDS View

Billing Document Item

I_BILLINGDOCUMENTITEM is a CDS View in S/4HANA. Billing Document Item. It contains 173 fields. 66 CDS views read from this table.

CDS Views using this table (66)

ViewTypeJoinVDMDescription
A_BillingDocumentItem view from COMPOSITE Billing Document Item
C_BillgDocItemRedacted view from CONSUMPTION
C_BillingDocumentItem_F0797 view from CONSUMPTION Billing Document Item
C_BillingDocumentItemFs view from CONSUMPTION Billing Document Item Fact Sheet
C_BSOrdItmProcFlwCrdtMemo view from CONSUMPTION Credit Memo Item Attrib for BSOrd Prgrs
C_BSOrdItmProcFlwCrdtMemoCancl view from CONSUMPTION CrdtMemoItmCancln Attrib for BSOrd Prgrs
C_BSOrdItmProcFlwCustInvc view from CONSUMPTION CustInvc Item Attrib for BSOrd Prgrs
C_BSOrdItmProcFlwDebitMemo view from CONSUMPTION Debit Memo Item Attrib for BSOrd Prgrs
C_BSOrdItmProcFlwInvcCancln view from CONSUMPTION Invc Cancln Item Attrib for BSOrd Prgrs
C_CustomerProjectInvoices view inner CONSUMPTION Customer Project Invoices
C_CustRetSubsqntCrdtMemo view_entity from CONSUMPTION Returns Order Subsequent Credit Memo
C_EG_StRpBillingItem view inner CONSUMPTION Egypt ACR Specific Billing Item details of tax items
C_RelatedBillingDocumentItem view from CONSUMPTION
C_RetsRefDocItemAttribute view_entity union_all CONSUMPTION Returns Document Item Attribute Search
C_ReturnRefDocItem_F1708 view union CONSUMPTION Return Reference Document Item
C_ReturnsReferenceDocumentItem view union_all CONSUMPTION Return Reference Document Item
C_ReturnsReferenceInvoiceItem view_entity from CONSUMPTION Customer Return Reference Invoice Item
C_SalesDocumentBillingStatus view from CONSUMPTION Billing Status of a Sales Document
C_SalesOrderAgedDebtDetails view inner CONSUMPTION Aged Debt Details for a Sales Order
C_SlsDocFlfmtBillgDocItem view from CONSUMPTION Sales Doc Fulfillment: Billing Doc Item
C_SlsDocReltdBillgDocItm view from CONSUMPTION
C_SlsDocReltdBillgDocItm view union_all CONSUMPTION
FAC_AUDIT_Z3_BILLHDRITEM view union_all Billing Document Header & Item
I_BillingDocItmReturnableQty view from COMPOSITE Returnable Quantity of Billing
I_BillingDocumentItemStdVH view from COMPOSITE Billing Document Item
I_CFinBillingDocumentItem view union_all COMPOSITE Central Finance Billing Document: Item
I_DigitalVehBillingDocItem_2 view_entity from COMPOSITE Digital vehicle billing document
I_DigitalVehicleBillingDocItem view_entity from COMPOSITE Billing Document
I_MPBillingSummary view inner COMPOSITE Master Project Billing and Receivable Summary
I_PT_BillgDocMatlVers view inner COMPOSITE PT BillingDoc Material Version
I_SAFTBillingItem view from COMPOSITE SAF-T Billing Item
I_SAFTBillingItemMax view from COMPOSITE SAF-T PT Billing Item Max
I_SAFTBillingProduct view from COMPOSITE SAF-T Billing Product
I_SAFTBillingTax view from COMPOSITE SAF-T Billing Tax
I_SDDocItmReturnedQuantity view inner COMPOSITE Return Quantity Union
I_SDDocumentProcessItemsFlowVH view inner COMPOSITE Billing Docs Items with Delivery Items
P_AR_BillingDocumentZeroVATRsn view from CONSUMPTION Billing Document for Argentina Export
P_BillingDocProcFlowCP0 view inner CONSUMPTION
P_BillingDocProcFlowCP1 view inner CONSUMPTION
P_BillingDocProcFlowM1 view inner CONSUMPTION
P_BillingDocProcFlowPM1 view inner CONSUMPTION
P_BillingDocProcFlowPM2 view inner CONSUMPTION
P_BillingDocumentsForProjects view from COMPOSITE
P_BUSSOLNORDSUBSCRPNFLWVL3 view inner CONSUMPTION Solution Order Subscription Flow: Level3
P_CanclnBillingDocProcFlowM2 view inner CONSUMPTION
P_CanclnBillingDocProcFlowPM2 view inner CONSUMPTION
P_CanclnBillingDocProcFlowPM3 view inner CONSUMPTION
P_CN_GoldenTaxBillingDocItem view from COMPOSITE
P_EG_StRpBillingItem view inner COMPOSITE
P_EntProjBillgDocwithWBSElmnt view_entity inner COMPOSITE Billing Documnet with WBS Element
P_Hu_SDInvoiceCorrection view from COMPOSITE
P_JP_TaxReallocationBillingItm view from COMPOSITE
P_LstMiBillDocumentToDelivery view from COMPOSITE
P_MY_BillingDocumentItem view inner COMPOSITE
P_PL_SAFTBillingDocument view inner COMPOSITE
P_PL_SAFTDwnPayInvoice view inner BASIC
P_PL_SAFTSalesInvItem view inner COMPOSITE
P_PL_SAFTTaxBillingDocItem view from COMPOSITE
P_PT_SAFTSALESINVPLANT view inner COMPOSITE
P_SAFTExcludeBillingPlan view from COMPOSITE
P_SalesDocumentItemFulfillmnt5 view from COMPOSITE
P_SDDocumentTotalItems view union_all CONSUMPTION
P_SG_StRpTaxItemFromBilling view from COMPOSITE
P_SlsDocFlfmtProcHierarchyD23 view from CONSUMPTION
P_StRpBillingDocumentItem view inner COMPOSITE
R_BillingDocumentItemTP view_entity from TRANSACTIONAL Billing Document Item - TP

Fields (173)

KeyField CDS FieldsUsed in Views
KEY BillingDocument BillingDocument,SubsequentDocument 25
KEY BillingDocumentItem BillingDocumentItem,ReferenceDocumentItem,ReferenceSDDocumentItem,ReturnsReferenceDocumentItem,SubsequentDocumentItem 26
KEY Material Material 9
KEY PrelimBillingDocument LevelCM1Document,LevelM1Document,LevelM2Document 3
KEY PrelimBillingDocumentItem LevelCM1DocumentItem,LevelM1DocumentItem,LevelM2DocumentItem 3
KEY ReferenceSDDocument DebitMemoRequest,LevelM2Document,LevelM2DocumentItem,LevelM3Document,LevelM3DocumentItem,ReferenceSDDocument 6
KEY ReferenceSDDocumentCategory DebitMemoRequestItemCategory,LevelM2DocumentCategory,LevelM3DocumentCategory,ReferenceSDDocumentCategory 6
KEY SalesDocument SalesDocument,SalesOrder 10
KEY SalesDocumentItem SalesDocumentItem,SalesOrderItem 7
_AdditionalCustomerGroup1 _AdditionalCustomerGroup1 1
_AdditionalCustomerGroup2 _AdditionalCustomerGroup2 1
_AdditionalCustomerGroup3 _AdditionalCustomerGroup3 1
_AdditionalCustomerGroup4 _AdditionalCustomerGroup4 1
_AdditionalCustomerGroup5 _AdditionalCustomerGroup5 1
_AdditionalMaterialGroup1 _AdditionalMaterialGroup1 1
_AdditionalMaterialGroup2 _AdditionalMaterialGroup2 1
_AdditionalMaterialGroup3 _AdditionalMaterialGroup3 1
_AdditionalMaterialGroup4 _AdditionalMaterialGroup4 1
_AdditionalMaterialGroup5 _AdditionalMaterialGroup5 1
_BillingPlanRule _BillingPlanRule 1
_BillingQuantityUnit _BillingQuantityUnit 3
_BillToPartyCountry _BillToPartyCountry 1
_BillToPartyRegion _BillToPartyRegion 1
_ControllingArea _ControllingArea 1
_CostCenter _CostCenter 1
_CostCenter_2 _CostCenter_2 1
_DepartureCountry _DepartureCountry 2
_Division _Division 1
_HigherLevelItem _HigherLevelItem 2
_Material _Material 3
_MaterialCommissionGroup _MaterialCommissionGroup 1
_MaterialPricingGroup _MaterialPricingGroup 1
_MatlAccountAssignmentGroup _MatlAccountAssignmentGroup 1
_OrganizationDivision _OrganizationDivision 1
_OriginallyRequestedMaterial _OriginallyRequestedMaterial 1
_Plant _Plant 1
_PlantRegion _PlantRegion 1
_PricingReferenceMaterial _PricingReferenceMaterial 1
_ProductHierarchyNode _ProductHierarchyNode 1
_ProfitCenter _ProfitCenter 1
_ProviderContract _ProviderContract 1
_ProviderContractItem _ProviderContractItem 1
_ReferenceSDDocumentCategory _ReferenceSDDocumentCategory 1
_RetailPromotion _RetailPromotion 1
_SalesDeal _SalesDeal 1
_SalesDocumentItemCategory _SalesDocumentItemCategory 2
_SalesGroup _SalesGroup 1
_SalesOffice _SalesOffice 1
_SalesOrderCustomerGroup _SalesOrderCustomerGroup 1
_SalesOrderCustomerPriceGroup _SalesOrderCustomerPriceGroup 1
_SalesOrderDistributionChannel _SalesOrderDistributionChannel 1
_SalesOrderPriceListType _SalesOrderPriceListType 1
_SalesOrderSalesDistrict _SalesOrderSalesDistrict 1
_SalesOrderSalesOrganization _SalesOrderSalesOrganization 1
_SalesSDDocumentCategory _SalesSDDocumentCategory 1
_SDDocumentReason _SDDocumentReason 1
_ServiceDocumentType _ServiceDocumentType 2
_StatisticalValueControl _StatisticalValueControl 2
_StorageLocation _StorageLocation 1
_TransactionCurrency _TransactionCurrency 2
_TransitPlant _TransitPlant 1
AdditionalCustomerGroup1 AdditionalCustomerGroup1 1
AdditionalCustomerGroup2 AdditionalCustomerGroup2 1
AdditionalCustomerGroup3 AdditionalCustomerGroup3 1
AdditionalCustomerGroup4 AdditionalCustomerGroup4 1
AdditionalCustomerGroup5 AdditionalCustomerGroup5 1
AdditionalMaterialGroup1 AdditionalMaterialGroup1 1
AdditionalMaterialGroup2 AdditionalMaterialGroup2 1
AdditionalMaterialGroup3 AdditionalMaterialGroup3 1
AdditionalMaterialGroup4 AdditionalMaterialGroup4 1
AdditionalMaterialGroup5 AdditionalMaterialGroup5 1
BaseUnit BaseUnit 3
Batch Batch 3
BillingDocumentItemText BillingDocumentItemText 10
BillingDocumentType BillingDocumentType 1
BillingPerformancePeriodEndDte BillingPerformancePeriodEndDte 1
BillingPerformancePeriodStrDte BillingPerformancePeriodStrDte 1
BillingPlan BillingPlan 1
BillingPlanRule BillingPlanRule 2
BillingQuantity BillingQuantity,Quantity 16
BillingQuantityInBaseUnit BillingQuantityInBaseUnit,RequestedQuantityInBaseUnit 3
BillingQuantityUnit BillingQuantityUnit,ReturnQuantityUnit,UnitOfMeasure 16
BillingToBaseQuantityDnmntr BillingToBaseQuantityDnmntr 1
BillingToBaseQuantityNmrtr BillingToBaseQuantityNmrtr 1
BillToPartyCountry BillToPartyCountry 1
BillToPartyRegion BillToPartyRegion 1
BusinessArea BusinessArea 1
BusinessSolutionOrder BusinessSolutionOrder 1
BusinessSolutionOrderItem BusinessSolutionOrderItem 1
ControllingArea ControllingArea 2
CostCenter CostCenter 2
CreatedByUser CreatedByUser 1
CreationDate CreationDate,InvoiceDate 4
DepartureCountry DepartureCountry 2
DistributionChannel DistributionChannel 1
Division Division 1
EligibleAmountForCashDiscount EligibleAmountForCashDiscount 1
GrossAmount GrossAmount,ItemGrossAmountOfBillingDoc 8
HigherLevelItem HigherLevelItem 4
InternationalArticleNumber InternationalArticleNumber 1
ItemGrossWeight ItemGrossWeight 1
ItemNetWeight ItemNetWeight 1
ItemVolume ItemVolume 1
ItemVolumeUnit ItemVolumeUnit 1
ItemWeightUnit ItemWeightUnit 1
ManualPriceChangeType ManualPriceChangeType 1
MaterialCommissionGroup MaterialCommissionGroup 1
MaterialGroup MaterialGroup 1
MaterialPricingGroup MaterialPricingGroup 1
MatlAccountAssignmentGroup MatlAccountAssignmentGroup 1
NetAmount ItemNetAmount,ItemNetAmountOfBillingDoc,NetAmount 18
OrderID OrderID 1
OrganizationDivision OrganizationDivision 2
OriginallyRequestedMaterial OriginallyRequestedMaterial 1
Plant Plant 1
PlantCity PlantCity 1
PlantCounty PlantCounty 1
PlantRegion PlantRegion 1
PriceDetnExchangeRate ExchangeRate 1
PriceDetnExchangeRateDate ExchangeRateDate 1
PricingDate ExchangeRateDate,PricingDate 3
PricingReferenceMaterial PricingReferenceMaterial 1
Product Material,Product 4
ProductConfiguration ProductConfiguration 1
ProductHierarchyNode ProductHierarchyNode 1
ProductTaxClassification1 ProductTaxClassification1 2
ProductTaxClassification2 ProductTaxClassification2 2
ProductTaxClassification3 ProductTaxClassification3 2
ProductTaxClassification4 ProductTaxClassification4 2
ProductTaxClassification5 ProductTaxClassification5 2
ProductTaxClassification6 ProductTaxClassification6 2
ProductTaxClassification7 ProductTaxClassification7 2
ProductTaxClassification8 ProductTaxClassification8 2
ProductTaxClassification9 ProductTaxClassification9 2
ProfitCenter ProfitCenter 1
ProviderContract ProviderContract 1
ProviderContractItem ProviderContractItem 1
ReferenceSDDocumentItem DebitMemoRequestItem,ReferenceSDDocumentItem 4
RetailPromotion RetailPromotion 1
ReturnItemProcessingType ReturnItemProcessingType 1
SalesDeal SalesDeal 1
SalesDocumentItemCategory SalesDocumentItemCategory 2
SalesDocumentItemType SalesDocumentItemType 1
SalesGroup SalesGroup 1
SalesOffice SalesOffice 1
SalesOrderCustomerGroup SalesOrderCustomerGroup 1
SalesOrderCustomerPriceGroup SalesOrderCustomerPriceGroup 1
SalesOrderDistributionChannel SalesOrderDistributionChannel 1
SalesOrderPriceListType SalesOrderPriceListType 1
SalesOrderSalesDistrict SalesOrderSalesDistrict 1
SalesOrderSalesOrganization SalesOrderSalesOrganization 1
SalesOrganization SalesOrganization 3
SalesPromotion SalesPromotion 1
SalesSDDocumentCategory SalesSDDocumentCategory 2
SDDocumentCategory SDDocumentCategory 2
SDDocumentReason SDDocumentReason 2
ServiceDocument ServiceDocument 1
ServiceDocumentItem ServiceDocumentItem 1
ServiceDocumentType ServiceDocumentType 1
ServicesRenderedDate ServicesRenderedDate 2
ShippingPoint ShippingPoint 2
StatisticalValueControl StatisticalValueControl 2
StorageLocation StorageLocation 1
Subtotal1Amount Subtotal1Amount 2
TaxAmount BillDocItemTaxAmt,TaxAmount,TaxAmountinTransCrcy 9
TaxAmountinTransCrcy TaxAmountinTransCrcy 1
TaxCode TaxCode 3
TaxJurisdiction TaxJurisdiction 2
TaxRateValidityStartDate TaxRateValidityStartDate 1
TransactionCurrency Currency,TransactionCurrency 17
TransitPlant TransitPlant 1
VolumeRebateGroup VolumeRebateGroup 1
ZeroVATRsn ZeroVATRsn 2
@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel.usageType.dataClass: #TRANSACTIONAL
@ObjectModel.usageType.serviceQuality: #A
@ObjectModel.usageType.sizeCategory: #XL
@ObjectModel.representativeKey: 'BillingDocumentItem'
@ObjectModel.modelingPattern:         #ANALYTICAL_DIMENSION
@ObjectModel.supportedCapabilities: [ #ANALYTICAL_DIMENSION,
                                      #CDS_MODELING_DATA_SOURCE,
                                      #CDS_MODELING_ASSOCIATION_TARGET,
                                      #SQL_DATA_SOURCE,
                                      #EXTRACTION_DATA_SOURCE ]
@EndUserText.label: 'Billing Document Item'
@Analytics.dataCategory: #DIMENSION
@Analytics: {
    dataExtraction: {
        enabled: true,
        delta.changeDataCapture: {
            mapping:[
                {
                    table: 'vbrp', role: #MAIN,
                    viewElement: ['BillingDocument', 'BillingDocumentItem'],
                    tableElement: ['vbeln', 'posnr']
                }

            ]
        }
    }
 }
@VDM.viewType: #BASIC
@AccessControl: {
  authorizationCheck: #CHECK,
  personalData.blocking: #('TRANSACTIONAL_DATA')
  //privilegedAssociations: [ '_CreatedByUser' ]

}
@AbapCatalog: {
  sqlViewName: 'ISDBILLGDOCITEM',
  compiler.compareFilter: true,
  preserveKey: true
}

//--[ GENERATED:012:GlBfhyJl7kY4uNsXH4jYtm

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


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

define view I_BillingDocumentItem
  as select from I_BillingDocumentItemBasic

  association [1..1] to I_BillingDocument              as _BillingDocument on  $projection.BillingDocument = _BillingDocument.BillingDocument
  association [0..*] to I_BillingDocItemPartner        as _Partner         on  $projection.BillingDocument     = _Partner.BillingDocument
                                                                           and $projection.BillingDocumentItem = _Partner.BillingDocumentItem
  association [0..*] to I_BillingDocumentItemPrcgElmnt as _PricingElement  on  $projection.BillingDocument     = _PricingElement.BillingDocument
                                                                           and $projection.BillingDocumentItem = _PricingElement.BillingDocumentItem
  association [0..1] to I_BillingDocumentItem          as _HigherLevelItem on  $projection.BillingDocument = _HigherLevelItem.BillingDocument
                                                                           and $projection.HigherLevelItem = _HigherLevelItem.BillingDocumentItem
  association [0..1] to I_BillingDocumentItem          as _HigherLvlItmOfBatSpltItm on  $projection.BillingDocument = _HigherLvlItmOfBatSpltItm.BillingDocument
                                                                           and $projection.HigherLvlItmOfBatSpltItm = _HigherLvlItmOfBatSpltItm.BillingDocumentItem
  association [0..1] to I_BillingDocument              as _CancelledBillingDocument on  $projection.CancelledBillingDocument = _CancelledBillingDocument.BillingDocument
                                                                           
  //Extension Association

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

{
      //Key

      @Consumption.valueHelpDefinition: [
            { entity:  { name:    'I_BillingDocumentBasicStdVH',
                         element: 'BillingDocument' }
            }]
      @ObjectModel.foreignKey.association: '_BillingDocument'
  key BillingDocument,
      @ObjectModel.text.element:  ['BillingDocumentItemText']
  key BillingDocumentItem,

      //Category

      @ObjectModel.foreignKey.association: '_SalesDocumentItemCategory'
      SalesDocumentItemCategory,
      @ObjectModel.foreignKey.association: '_SalesDocumentItemType'
      SalesDocumentItemType,
      ReturnItemProcessingType,

      //Admin

      @Semantics.user.createdBy: true
      CreatedByUser,
      @Semantics.systemDate.createdAt: true
      CreationDate,
      @Semantics.systemTime.createdAt
      CreationTime,
      @ObjectModel.foreignKey.association: '_ReferenceLogicalSystem'
      ReferenceLogicalSystem,

      //Organization

      @ObjectModel.foreignKey.association: '_OrganizationDivision'
      OrganizationDivision,
      @ObjectModel.foreignKey.association: '_Division'
      Division,
      @ObjectModel.foreignKey.association: '_SalesOffice'
      SalesOffice,

      //Product

      @Consumption.valueHelpDefinition: [
        { entity:  { name:    'I_MaterialStdVH',
                     element: 'Material' }
        }]
      @ObjectModel.text.association: '_MaterialText'
      @ObjectModel.foreignKey.association: '_Material'
      @API.element: { releaseState: #DEPRECATED, successor: 'Product' }
      Material,
      @Consumption.valueHelpDefinition: [
        { entity:  { name:    'I_ProductStdVH',
                     element: 'Product' }
        }]
      @ObjectModel.text.association: '_ProductText'
      @ObjectModel.foreignKey.association: '_Product'
      Product,
      @Consumption.valueHelpDefinition: [
        { entity:  { name:    'I_MaterialStdVH',
                     element: 'Material' }
        }]
      @ObjectModel.text.association: '_OriginallyRequestedMatlText'
      @ObjectModel.foreignKey.association: '_OriginallyRequestedMaterial'
      OriginallyRequestedMaterial,
      InternationalArticleNumber,
      @Consumption.valueHelpDefinition: [
        { entity:  { name:    'I_MaterialStdVH',
                     element: 'Material' }
        }]
      @ObjectModel.text.association: '_PricingReferenceMaterialText'
      @ObjectModel.foreignKey.association: '_PricingReferenceMaterial'
      PricingReferenceMaterial,
      @Consumption.valueHelpDefinition: [
        { entity:  { name:    'I_BatchStdVH',
                     element: 'Batch' },
          additionalBinding: [{ localElement: 'Plant',
                                element: 'Plant' },
                              { localElement: 'Material',
                                element: 'Material' }]
        }]
      @ObjectModel.foreignKey.association: '_Batch'
      Batch,
      @ObjectModel.foreignKey.association: '_ProductHierarchyNode'
      ProductHierarchyNode,
      @Consumption.valueHelpDefinition: [
        { entity:  { name:    'I_MaterialGroup',
                     element: 'MaterialGroup' }
        }]
      @ObjectModel.text.association: '_MaterialGroupText'
      @ObjectModel.foreignKey.association: '_MaterialGroup'
      @API.element: { releaseState: #DEPRECATED, successor: 'ProductGroup' }
      MaterialGroup,
      @ObjectModel.foreignKey.association: '_ProductGroup'
      ProductGroup,
      @ObjectModel.foreignKey.association: '_AdditionalMaterialGroup1'
      AdditionalMaterialGroup1,
      @ObjectModel.foreignKey.association: '_AdditionalMaterialGroup2'
      AdditionalMaterialGroup2,
      @ObjectModel.foreignKey.association: '_AdditionalMaterialGroup3'
      AdditionalMaterialGroup3,
      @ObjectModel.foreignKey.association: '_AdditionalMaterialGroup4'
      AdditionalMaterialGroup4,
      @ObjectModel.foreignKey.association: '_AdditionalMaterialGroup5'
      AdditionalMaterialGroup5,
      ProductConfiguration,
      @ObjectModel.foreignKey.association: '_MaterialCommissionGroup'
      MaterialCommissionGroup,
      @ObjectModel.foreignKey.association: '_Plant'
      Plant,
      @ObjectModel.foreignKey.association: '_StorageLocation'
      StorageLocation,
      ReplacementPartType,
      MaterialGroupHierarchy1,
      MaterialGroupHierarchy2,
      @ObjectModel.foreignKey.association: '_PlantRegion'
      PlantRegion,
      PlantCounty,
      PlantCity,
      @ObjectModel.foreignKey.association: '_TransitPlant'
      TransitPlant,
      @ObjectModel.foreignKey.association: '_ValueChainCategory'
      ValueChainCategory,
      //ValueChainInstanceUUID,

      BOMExplosion,
      MaterialDeterminationType,

      //Billing

      @Semantics.text: true
      BillingDocumentItemText,
      ServicesRenderedDate,
      @Semantics.quantity.unitOfMeasure: 'BillingQuantityUnit'
      BillingQuantity,
      @Semantics.unitOfMeasure: true
      @ObjectModel.foreignKey.association: '_BillingQuantityUnit'
      BillingQuantityUnit,
      @Semantics.quantity.unitOfMeasure: 'BaseUnit'
      BillingQuantityInBaseUnit,
      @Semantics.unitOfMeasure: true
      @ObjectModel.foreignKey.association: '_BaseUnit'
      BaseUnit,
      @Semantics.quantity.unitOfMeasure: 'BaseUnit'
      MRPRequiredQuantityInBaseUnit,
      BillingToBaseQuantityDnmntr,
      BillingToBaseQuantityNmrtr,
      @Semantics.quantity.unitOfMeasure: 'ItemWeightUnit'
      ItemGrossWeight,
      @Semantics.quantity.unitOfMeasure: 'ItemWeightUnit'
      ItemNetWeight,
      @Semantics.unitOfMeasure: true
      @ObjectModel.foreignKey.association: '_ItemWeightUnit'
      ItemWeightUnit,
      @Semantics.quantity.unitOfMeasure: 'ItemVolumeUnit'
      ItemVolume,
      @Semantics.unitOfMeasure: true
      @ObjectModel.foreignKey.association: '_ItemVolumeUnit'
      ItemVolumeUnit,
      @ObjectModel.foreignKey.association: '_BillToPartyCountry'
      BillToPartyCountry,
      @ObjectModel.foreignKey.association: '_BillToPartyRegion'
      BillToPartyRegion,
      @ObjectModel.foreignKey.association: '_BillingPlanRule'
      BillingPlanRule,
      BillingPlan,
      BillingPlanItem,

      //Pricing

      @Semantics.amount.currencyCode: 'TransactionCurrency'
      NetAmount,
      @Semantics.currencyCode: true
      @ObjectModel.foreignKey.association: '_TransactionCurrency'
      TransactionCurrency,
      @Semantics.amount.currencyCode: 'TransactionCurrency'
      GrossAmount,
      PricingDate,
      PriceDetnExchangeRate,
      @Semantics.quantity.unitOfMeasure: 'BaseUnit'
      PricingScaleQuantityInBaseUnit,

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

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

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

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

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

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

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

      @Semantics.amount.currencyCode: 'TransactionCurrency'
      Subtotal6Amount,
      @ObjectModel.foreignKey.association: '_StatisticalValueControl'
      StatisticalValueControl,
      CashDiscountIsDeductible,
      CustomerConditionGroup1,
      CustomerConditionGroup2,
      CustomerConditionGroup3,
      CustomerConditionGroup4,
      CustomerConditionGroup5,
      ManualPriceChangeType,
      @ObjectModel.foreignKey.association: '_MaterialPricingGroup'
      MaterialPricingGroup,
      StatisticsExchangeRate,
      @Consumption.valueHelpDefinition: [
        { entity:  { name:    'I_MaterialStdVH',
                     element: 'Material' }
        }]
      @ObjectModel.text.association: '_MainItemPricingRefMatlText'
      @ObjectModel.foreignKey.association: '_MainItemPricingRefMaterial'
      MainItemPricingRefMaterial,
      @ObjectModel.foreignKey.association: '_MainItemMaterialPricingGroup'
      MainItemMaterialPricingGroup,
      @ObjectModel.foreignKey.association: '_TimeSheetOvertimeCat'
      TimeSheetOvertimeCategory,
      @ObjectModel.foreignKey.association: '_PricingRelevance'
      PricingRelevance,      

      //Tax

      @ObjectModel.foreignKey.association: '_DepartureCountry'
      DepartureCountry,
      TaxJurisdiction,
      ProductTaxClassification1,
      ProductTaxClassification2,
      ProductTaxClassification3,
      ProductTaxClassification4,
      ProductTaxClassification5,
      ProductTaxClassification6,
      ProductTaxClassification7,
      ProductTaxClassification8,
      ProductTaxClassification9,
      ZeroVATRsn,
      TaxCode,
      TaxRateValidityStartDate,

      // Foreign trade

      @ObjectModel.foreignKey.association: '_CountryOfOrigin'
      CountryOfOrigin,
      @ObjectModel.foreignKey.association: '_RegionOfOrigin'
      RegionOfOrigin,
      CommodityCode,

      //Payment

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

      //Accounting

      @Consumption.valueHelpDefinition: [
        { entity:  { name:    'I_BusinessAreaStdVH',
                     element: 'BusinessArea' }
        }]
      @ObjectModel.text.association: '_BusinessAreaText'
      @ObjectModel.foreignKey.association: '_BusinessArea'
      BusinessArea,
      @ObjectModel.foreignKey.association: '_ProfitCenter'
      ProfitCenter,
      OrderID,
      @Consumption.valueHelpDefinition: [
        { entity:  { name:    'I_WBSElementStdVH',
                     element: 'WBSElement' }
        }]
      @ObjectModel.text.association: '_WBSElementText'
      @ObjectModel.foreignKey.association: '_WBSElement'
      @API.element: { releaseState: #DEPRECATED, successor: 'WBSElementInternalID' }
      WBSElement,
      @ObjectModel.foreignKey.association: '_WBSElementBasicData'
      WBSElementInternalID,
      @ObjectModel.foreignKey.association: '_ProviderContract'
      ProviderContract,
      @ObjectModel.foreignKey.association: '_ProviderContractItem'
      ProviderContractItem,

      BillingPerformancePeriodStrDte,
      BillingPerformancePeriodEndDte,
      @Consumption.valueHelpDefinition: [
        { entity:  { name:    'I_ControllingAreaStdVH',
                     element: 'ControllingArea' }
        }]
      @ObjectModel.foreignKey.association: '_ControllingArea'
      ControllingArea,
      @API.element: { releaseState: #DECOMMISSIONED, successor: 'ProfitabilitySegment_2' }
      cast ( case when ProfitabilitySegment_2 > '9999999999' then '9999999999' else lpad( ProfitabilitySegment_2, 10, '0' ) end as rkeobjnr_numc ) as ProfitabilitySegment,      
      ProfitabilitySegment_2,
      @ObjectModel.foreignKey.association: '_CostCenter_2'
      CostCenter,
      OriginSDDocument,
      OriginSDDocumentItem,
      PriceDetnExchangeRateDate,

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

      //Reference

      ReferenceSDDocument,
      ReferenceSDDocumentItem,
      @ObjectModel.foreignKey.association: '_ReferenceSDDocumentCategory'
      ReferenceSDDocumentCategory,
      @Consumption.valueHelpDefinition: [
        { entity:  { name:    'I_SalesDocumentStdVH',
                     element: 'SalesDocument' }
        }]
      @ObjectModel.foreignKey.association: '_SalesDocument'
      SalesDocument,
      @Consumption.valueHelpDefinition: [
        { entity:  { name:    'I_SalesDocumentItemStdVH',
                     element: 'SalesDocumentItem' },
          additionalBinding: [{ localElement: 'SalesDocument',
                                element: 'SalesDocument' }]
        }]
      @ObjectModel.foreignKey.association: '_SalesDocumentItem'
      SalesDocumentItem,
      @ObjectModel.foreignKey.association: '_SalesSDDocumentCategory'
      SalesSDDocumentCategory,
      @Consumption.valueHelpDefinition: [
        { entity:  { name:    'I_BillingDocumentItemStdVH',
                     element: 'BillingDocumentItem' },
          additionalBinding: [{ localElement: 'BillingDocument',
                                element: 'BillingDocument' }]
        }]
      @ObjectModel.foreignKey.association: '_HigherLevelItem'
      HigherLevelItem,
      @ObjectModel.foreignKey.association: '_HigherLvlItmOfBatSpltItm'
      HigherLvlItmOfBatSpltItm,
      BillingDocumentItemInPartSgmt,
      ExternalReferenceDocument,
      @API.element: { releaseState: #DEPRECATED, successor: 'BillingDocExtReferenceDocItem' }
      ExternalReferenceDocumentItem,
      BillingDocExtReferenceDocItem,
      @ObjectModel.foreignKey.association: '_PrelimBillingDocument'
      PrelimBillingDocument,
      @ObjectModel.foreignKey.association: '_PrelimBillingDocumentItem'
      PrelimBillingDocumentItem,

      //Sales

      @ObjectModel.foreignKey.association: '_SalesGroup'
      SalesGroup,
      @ObjectModel.foreignKey.association: '_AdditionalCustomerGroup1'
      AdditionalCustomerGroup1,
      @ObjectModel.foreignKey.association: '_AdditionalCustomerGroup2'
      AdditionalCustomerGroup2,
      @ObjectModel.foreignKey.association: '_AdditionalCustomerGroup3'
      AdditionalCustomerGroup3,
      @ObjectModel.foreignKey.association: '_AdditionalCustomerGroup4'
      AdditionalCustomerGroup4,
      @ObjectModel.foreignKey.association: '_AdditionalCustomerGroup5'
      AdditionalCustomerGroup5,
      @ObjectModel.foreignKey.association: '_SDDocumentReason'
      SDDocumentReason,
      @Consumption.valueHelpDefinition: [
        { entity:  { name:    'I_RetailPromotionStdVH',
                     element: 'RetailPromotion' }
        }]
      @ObjectModel.foreignKey.association: '_RetailPromotion'
      RetailPromotion,

      @Semantics.amount.currencyCode: 'TransactionCurrency'
      RebateBasisAmount,
      VolumeRebateGroup,
      ItemIsRelevantForCredit,

      @Semantics.amount.currencyCode: 'TransactionCurrency'
      CreditRelatedPrice,
      @Consumption.valueHelpDefinition: [
        { entity:  { name:    'I_SalesDealStdVH',
                     element: 'SalesDeal' }
        }]
      @ObjectModel.foreignKey.association: '_SalesDeal'
      SalesDeal,
      SalesPromotion,
      @ObjectModel.foreignKey.association: '_SalesOrderSalesDistrict'
      SalesOrderSalesDistrict,
      @ObjectModel.foreignKey.association: '_SalesOrderCustomerGroup'
      SalesOrderCustomerGroup,
      @ObjectModel.foreignKey.association: '_SalesOrderCustomerPriceGroup'
      SalesOrderCustomerPriceGroup,
      @ObjectModel.foreignKey.association: '_SalesOrderPriceListType'
      SalesOrderPriceListType,
      @ObjectModel.foreignKey.association: '_SalesOrderSalesOrganization'
      SalesOrderSalesOrganization,
      @ObjectModel.foreignKey.association: '_SalesOrderDistributionChannel'
      SalesOrderDistributionChannel,
      SalesDocIsCreatedFromReference,

      //Shipping

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

      //CRM

      @ObjectModel.foreignKey.association: '_ServiceDocumentType'
      ServiceDocumentType,
      ServiceDocument,
      ServiceDocumentItem,

      //Solution Order

      BusinessSolutionOrder,
      BusinessSolutionOrderItem,

      //Other fields

      HigherLevelItemUsage,
      BillingDocumentIsTemporary,           
      
      //Added Analytics fields

      @ObjectModel.foreignKey.association: '_SDDocumentCategory'
      SDDocumentCategory,
      @ObjectModel.foreignKey.association: '_BillingDocumentType'
      BillingDocumentType,
      @ObjectModel.foreignKey.association: '_SalesOrganization'
      SalesOrganization,
      @ObjectModel.foreignKey.association: '_DistributionChannel'
      DistributionChannel,
      @ObjectModel.foreignKey.association: '_CustomerPriceGroup'
      CustomerPriceGroup,
      @ObjectModel.foreignKey.association: '_CustomerGroup'
      CustomerGroup,
      @ObjectModel.foreignKey.association: '_Country'
      Country,
      @ObjectModel.foreignKey.association: '_Region'
      Region,
      @ObjectModel.foreignKey.association: '_CityCode'
      CityCode,
      @ObjectModel.foreignKey.association: '_SalesDistrict'
      SalesDistrict,
      @ObjectModel.foreignKey.association: '_OverallSDProcessStatus'
      OverallSDProcessStatus,
      @ObjectModel.foreignKey.association: '_OverallBillingStatus'
      OverallBillingStatus,
      //sales

      @Consumption.valueHelpDefinition: [
        { entity:  { name:    'I_Customer_VH',
                     element: 'Customer' }
        }]
      @ObjectModel.foreignKey.association: '_SoldToParty'
      SoldToParty,
      @Consumption.valueHelpDefinition: [
        { entity:  { name:    'I_Customer_VH',
                     element: 'Customer' }
        }]
      @ObjectModel.foreignKey.association: '_PayerParty'
      PayerParty,
      BillingDocumentDate,
      @ObjectModel.foreignKey.association: '_CompanyCode'
      CompanyCode,
      @ObjectModel.foreignKey.association: '_County'
      County,
      CustomerRebateAgreement,
      @ObjectModel.foreignKey.association: '_BillingDocumentCategory'            
      BillingDocumentCategory,
      PricingDocument,
      @ObjectModel.foreignKey.association: '_CancelledBillingDocument'      
      CancelledBillingDocument,

      //ship-to

      @Consumption.valueHelpDefinition: [
        { entity:  { name:    'I_Customer_VH',
                     element: 'Customer' }
        }]
      @ObjectModel.foreignKey.association: '_ShipToParty'
      ShipToParty,
      //bill-to

      @Consumption.valueHelpDefinition: [
        { entity:  { name:    'I_Customer_VH',
                     element: 'Customer' }
        }]

      @ObjectModel.foreignKey.association: '_BillToParty'
      BillToParty,
      @ObjectModel.foreignKey.association: '_SalesEmployee'
      SalesEmployee,
      @ObjectModel.foreignKey.association: '_ResponsibleEmployee'
      ResponsibleEmployee,

      //association

      @ObjectModel.association.type: [#TO_COMPOSITION_PARENT, #TO_COMPOSITION_ROOT]
      _BillingDocument,
      @ObjectModel.association.type: [#TO_COMPOSITION_CHILD]
      _Partner,
      @ObjectModel.association.type: [#TO_COMPOSITION_CHILD]
      _PricingElement,
      _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,
      _TransitPlant,
      _ValueChainCategory,
      _BillingQuantityUnit,
      _BaseUnit,
      _ItemWeightUnit,
      _ItemVolumeUnit,
      _BillToPartyCountry,
      _BillToPartyRegion,
      _BillingPlanRule,
      _TransactionCurrency,
      _StatisticalValueControl,
      _MaterialPricingGroup,
      _MainItemPricingRefMaterial,
      _MainItemMaterialPricingGroup,
      _TimeSheetOvertimeCat,
      _PricingRelevance,
      _DepartureCountry,
      _CountryOfOrigin,
      _RegionOfOrigin,
      _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,
      _HigherLevelItem,
      _HigherLvlItmOfBatSpltItm,
      _PrelimBillingDocument,
      _PrelimBillingDocumentItem,
      _SalesGroup,
      _AdditionalCustomerGroup1,
      _AdditionalCustomerGroup2,
      _AdditionalCustomerGroup3,
      _AdditionalCustomerGroup4,
      _AdditionalCustomerGroup5,
      _SDDocumentReason,
      _RetailPromotion,
      _SalesDeal,
      _SalesOrderSalesDistrict,
      _SalesOrderCustomerGroup,
      _SalesOrderCustomerPriceGroup,
      _SalesOrderPriceListType,
      _SalesOrderSalesOrganization,
      _SalesOrderDistributionChannel,
      _ShippingPoint,
      _ServiceDocumentType,
      _ProviderContract,
      _ProviderContractItem,
      _SolutionOrder,
      _SolutionOrderItem,      
      //--[ GENERATED:012:GlBfhyJl7kY4uNsXH4jYtm

      @Consumption.hidden: true
      _BusinessAreaText,
      @Consumption.hidden: true
      @API.element: { releaseState: #DEPRECATED, successor: '_WBSElementBasicData' }
      _WBSElementText,
      @Consumption.hidden: true
      _MaterialGroupText,
      @Consumption.hidden: true
      _ShippingPointText,
      @API.element: { releaseState: #DEPRECATED, successor: '_ProductText' }
      _MaterialText,
      @Consumption.hidden: true
      _ProductText,
      @Consumption.hidden: true
      _PricingReferenceMaterialText,
      @Consumption.hidden: true
      _MainItemPricingRefMatlText,
      @Consumption.hidden: true
      _OriginallyRequestedMatlText,
      // ]--GENERATED

      
      //Analytics

      _SDDocumentCategory,
      _BillingDocumentCategory,
      _BillingDocumentType,
      _SalesOrganization,
      _DistributionChannel,
      _CustomerPriceGroup,
      _CustomerGroup,
      _Country,
      _Region,
      _CityCode,
      _SalesDistrict,
      _OverallSDProcessStatus,
      _OverallBillingStatus,
      _SoldToParty,
      _PayerParty,
      _CompanyCode,
      _County,
      _CancelledBillingDocument,      
      _ShipToParty,
      _BillToParty,
      _SalesEmployee,
      _ResponsibleEmployee

}
where
     SDDocumentCategory = 'M' // Invoice

  or SDDocumentCategory = 'N' // Invoice Canceled

  or SDDocumentCategory = 'O' // Credit Memo

  or SDDocumentCategory = 'P' // Debit Memo

  or SDDocumentCategory = 'S' // Credit Memo Canceled

  or SDDocumentCategory = 'U' // Pro Forma Invoice

  or SDDocumentCategory = '5' // Intercompany Invoice

  or SDDocumentCategory = '6' // Intercompany Credit Memo

/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_BILLINGDOCUMENTITEMBASIC"
],
"ASSOCIATED":
[
"E_BILLINGDOCUMENTITEM",
"I_ADDITIONALCUSTOMERGROUP1",
"I_ADDITIONALCUSTOMERGROUP2",
"I_ADDITIONALCUSTOMERGROUP3",
"I_ADDITIONALCUSTOMERGROUP4",
"I_ADDITIONALCUSTOMERGROUP5",
"I_ADDITIONALMATERIALGROUP1",
"I_ADDITIONALMATERIALGROUP2",
"I_ADDITIONALMATERIALGROUP3",
"I_ADDITIONALMATERIALGROUP4",
"I_ADDITIONALMATERIALGROUP5",
"I_BATCH",
"I_BILLINGDOCITEMPARTNER",
"I_BILLINGDOCUMENT",
"I_BILLINGDOCUMENTCATEGORY",
"I_BILLINGDOCUMENTITEMBASIC",
"I_BILLINGDOCUMENTITEMPRCGELMNT",
"I_BILLINGDOCUMENTTYPE",
"I_BILLINGPLANRULE",
"I_BUSINESSAREA",
"I_BUSINESSAREATEXT",
"I_CITYCODE",
"I_COMPANYCODE",
"I_CONTROLLINGAREA",
"I_COSTCENTER",
"I_COUNTRY",
"I_CURRENCY",
"I_CUSTOMER",
"I_CUSTOMERGROUP",
"I_CUSTOMERPRICEGROUP",
"I_DELIVERYDOCUMENTITEM",
"I_DISTRIBUTIONCHANNEL",
"I_DIVISION",
"I_LOGICALSYSTEM",
"I_MATERIAL",
"I_MATERIALCOMMISSIONGROUP",
"I_MATERIALGROUP",
"I_MATERIALGROUPTEXT",
"I_MATERIALPRICINGGROUP",
"I_MATERIALTEXT",
"I_MATLACCOUNTASSIGNMENTGROUP",
"I_OVERALLBILLINGSTATUS",
"I_OVERALLSDPROCESSSTATUS",
"I_PERSONWORKAGREEMENT_1",
"I_PLANT",
"I_PRELIMBILLINGDOCUMENT",
"I_PRELIMBILLINGDOCUMENTITEM",
"I_PRICELISTTYPE",
"I_PRICINGRELEVANCE",
"I_PRODUCT",
"I_PRODUCTGROUP_2",
"I_PRODUCTHIERARCHYNODE",
"I_PRODUCTTEXT",
"I_PROFITCENTER",
"I_PROVIDERCONTRACT",
"I_PROVIDERCONTRACTITEM",
"I_REGION",
"I_RETAILPROMOTION",
"I_SALESDEAL",
"I_SALESDISTRICT",
"I_SALESDOCUMENT",
"I_SALESDOCUMENTITEM",
"I_SALESDOCUMENTITEMCATEGORY",
"I_SALESDOCUMENTITEMTYPE",
"I_SALESGROUP",
"I_SALESOFFICE",
"I_SALESORGANIZATION",
"I_SDDOCUMENTCATEGORY",
"I_SDDOCUMENTREASON",
"I_SERVICEDOCUMENTENHCD",
"I_SERVICEDOCUMENTITEMENHCD",
"I_SERVICEDOCUMENTTYPE",
"I_SHIPPINGPOINT",
"I_SHIPPINGPOINTTEXT",
"I_STATISTICALVALUECONTROL",
"I_STORAGELOCATION",
"I_TAXINGCOUNTY",
"I_TIMESHEETOVERTIMECAT",
"I_UNITOFMEASURE",
"I_USER",
"I_VALUECHAINCATEGORY",
"I_WBSELEMENT",
"I_WBSELEMENTBASICDATA",
"I_WBSELEMENTTEXT"
],
"BASE":
[
"I_BILLINGDOCUMENTITEMBASIC"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/