I_BillingDocItemAnalytics

DDL: I_BILLINGDOCITEMANALYTICS Type: view COMPOSITE

Billing Document Item Analytics

I_BillingDocItemAnalytics is a Composite CDS View that provides data about "Billing Document Item Analytics" in SAP S/4HANA. It reads from 1 data source (I_BillingDocExtdItem) and exposes 313 fields with key fields BillingDocumentItem, BillingDocument. It has 5 associations to related views.

Data Sources (1)

SourceAliasJoin Type
I_BillingDocExtdItem Item from

Associations (5)

CardinalityTargetAliasCondition
[0..1] I_Currency _StatisticsCurrency $projection.StatisticsCurrency = _StatisticsCurrency.Currency
[0..1] I_MfgOrder _OrderID $projection.OrderID = _OrderID.ManufacturingOrder
[0..1] I_CustomerClassification _SoldToPartyClassification $projection.SoldToPartyClassification = _SoldToPartyClassification.CustomerClassification --AT15.7.2021: as long as not defined in core billing model
[0..1] I_Globalcompany _GlobalCompany $projection.partnercompany = _GlobalCompany.Company --AT21.7.2021: had to be redefined, because original one is still based on County (instead of County_2)
[0..1] I_TaxingCounty _County_2 $projection.country = _County_2.Country and $projection.region = _County_2.Region and $projection.County_2 = _County_2.TaxingCounty

Annotations (8)

NameValueLevelField
ClientHandling.algorithm #SESSION_VARIABLE view
EndUserText.label Billing Document Item Analytics view
VDM.viewType #COMPOSITE view
AccessControl.authorizationCheck #CHECK view
AbapCatalog.sqlViewName ISDBILLDOCITMANA view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #XL view

Fields (313)

KeyFieldSource TableSource FieldDescription
KEY BillingDocumentItem
SalesDocumentItemCategory
SalesDocumentItemType
ReturnItemProcessingType
CreatedByUserName
CreationTime
SoldToPartyName
SoldToPartyClassification
ShipToParty
ShipToPartyName
BillToParty
BillToPartyName
PayerPartyName
SalesEmployeeName
ResponsibleEmployee
ResponsibleEmployeeName
PartnerCompany
_GlobalCompany _GlobalCompany
PurchaseOrderByCustomer
CustomerRebateAgreement
RetailPromotion
RebateBasisAmount
ItemIsRelevantForCredit
CreditRelatedPrice
SalesDealDescription
SalesPromotion
OrganizationDivision
Product Product Product Sold
PlantName
StorageLocationName
BillingDocumentIsCancelled
CancelledBillingDocument
ForeignTrade
IsExportDelivery
BillingDocumentItemText
BillingPlanItem
MainItemPricingRefMaterial
PaymentMethodName
CompanyCodeName
AccountingDocument
DocumentReferenceID
AssignmentReference
ProfitCenter
WBSElement
ControllingAreaName
OriginSDDocumentItem
SalesSDDocumentCategory
BusinessSolutionOrder BusinessSolutionOrder Solution Order
BusinessSolutionOrderItem BusinessSolutionOrderItem Solution Order Item
OverallSDProcessStatus
OverallBillingStatus
AccountingTransferStatus
BillingIssueType
OvrlItmGeneralIncompletionSts
OverallPricingIncompletionSts
CreditMemoNetamount CreditMemoNetamount
CreditMemoNetamount CreditMemoNetamount
TransactionCurrency
StatisticsCurrency
CreditMemoNetamount CreditMemoNetamount
_StatisticsCurrency _StatisticsCurrency
_SoldToPartyClassification _SoldToPartyClassification
_BillingDocument _BillingDocument
_County_2 _County_2
_ProductGroupText
_AdditionalMaterialGroup1
_OrderID _OrderID
2021CE2111
KEY BillingDocument I_BillingDocExtdItem BillingDocument SD Document
SDDocumentCategory I_BillingDocExtdItem SDDocumentCategory Document Cat.
BillingDocumentCategory I_BillingDocExtdItem BillingDocumentCategory BillingCategory
BillingDocumentType I_BillingDocExtdItem BillingDocumentType Billing Type
CreatedByUser I_BillingDocExtdItem CreatedByUser User Name
CreationDate I_BillingDocExtdItem CreationDate Time Stamp
LogicalSystem I_BillingDocExtdItem ReferenceLogicalSystem
SoldToParty I_BillingDocExtdItem SoldToParty Sold-to Party
PayerParty I_BillingDocExtdItem PayerParty Payer
CustomerGroup I_BillingDocExtdItem CustomerGroup Customer Group
SalesDistrict I_BillingDocExtdItem SalesDistrict Sales District
SalesGroup I_BillingDocExtdItem SalesGroup Sales Group
AdditionalCustomerGroup1 I_BillingDocExtdItem AdditionalCustomerGroup1 Customer Grp 1
AdditionalCustomerGroup2 I_BillingDocExtdItem AdditionalCustomerGroup2 Customer Grp 2
AdditionalCustomerGroup3 I_BillingDocExtdItem AdditionalCustomerGroup3 Customer Grp 3
AdditionalCustomerGroup4 I_BillingDocExtdItem AdditionalCustomerGroup4 Customer Grp 4
AdditionalCustomerGroup5 I_BillingDocExtdItem AdditionalCustomerGroup5 Customer Grp 5
SDDocumentReason I_BillingDocExtdItem SDDocumentReason Order Reason
VolumeRebateGroup I_BillingDocExtdItem VolumeRebateGroup Vol. Rebate Grp
SalesDeal I_BillingDocExtdItem SalesDeal
SalesOrganization I_BillingDocExtdItem SalesOrganization Sales Organization
DistributionChannel I_BillingDocExtdItem DistributionChannel RefDistCh-Cust/Mat.
Division I_BillingDocExtdItem Division Internal Division ID
SalesOffice I_BillingDocExtdItem SalesOffice Sales Office
Material I_BillingDocExtdItem Material Vehicle Model
OriginallyRequestedMaterial I_BillingDocExtdItem OriginallyRequestedMaterial
InternationalArticleNumber I_BillingDocExtdItem InternationalArticleNumber EAN/UPC
PricingReferenceMaterial I_BillingDocExtdItem PricingReferenceMaterial Pr. Ref. Matl
Batch I_BillingDocExtdItem Batch Lot No.
ProductHierarchyNode I_BillingDocExtdItem ProductHierarchyNode Prod. Hierarchy
MaterialGroup I_BillingDocExtdItem MaterialGroup Product Group
ProductGroup I_BillingDocExtdItem ProductGroup Product Sold Group
AdditionalMaterialGroup1 I_BillingDocExtdItem AdditionalMaterialGroup1 MaterialGroup 1
AdditionalMaterialGroup2 I_BillingDocExtdItem AdditionalMaterialGroup2 MaterialGroup 2
AdditionalMaterialGroup3 I_BillingDocExtdItem AdditionalMaterialGroup3 MaterialGroup 3
AdditionalMaterialGroup4 I_BillingDocExtdItem AdditionalMaterialGroup4 MaterialGroup 4
AdditionalMaterialGroup5 I_BillingDocExtdItem AdditionalMaterialGroup5 MaterialGroup 5
MaterialCommissionGroup I_BillingDocExtdItem MaterialCommissionGroup
Plant I_BillingDocExtdItem Plant Valuation Area
StorageLocation I_BillingDocExtdItem StorageLocation StorageLocation
BillingDocumentDate I_BillingDocExtdItem BillingDocumentDate Billing Date
ServicesRenderedDate I_BillingDocExtdItem ServicesRenderedDate Services Rendered Date
BillingQuantity I_BillingDocExtdItem BillingQuantity Invoiced Qty
BillingQuantityUnit I_BillingDocExtdItem BillingQuantityUnit Sales Unit
BillingQuantityInBaseUnit I_BillingDocExtdItem BillingQuantityInBaseUnit Bill.Qty in SKU
MRPRequiredQuantityInBaseUnit I_BillingDocExtdItem MRPRequiredQuantityInBaseUnit Open Quantity
BillingToBaseQuantityDnmntr I_BillingDocExtdItem BillingToBaseQuantityDnmntr
BillingToBaseQuantityNmrtr I_BillingDocExtdItem BillingToBaseQuantityNmrtr
ItemGrossWeight I_BillingDocExtdItem ItemGrossWeight Gross Weight
ItemNetWeight I_BillingDocExtdItem ItemNetWeight Net Weight
ItemWeightUnit I_BillingDocExtdItem ItemWeightUnit Unit of Weight
ItemVolume I_BillingDocExtdItem ItemVolume Volume
ItemVolumeUnit I_BillingDocExtdItem ItemVolumeUnit Volume Unit
BillToPartyCountry I_BillingDocExtdItem BillToPartyCountry Dst.CtryRg.Ord.
BillToPartyRegion I_BillingDocExtdItem BillToPartyRegion Region Order
BillingPlanRule I_BillingDocExtdItem BillingPlanRule
BillingPlan I_BillingDocExtdItem BillingPlan Bill. Plan No.
CustomerPriceGroup I_BillingDocExtdItem CustomerPriceGroup CustPrice Group
ItemGrossAmountOfBillingDoc I_BillingDocExtdItem GrossAmount Gross value
PricingDate I_BillingDocExtdItem PricingDate Pricing Date
PriceDetnExchangeRate I_BillingDocExtdItem PriceDetnExchangeRate Exchange Rate
PricingScaleQuantityInBaseUnit I_BillingDocExtdItem PricingScaleQuantityInBaseUnit
TaxAmount I_BillingDocExtdItem TaxAmount Tax Amt in Rptg Crcy
CostAmount I_BillingDocExtdItem CostAmount
Subtotal1Amount I_BillingDocExtdItem Subtotal1Amount Subtotal 1 Amount
Subtotal2Amount I_BillingDocExtdItem Subtotal2Amount Subtotal 2 Amount
Subtotal3Amount I_BillingDocExtdItem Subtotal3Amount Subtotal 3 Amount
Subtotal4Amount I_BillingDocExtdItem Subtotal4Amount Subtotal 4 Amount
Subtotal5Amount I_BillingDocExtdItem Subtotal5Amount Subtotal 5 Amount
Subtotal6Amount I_BillingDocExtdItem Subtotal6Amount Subtotal 6 Amount
StatisticalValueControl I_BillingDocExtdItem StatisticalValueControl
ShippingPoint I_BillingDocExtdItem ShippingPoint Shipping Point
EligibleAmountForCashDiscount I_BillingDocExtdItem EligibleAmountForCashDiscount
BusinessArea I_BillingDocExtdItem BusinessArea Business Area
WBSElementInternalID I_BillingDocExtdItem WBSElementInternalID WBS Internal ID
ControllingArea I_BillingDocExtdItem ControllingArea Controlling Area
ProfitabilitySegment I_BillingDocExtdItem ProfitabilitySegment_2 Profit. segment
ProfitabilitySegment_2 I_BillingDocExtdItem ProfitabilitySegment_2 Profit. segment
OrderID I_BillingDocExtdItem OrderID Order ID
CostCenter I_BillingDocExtdItem CostCenter Cost Center
OriginSDDocument I_BillingDocExtdItem OriginSDDocument Originating Doc
ExchangeRateDate I_BillingDocExtdItem PriceDetnExchangeRateDate
ReferenceSDDocument I_BillingDocExtdItem ReferenceSDDocument Reference Doc.
ReferenceSDDocumentItem I_BillingDocExtdItem ReferenceSDDocumentItem Reference Item
ReferenceSDDocumentCategory I_BillingDocExtdItem ReferenceSDDocumentCategory Prec.Doc.Categ.
SalesDocument I_BillingDocExtdItem SalesDocument SD Document
SalesDocumentItem I_BillingDocExtdItem SalesDocumentItem Sales Document Item
HigherLevelItem I_BillingDocExtdItem HigherLevelItem Higher-Lev.Item
BillingDocumentItemInPartSgmt I_BillingDocExtdItem BillingDocumentItemInPartSgmt
BaseUnit I_BillingDocExtdItem BaseUnit Unit of Measure
_TransactionCurrency I_BillingDocExtdItem _TransactionCurrency
_SDDocumentCategory I_BillingDocExtdItem _SDDocumentCategory
_BillingDocumentCategory I_BillingDocExtdItem _BillingDocumentCategory
_BillingDocumentType I_BillingDocExtdItem _BillingDocumentType
_SalesOrganization I_BillingDocExtdItem _SalesOrganization
_DistributionChannel I_BillingDocExtdItem _DistributionChannel
_CustomerPriceGroup I_BillingDocExtdItem _CustomerPriceGroup
_CustomerGroup I_BillingDocExtdItem _CustomerGroup
_SalesDistrict I_BillingDocExtdItem _SalesDistrict
_OverallSDProcessStatus I_BillingDocExtdItem _OverallSDProcessStatus
_OverallBillingStatus I_BillingDocExtdItem _OverallBillingStatus
_SoldToParty I_BillingDocExtdItem _SoldToParty
_ShipToParty I_BillingDocExtdItem _ShipToParty
_BillToParty I_BillingDocExtdItem _BillToParty
_PayerParty I_BillingDocExtdItem _PayerParty
_SalesDocumentItemCategory I_BillingDocExtdItem _SalesDocumentItemCategory
_SalesDocumentItemType I_BillingDocExtdItem _SalesDocumentItemType
_CreatedByUser I_BillingDocExtdItem _CreatedByUser
_LogicalSystem I_BillingDocExtdItem _ReferenceLogicalSystem
_OrganizationDivision I_BillingDocExtdItem _OrganizationDivision
_Division I_BillingDocExtdItem _Division
_SalesOffice I_BillingDocExtdItem _SalesOffice
_Material I_BillingDocExtdItem _Material
_Product I_BillingDocExtdItem _Product
_MaterialText I_BillingDocExtdItem _MaterialText
_ProductText I_BillingDocExtdItem _ProductText
_OriginallyRequestedMaterial I_BillingDocExtdItem _OriginallyRequestedMaterial
_OriginallyRequestedMatlText I_BillingDocExtdItem _OriginallyRequestedMatlText
_PricingReferenceMaterial I_BillingDocExtdItem _PricingReferenceMaterial
_PricingReferenceMaterialText I_BillingDocExtdItem _PricingReferenceMaterialText
_Batch I_BillingDocExtdItem _Batch
_ProductHierarchyNode I_BillingDocExtdItem _ProductHierarchyNode
_MaterialGroup I_BillingDocExtdItem _MaterialGroup
_ProductGroup I_BillingDocExtdItem _ProductGroup
_MaterialGroupText I_BillingDocExtdItem _MaterialGroupText
_AdditionalMaterialGroup2 I_BillingDocExtdItem _AdditionalMaterialGroup2
_AdditionalMaterialGroup3 I_BillingDocExtdItem _AdditionalMaterialGroup3
_AdditionalMaterialGroup4 I_BillingDocExtdItem _AdditionalMaterialGroup4
_AdditionalMaterialGroup5 I_BillingDocExtdItem _AdditionalMaterialGroup5
_MaterialCommissionGroup I_BillingDocExtdItem _MaterialCommissionGroup
_Plant I_BillingDocExtdItem _Plant
_StorageLocation I_BillingDocExtdItem _StorageLocation
_BillingQuantityUnit I_BillingDocExtdItem _BillingQuantityUnit
_BaseUnit I_BillingDocExtdItem _BaseUnit
_ItemWeightUnit I_BillingDocExtdItem _ItemWeightUnit
_ItemVolumeUnit I_BillingDocExtdItem _ItemVolumeUnit
_BillToPartyCountry I_BillingDocExtdItem _BillToPartyCountry
_BillToPartyRegion I_BillingDocExtdItem _BillToPartyRegion
_BillingPlanRule I_BillingDocExtdItem _BillingPlanRule
_BusinessArea I_BillingDocExtdItem _BusinessArea
_BusinessAreaText I_BillingDocExtdItem _BusinessAreaText
_WBSElement I_BillingDocExtdItem _WBSElement
_WBSElementBasicData I_BillingDocExtdItem _WBSElementBasicData
_ControllingArea I_BillingDocExtdItem _ControllingArea
_CostCenter I_BillingDocExtdItem _CostCenter
_ReferenceSDDocumentCategory I_BillingDocExtdItem _ReferenceSDDocumentCategory
_SalesSDDocumentCategory I_BillingDocExtdItem _SalesSDDocumentCategory
_SalesGroup I_BillingDocExtdItem _SalesGroup
_SalesDocument I_BillingDocExtdItem _SalesDocument
_SalesDocumentItem I_BillingDocExtdItem _SalesDocumentItem
_HigherLevelItem I_BillingDocExtdItem _HigherLevelItem
_AdditionalCustomerGroup1 I_BillingDocExtdItem _AdditionalCustomerGroup1
_AdditionalCustomerGroup2 I_BillingDocExtdItem _AdditionalCustomerGroup2
_AdditionalCustomerGroup3 I_BillingDocExtdItem _AdditionalCustomerGroup3
_AdditionalCustomerGroup4 I_BillingDocExtdItem _AdditionalCustomerGroup4
_AdditionalCustomerGroup5 I_BillingDocExtdItem _AdditionalCustomerGroup5
_MainItemPricingRefMaterial I_BillingDocExtdItem _MainItemPricingRefMaterial
_SDDocumentReason I_BillingDocExtdItem _SDDocumentReason
_SalesDeal I_BillingDocExtdItem _SalesDeal
_ShippingPoint I_BillingDocExtdItem _ShippingPoint
_ShippingPointText I_BillingDocExtdItem _ShippingPointText
_StatisticalValueControl I_BillingDocExtdItem _StatisticalValueControl
_SalesEmployee_2 I_BillingDocExtdItem _SalesEmployee_2
_ResponsibleEmployee_2 I_BillingDocExtdItem _ResponsibleEmployee_2
_SolutionOrder I_BillingDocExtdItem _SolutionOrder
_SolutionOrderItem I_BillingDocExtdItem _SolutionOrderItem
LastChangeDate _BillingDocument LastChangeDate Time Stamp
Country _BillingDocument Country Venue: Ctry/Reg
Region _BillingDocument Region Venue Region
CityCode _BillingDocument CityCode IATA: City
County_2 _BillingDocument County Wyoming County
CreditControlArea _BillingDocument CreditControlArea Credit Control Area
BillingDocCombinationCriteria _BillingDocument BillingDocCombinationCriteria
ManualInvoiceMaintIsRelevant _BillingDocument ManualInvoiceMaintIsRelevant Man.Inv.Maint.
PriceListType _BillingDocument PriceListType Price List Tp.
TaxDepartureCountry _BillingDocument TaxDepartureCountry Tx Dep Ctry/Reg
VATRegistration _BillingDocument VATRegistration VAT Registration No.
VATRegistrationOrigin _BillingDocument VATRegistrationOrigin OriginSlsTxNo.
VATRegistrationCountry _BillingDocument VATRegistrationCountry CtryRgnSlsTxNo.
CustomerTaxClassification1 _BillingDocument CustomerTaxClassification1
CustomerTaxClassification2 _BillingDocument CustomerTaxClassification2
CustomerTaxClassification3 _BillingDocument CustomerTaxClassification3
CustomerTaxClassification4 _BillingDocument CustomerTaxClassification4
CustomerTaxClassification5 _BillingDocument CustomerTaxClassification5
CustomerTaxClassification6 _BillingDocument CustomerTaxClassification6
CustomerTaxClassification7 _BillingDocument CustomerTaxClassification7
CustomerTaxClassification8 _BillingDocument CustomerTaxClassification8
CustomerTaxClassification9 _BillingDocument CustomerTaxClassification9
SDPricingProcedure _BillingDocument SDPricingProcedure Pric. Procedure
ShippingCondition _BillingDocument ShippingCondition Shipping Conditions
IncotermsVersion _BillingDocument IncotermsVersion Inco. Version
IncotermsClassification _BillingDocument IncotermsClassification Incoterms
IncotermsTransferLocation _BillingDocument IncotermsTransferLocation Incoterms 2
IncotermsLocation1 _BillingDocument IncotermsLocation1 Inco. Location1
IncotermsLocation2 _BillingDocument IncotermsLocation2 Inco. Location2
ContractAccount _BillingDocument ContractAccount Contract Acct
CustomerPaymentTerms _BillingDocument CustomerPaymentTerms Pyt Terms
PaymentMethod _BillingDocument PaymentMethod Pymt Meth.
PaymentReference _BillingDocument PaymentReference Payment Reference
FixedValueDate _BillingDocument FixedValueDate Fixed Val. Date
AdditionalValueDays _BillingDocument AdditionalValueDays Add. Value Days
CompanyCode _BillingDocument CompanyCode Receiver Company Code
FiscalYear _BillingDocument FiscalYear G/L Fiscal Year
FiscalPeriod _BillingDocument FiscalPeriod Tax period
CustomerAccountAssignmentGroup _BillingDocument CustomerAccountAssignmentGroup AccAssmtGrpCust
AccountingExchangeRateIsSet _BillingDocument AccountingExchangeRateIsSet
AccountingExchangeRate _BillingDocument AccountingExchangeRate Exch.Rate Acct.
ExchangeRateType _BillingDocument ExchangeRateType Exch. Rate Type
DunningArea _BillingDocument DunningArea Dunning Area
DunningBlockingReason _BillingDocument DunningBlockingReason Set Dunning Block
DunningKey _BillingDocument DunningKey Dunning Key
InternalFinancialDocument _BillingDocument InternalFinancialDocument
AccountingPostingStatus _BillingDocument AccountingPostingStatus
InvoiceListStatus _BillingDocument InvoiceListStatus
_PriceListType _BillingDocument _PriceListType
_TaxDepartureCountry _BillingDocument _TaxDepartureCountry
_VATRegistrationOrigin _BillingDocument _VATRegistrationOrigin
_VATRegistrationCountry _BillingDocument _VATRegistrationCountry
_ShippingCondition _BillingDocument _ShippingCondition
_IncotermsClassification _BillingDocument _IncotermsClassification
_IncotermsVersion _BillingDocument _IncotermsVersion
_CustomerPaymentTerms _BillingDocument _CustomerPaymentTerms
_PaymentMethod _BillingDocument _PaymentMethod
_CompanyCode _BillingDocument _CompanyCode
_FiscalYear _BillingDocument _FiscalYear
_CustomerAccountAssgmtGroup _BillingDocument _CustomerAccountAssgmtGroup
_ExchangeRateType _BillingDocument _ExchangeRateType
_DunningArea _BillingDocument _DunningArea
_DunningAreaText _BillingDocument _DunningAreaText
_DunningBlockingReason _BillingDocument _DunningBlockingReason
_DunningKey _BillingDocument _DunningKey
_Country _BillingDocument _Country
_Region _BillingDocument _Region
_CityCode _BillingDocument _CityCode
_County _BillingDocument _County
_CreditControlArea _BillingDocument _CreditControlArea
_CreditControlAreaText _BillingDocument _CreditControlAreaText
_AccountingPostingStatus _BillingDocument _AccountingPostingStatus
_AccountingTransferStatus _BillingDocument _AccountingTransferStatus
_BillingIssueType _BillingDocument _BillingIssueType
_InvoiceListStatus _BillingDocument _InvoiceListStatus
_OvrlItmGeneralIncompletionSts _BillingDocument _OvrlItmGeneralIncompletionSts
_OverallPricingIncompletionSts _BillingDocument _OverallPricingIncompletionSts
PropagatePrftbltySgmt2BOM _SalesDocumentItemCategory PropagatePrftbltySgmt2BOM
CostDeterminationIsRequired _SalesDocumentItemCategory CostDeterminationIsRequired

Derived SQL interpretation, reconstructed from the parsed view metadata (data sources, associations, and field mappings). SAP annotations are omitted and the structure is reformulated as SQL — this is a functional approximation, not the verbatim SAP source.

-- Derived SQL interpretation of CDS view I_BillingDocItemAnalytics.
-- Reconstructed from parsed metadata (data sources, associations, fields).
-- SAP annotations are omitted and the structure is reformulated as SQL;
-- this is a functional approximation, not the verbatim SAP source. Some join
-- conditions may be unavailable and a few CDS constructs are kept as-is.

CREATE VIEW I_BillingDocItemAnalytics AS
SELECT
  cast(Item.BillingDocumentItem as billing_document_item) AS BillingDocumentItem,
  cast(Item.SalesDocumentItemCategory as sales_document_item_category preserving type ) AS SalesDocumentItemCategory,
  cast(Item.SalesDocumentItemType as sales_document_item_type preserving type ) AS SalesDocumentItemType,
  cast(Item.ReturnItemProcessingType as return_id_processing_type) AS ReturnItemProcessingType,
  Item._CreatedByUser.UserDescription AS CreatedByUserName,
  cast( Item.CreationTime as creation_time ) AS CreationTime,
  cast(Item._SoldToParty.CustomerName as vdm_sold_to_name) AS SoldToPartyName,
  Item._SoldToParty.CustomerClassification AS SoldToPartyClassification,
  cast(Item.ShipToParty as kunwe preserving type) AS ShipToParty,
  cast(Item._ShipToParty.CustomerName as ship_to_name) AS ShipToPartyName,
  cast(Item.BillToParty as kunre preserving type) AS BillToParty,
  cast(Item._BillToParty.CustomerName as bill_to_name ) AS BillToPartyName,
  cast(Item._PayerParty.CustomerName as payer_name) AS PayerPartyName,
  cast(Item._SalesEmployee_2.PersonFullName as sales_empl_name) AS SalesEmployeeName,
  cast(Item.ResponsibleEmployee as resp_empl preserving type) AS ResponsibleEmployee,
  cast(Item._ResponsibleEmployee_2.PersonFullName as resp_empl_name) AS ResponsibleEmployeeName,
  cast(Item.CustomerRebateAgreement as customer_rebate_agreement) AS CustomerRebateAgreement,
  cast(Item.RetailPromotion as retail_promotion) AS RetailPromotion,
  cast(Item.ItemIsRelevantForCredit as credit_check_relevant_item) AS ItemIsRelevantForCredit,
  cast(Item._SalesDeal.SalesDealDescription as sales_deal_description) AS SalesDealDescription,
  cast(Item.SalesPromotion as sales_promotion) AS SalesPromotion,
  cast(Item.OrganizationDivision as organization_division preserving type) AS OrganizationDivision,
  Product,
  Item._Plant.PlantName AS PlantName,
  Item._StorageLocation.StorageLocationName AS StorageLocationName,
  cast(_BillingDocument.BillingDocumentIsCancelled as billing_document_cancln_flag) AS BillingDocumentIsCancelled,
  cast(_BillingDocument.CancelledBillingDocument as canceled_billing_document) AS CancelledBillingDocument,
  cast('' as exnum) AS ForeignTrade,
  cast('' as export_delivery_flag) AS IsExportDelivery,
  cast(Item.BillingDocumentItemText as billing_document_item_desc ) AS BillingDocumentItemText,
  cast(Item.BillingPlanItem as billing_plan_item) AS BillingPlanItem,
  cast(Item.MainItemPricingRefMaterial as slsdoc_main_itm_prcg_ref_matl preserving type ) AS MainItemPricingRefMaterial,
  _BillingDocument._PaymentMethod.PaymentMethodName AS PaymentMethodName,
  _BillingDocument._CompanyCode.CompanyCodeName AS CompanyCodeName,
  cast(_BillingDocument.AccountingDocument as accounting_document_number ) AS AccountingDocument,
  cast(_BillingDocument.DocumentReferenceID as document_reference_id) AS DocumentReferenceID,
  cast(_BillingDocument.AssignmentReference as assignment_reference) AS AssignmentReference,
  cast( Item.WBSElement as sd_ps_psp_pnr preserving type ) AS WBSElement,
  Item._ControllingArea.ControllingAreaName AS ControllingAreaName,
  cast(Item.OriginSDDocumentItem as origin_sd_document_item) AS OriginSDDocumentItem,
  cast(Item.SalesSDDocumentCategory as sales_sd_doc_category preserving type ) AS SalesSDDocumentCategory,
  BusinessSolutionOrder,
  BusinessSolutionOrderItem,
  cast(Item.OverallSDProcessStatus as overall_sd_process_status preserving type ) AS OverallSDProcessStatus,
  cast(Item.OverallBillingStatus as overall_billing_status preserving type ) AS OverallBillingStatus,
  cast(_BillingDocument.AccountingTransferStatus as accounting_transfer_status preserving type ) AS AccountingTransferStatus,
  cast( _BillingDocument.BillingIssueType as billing_issue_type preserving type ) AS BillingIssueType,
  cast(_BillingDocument.OvrlItmGeneralIncompletionSts as itms_ovrl_incompletion_status preserving type ) AS OvrlItmGeneralIncompletionSts,
  cast(_BillingDocument.OverallPricingIncompletionSts as ovrl_pricing_incompletion_sts preserving type) AS OverallPricingIncompletionSts,
  CreditMemoNetamount,
  Item._SalesOrganization.SalesOrganizationCurrency AS StatisticsCurrency,
  does not exist yet Item._AdditionalMaterialGroup1 AS _AdditionalMaterialGroup1,
  Item._ProfitCenter AS 2021CE2111,
  Item.BillingDocument AS BillingDocument,
  Item.SDDocumentCategory AS SDDocumentCategory,
  Item.BillingDocumentCategory AS BillingDocumentCategory,
  Item.BillingDocumentType AS BillingDocumentType,
  Item.CreatedByUser AS CreatedByUser,
  Item.CreationDate AS CreationDate,
  Item.ReferenceLogicalSystem AS LogicalSystem,
  Item.SoldToParty AS SoldToParty,
  Item.PayerParty AS PayerParty,
  Item.CustomerGroup AS CustomerGroup,
  Item.SalesDistrict AS SalesDistrict,
  Item.SalesGroup AS SalesGroup,
  Item.AdditionalCustomerGroup1 AS AdditionalCustomerGroup1,
  Item.AdditionalCustomerGroup2 AS AdditionalCustomerGroup2,
  Item.AdditionalCustomerGroup3 AS AdditionalCustomerGroup3,
  Item.AdditionalCustomerGroup4 AS AdditionalCustomerGroup4,
  Item.AdditionalCustomerGroup5 AS AdditionalCustomerGroup5,
  Item.SDDocumentReason AS SDDocumentReason,
  Item.VolumeRebateGroup AS VolumeRebateGroup,
  Item.SalesDeal AS SalesDeal,
  Item.SalesOrganization AS SalesOrganization,
  Item.DistributionChannel AS DistributionChannel,
  Item.Division AS Division,
  Item.SalesOffice AS SalesOffice,
  Item.Material AS Material,
  Item.OriginallyRequestedMaterial AS OriginallyRequestedMaterial,
  Item.InternationalArticleNumber AS InternationalArticleNumber,
  Item.PricingReferenceMaterial AS PricingReferenceMaterial,
  Item.Batch AS Batch,
  Item.ProductHierarchyNode AS ProductHierarchyNode,
  Item.MaterialGroup AS MaterialGroup,
  Item.ProductGroup AS ProductGroup,
  Item.AdditionalMaterialGroup1 AS AdditionalMaterialGroup1,
  Item.AdditionalMaterialGroup2 AS AdditionalMaterialGroup2,
  Item.AdditionalMaterialGroup3 AS AdditionalMaterialGroup3,
  Item.AdditionalMaterialGroup4 AS AdditionalMaterialGroup4,
  Item.AdditionalMaterialGroup5 AS AdditionalMaterialGroup5,
  Item.MaterialCommissionGroup AS MaterialCommissionGroup,
  Item.Plant AS Plant,
  Item.StorageLocation AS StorageLocation,
  Item.BillingDocumentDate AS BillingDocumentDate,
  Item.ServicesRenderedDate AS ServicesRenderedDate,
  Item.BillingQuantity AS BillingQuantity,
  Item.BillingQuantityUnit AS BillingQuantityUnit,
  Item.BillingQuantityInBaseUnit AS BillingQuantityInBaseUnit,
  Item.MRPRequiredQuantityInBaseUnit AS MRPRequiredQuantityInBaseUnit,
  Item.BillingToBaseQuantityDnmntr AS BillingToBaseQuantityDnmntr,
  Item.BillingToBaseQuantityNmrtr AS BillingToBaseQuantityNmrtr,
  Item.ItemGrossWeight AS ItemGrossWeight,
  Item.ItemNetWeight AS ItemNetWeight,
  Item.ItemWeightUnit AS ItemWeightUnit,
  Item.ItemVolume AS ItemVolume,
  Item.ItemVolumeUnit AS ItemVolumeUnit,
  Item.BillToPartyCountry AS BillToPartyCountry,
  Item.BillToPartyRegion AS BillToPartyRegion,
  Item.BillingPlanRule AS BillingPlanRule,
  Item.BillingPlan AS BillingPlan,
  Item.CustomerPriceGroup AS CustomerPriceGroup,
  Item.GrossAmount AS ItemGrossAmountOfBillingDoc,
  Item.PricingDate AS PricingDate,
  Item.PriceDetnExchangeRate AS PriceDetnExchangeRate,
  Item.PricingScaleQuantityInBaseUnit AS PricingScaleQuantityInBaseUnit,
  Item.TaxAmount AS TaxAmount,
  Item.CostAmount AS CostAmount,
  Item.Subtotal1Amount AS Subtotal1Amount,
  Item.Subtotal2Amount AS Subtotal2Amount,
  Item.Subtotal3Amount AS Subtotal3Amount,
  Item.Subtotal4Amount AS Subtotal4Amount,
  Item.Subtotal5Amount AS Subtotal5Amount,
  Item.Subtotal6Amount AS Subtotal6Amount,
  Item.StatisticalValueControl AS StatisticalValueControl,
  Item.ShippingPoint AS ShippingPoint,
  Item.EligibleAmountForCashDiscount AS EligibleAmountForCashDiscount,
  Item.BusinessArea AS BusinessArea,
  Item.WBSElementInternalID AS WBSElementInternalID,
  Item.ControllingArea AS ControllingArea,
  Item.ProfitabilitySegment_2 AS ProfitabilitySegment,
  Item.ProfitabilitySegment_2 AS ProfitabilitySegment_2,
  Item.OrderID AS OrderID,
  Item.CostCenter AS CostCenter,
  Item.OriginSDDocument AS OriginSDDocument,
  Item.PriceDetnExchangeRateDate AS ExchangeRateDate,
  Item.ReferenceSDDocument AS ReferenceSDDocument,
  Item.ReferenceSDDocumentItem AS ReferenceSDDocumentItem,
  Item.ReferenceSDDocumentCategory AS ReferenceSDDocumentCategory,
  Item.SalesDocument AS SalesDocument,
  Item.SalesDocumentItem AS SalesDocumentItem,
  Item.HigherLevelItem AS HigherLevelItem,
  Item.BillingDocumentItemInPartSgmt AS BillingDocumentItemInPartSgmt,
  Item.BaseUnit AS BaseUnit,
  Item._TransactionCurrency AS _TransactionCurrency,
  Item._SDDocumentCategory AS _SDDocumentCategory,
  Item._BillingDocumentCategory AS _BillingDocumentCategory,
  Item._BillingDocumentType AS _BillingDocumentType,
  Item._SalesOrganization AS _SalesOrganization,
  Item._DistributionChannel AS _DistributionChannel,
  Item._CustomerPriceGroup AS _CustomerPriceGroup,
  Item._CustomerGroup AS _CustomerGroup,
  Item._SalesDistrict AS _SalesDistrict,
  Item._OverallSDProcessStatus AS _OverallSDProcessStatus,
  Item._OverallBillingStatus AS _OverallBillingStatus,
  Item._SoldToParty AS _SoldToParty,
  Item._ShipToParty AS _ShipToParty,
  Item._BillToParty AS _BillToParty,
  Item._PayerParty AS _PayerParty,
  Item._SalesDocumentItemCategory AS _SalesDocumentItemCategory,
  Item._SalesDocumentItemType AS _SalesDocumentItemType,
  Item._CreatedByUser AS _CreatedByUser,
  Item._ReferenceLogicalSystem AS _LogicalSystem,
  Item._OrganizationDivision AS _OrganizationDivision,
  Item._Division AS _Division,
  Item._SalesOffice AS _SalesOffice,
  Item._Material AS _Material,
  Item._Product AS _Product,
  Item._MaterialText AS _MaterialText,
  Item._ProductText AS _ProductText,
  Item._OriginallyRequestedMaterial AS _OriginallyRequestedMaterial,
  Item._OriginallyRequestedMatlText AS _OriginallyRequestedMatlText,
  Item._PricingReferenceMaterial AS _PricingReferenceMaterial,
  Item._PricingReferenceMaterialText AS _PricingReferenceMaterialText,
  Item._Batch AS _Batch,
  Item._ProductHierarchyNode AS _ProductHierarchyNode,
  Item._MaterialGroup AS _MaterialGroup,
  Item._ProductGroup AS _ProductGroup,
  Item._MaterialGroupText AS _MaterialGroupText,
  Item._AdditionalMaterialGroup2 AS _AdditionalMaterialGroup2,
  Item._AdditionalMaterialGroup3 AS _AdditionalMaterialGroup3,
  Item._AdditionalMaterialGroup4 AS _AdditionalMaterialGroup4,
  Item._AdditionalMaterialGroup5 AS _AdditionalMaterialGroup5,
  Item._MaterialCommissionGroup AS _MaterialCommissionGroup,
  Item._Plant AS _Plant,
  Item._StorageLocation AS _StorageLocation,
  Item._BillingQuantityUnit AS _BillingQuantityUnit,
  Item._BaseUnit AS _BaseUnit,
  Item._ItemWeightUnit AS _ItemWeightUnit,
  Item._ItemVolumeUnit AS _ItemVolumeUnit,
  Item._BillToPartyCountry AS _BillToPartyCountry,
  Item._BillToPartyRegion AS _BillToPartyRegion,
  Item._BillingPlanRule AS _BillingPlanRule,
  Item._BusinessArea AS _BusinessArea,
  Item._BusinessAreaText AS _BusinessAreaText,
  Item._WBSElement AS _WBSElement,
  Item._WBSElementBasicData AS _WBSElementBasicData,
  Item._ControllingArea AS _ControllingArea,
  Item._CostCenter AS _CostCenter,
  Item._ReferenceSDDocumentCategory AS _ReferenceSDDocumentCategory,
  Item._SalesSDDocumentCategory AS _SalesSDDocumentCategory,
  Item._SalesGroup AS _SalesGroup,
  Item._SalesDocument AS _SalesDocument,
  Item._SalesDocumentItem AS _SalesDocumentItem,
  Item._HigherLevelItem AS _HigherLevelItem,
  Item._AdditionalCustomerGroup1 AS _AdditionalCustomerGroup1,
  Item._AdditionalCustomerGroup2 AS _AdditionalCustomerGroup2,
  Item._AdditionalCustomerGroup3 AS _AdditionalCustomerGroup3,
  Item._AdditionalCustomerGroup4 AS _AdditionalCustomerGroup4,
  Item._AdditionalCustomerGroup5 AS _AdditionalCustomerGroup5,
  Item._MainItemPricingRefMaterial AS _MainItemPricingRefMaterial,
  Item._SDDocumentReason AS _SDDocumentReason,
  Item._SalesDeal AS _SalesDeal,
  Item._ShippingPoint AS _ShippingPoint,
  Item._ShippingPointText AS _ShippingPointText,
  Item._StatisticalValueControl AS _StatisticalValueControl,
  Item._SalesEmployee_2 AS _SalesEmployee_2,
  Item._ResponsibleEmployee_2 AS _ResponsibleEmployee_2,
  Item._SolutionOrder AS _SolutionOrder,
  Item._SolutionOrderItem AS _SolutionOrderItem,
  _BillingDocument.LastChangeDate AS LastChangeDate,
  _BillingDocument.Country AS Country,
  _BillingDocument.Region AS Region,
  _BillingDocument.CityCode AS CityCode,
  _BillingDocument.County AS County_2,
  _BillingDocument.CreditControlArea AS CreditControlArea,
  _BillingDocument.BillingDocCombinationCriteria AS BillingDocCombinationCriteria,
  _BillingDocument.ManualInvoiceMaintIsRelevant AS ManualInvoiceMaintIsRelevant,
  _BillingDocument.PriceListType AS PriceListType,
  _BillingDocument.TaxDepartureCountry AS TaxDepartureCountry,
  _BillingDocument.VATRegistration AS VATRegistration,
  _BillingDocument.VATRegistrationOrigin AS VATRegistrationOrigin,
  _BillingDocument.VATRegistrationCountry AS VATRegistrationCountry,
  _BillingDocument.CustomerTaxClassification1 AS CustomerTaxClassification1,
  _BillingDocument.CustomerTaxClassification2 AS CustomerTaxClassification2,
  _BillingDocument.CustomerTaxClassification3 AS CustomerTaxClassification3,
  _BillingDocument.CustomerTaxClassification4 AS CustomerTaxClassification4,
  _BillingDocument.CustomerTaxClassification5 AS CustomerTaxClassification5,
  _BillingDocument.CustomerTaxClassification6 AS CustomerTaxClassification6,
  _BillingDocument.CustomerTaxClassification7 AS CustomerTaxClassification7,
  _BillingDocument.CustomerTaxClassification8 AS CustomerTaxClassification8,
  _BillingDocument.CustomerTaxClassification9 AS CustomerTaxClassification9,
  _BillingDocument.SDPricingProcedure AS SDPricingProcedure,
  _BillingDocument.ShippingCondition AS ShippingCondition,
  _BillingDocument.IncotermsVersion AS IncotermsVersion,
  _BillingDocument.IncotermsClassification AS IncotermsClassification,
  _BillingDocument.IncotermsTransferLocation AS IncotermsTransferLocation,
  _BillingDocument.IncotermsLocation1 AS IncotermsLocation1,
  _BillingDocument.IncotermsLocation2 AS IncotermsLocation2,
  _BillingDocument.ContractAccount AS ContractAccount,
  _BillingDocument.CustomerPaymentTerms AS CustomerPaymentTerms,
  _BillingDocument.PaymentMethod AS PaymentMethod,
  _BillingDocument.PaymentReference AS PaymentReference,
  _BillingDocument.FixedValueDate AS FixedValueDate,
  _BillingDocument.AdditionalValueDays AS AdditionalValueDays,
  _BillingDocument.CompanyCode AS CompanyCode,
  _BillingDocument.FiscalYear AS FiscalYear,
  _BillingDocument.FiscalPeriod AS FiscalPeriod,
  _BillingDocument.CustomerAccountAssignmentGroup AS CustomerAccountAssignmentGroup,
  _BillingDocument.AccountingExchangeRateIsSet AS AccountingExchangeRateIsSet,
  _BillingDocument.AccountingExchangeRate AS AccountingExchangeRate,
  _BillingDocument.ExchangeRateType AS ExchangeRateType,
  _BillingDocument.DunningArea AS DunningArea,
  _BillingDocument.DunningBlockingReason AS DunningBlockingReason,
  _BillingDocument.DunningKey AS DunningKey,
  _BillingDocument.InternalFinancialDocument AS InternalFinancialDocument,
  _BillingDocument.AccountingPostingStatus AS AccountingPostingStatus,
  _BillingDocument.InvoiceListStatus AS InvoiceListStatus,
  _BillingDocument._PriceListType AS _PriceListType,
  _BillingDocument._TaxDepartureCountry AS _TaxDepartureCountry,
  _BillingDocument._VATRegistrationOrigin AS _VATRegistrationOrigin,
  _BillingDocument._VATRegistrationCountry AS _VATRegistrationCountry,
  _BillingDocument._ShippingCondition AS _ShippingCondition,
  _BillingDocument._IncotermsClassification AS _IncotermsClassification,
  _BillingDocument._IncotermsVersion AS _IncotermsVersion,
  _BillingDocument._CustomerPaymentTerms AS _CustomerPaymentTerms,
  _BillingDocument._PaymentMethod AS _PaymentMethod,
  _BillingDocument._CompanyCode AS _CompanyCode,
  _BillingDocument._FiscalYear AS _FiscalYear,
  _BillingDocument._CustomerAccountAssgmtGroup AS _CustomerAccountAssgmtGroup,
  _BillingDocument._ExchangeRateType AS _ExchangeRateType,
  _BillingDocument._DunningArea AS _DunningArea,
  _BillingDocument._DunningAreaText AS _DunningAreaText,
  _BillingDocument._DunningBlockingReason AS _DunningBlockingReason,
  _BillingDocument._DunningKey AS _DunningKey,
  _BillingDocument._Country AS _Country,
  _BillingDocument._Region AS _Region,
  _BillingDocument._CityCode AS _CityCode,
  _BillingDocument._County AS _County,
  _BillingDocument._CreditControlArea AS _CreditControlArea,
  _BillingDocument._CreditControlAreaText AS _CreditControlAreaText,
  _BillingDocument._AccountingPostingStatus AS _AccountingPostingStatus,
  _BillingDocument._AccountingTransferStatus AS _AccountingTransferStatus,
  _BillingDocument._BillingIssueType AS _BillingIssueType,
  _BillingDocument._InvoiceListStatus AS _InvoiceListStatus,
  _BillingDocument._OvrlItmGeneralIncompletionSts AS _OvrlItmGeneralIncompletionSts,
  _BillingDocument._OverallPricingIncompletionSts AS _OverallPricingIncompletionSts,
  _SalesDocumentItemCategory.PropagatePrftbltySgmt2BOM AS PropagatePrftbltySgmt2BOM,
  _SalesDocumentItemCategory.CostDeterminationIsRequired AS CostDeterminationIsRequired
FROM I_BillingDocExtdItem AS Item
LEFT OUTER JOIN I_Currency AS _StatisticsCurrency ON StatisticsCurrency = _StatisticsCurrency.Currency  -- association [0..1]
LEFT OUTER JOIN I_MfgOrder AS _OrderID ON OrderID = _OrderID.ManufacturingOrder  -- association [0..1]
LEFT OUTER JOIN I_CustomerClassification AS _SoldToPartyClassification ON SoldToPartyClassification = _SoldToPartyClassification.CustomerClassification  -- association [0..1]
LEFT OUTER JOIN I_Globalcompany AS _GlobalCompany ON partnercompany = _GlobalCompany.Company  -- association [0..1]
LEFT OUTER JOIN I_TaxingCounty AS _County_2 ON country = _County_2.Country AND region = _County_2.Region AND County_2 = _County_2.TaxingCounty  -- association [0..1]
;