I_PrelimBillgDocItemAnalytics

DDL: I_PRELIMBILLGDOCITEMANALYTICS SQL: ISDPREBILDITMANA Type: view COMPOSITE

Preliminary Billing Document Item Analytics

I_PrelimBillgDocItemAnalytics is a Composite CDS View that provides data about "Preliminary Billing Document Item Analytics" in SAP S/4HANA. It reads from 1 data source (I_PrelimBillingDocumentItem) and exposes 252 fields with key fields PrelimBillingDocument, PrelimBillingDocumentItem. It has 3 associations to related views.

Data Sources (1)

SourceAliasJoin Type
I_PrelimBillingDocumentItem Item from

Associations (3)

CardinalityTargetAliasCondition
[0..1] I_Currency _StatisticsCurrency $projection.StatisticsCurrency = _StatisticsCurrency.Currency --AT19.11.2018 I_MFGOrder deprecated in meantime, so better do not use it ! --
[0..1] I_MfgOrder _OrderID $projection.orderid = _OrderID.ManufacturingOrder
[0..1] I_CustomerClassification _SoldToPartyClassification $projection.SoldToPartyClassification = _SoldToPartyClassification.CustomerClassification

Annotations (9)

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

Fields (252)

KeyFieldSource TableSource FieldDescription
KEY PrelimBillingDocument I_PrelimBillingDocumentItem PrelimBillingDocument
KEY PrelimBillingDocumentItem I_PrelimBillingDocumentItem PrelimBillingDocumentItem
SDDocumentCategory _PrelimBillingDocument SDDocumentCategory Document Cat.
BillingDocumentCategory _PrelimBillingDocument BillingDocumentCategory BillingCategory
BillingDocumentType _PrelimBillingDocument BillingDocumentType Billing Type
SalesDocumentItemCategory
SalesDocumentItemType
ReturnItemProcessingType
LastChangeDate _PrelimBillingDocument LastChangeDate Time Stamp
CreatedByUser I_PrelimBillingDocumentItem CreatedByUser User Name
CreatedByUserName
CreationDate I_PrelimBillingDocumentItem CreationDate Time Stamp
CreationTime
SoldToParty _PrelimBillingDocument SoldToParty Sold-to Party
SoldToPartyName
SoldToPartyClassification
PayerParty _PrelimBillingDocument PayerParty Payer
PayerPartyName
PartnerCompany _PrelimBillingDocument PartnerCompany Trading Partner
PurchaseOrderByCustomer _PrelimBillingDocument PurchaseOrderByCustomer Purchase Order Number
CustomerGroup _PrelimBillingDocument CustomerGroup Customer Group
SalesDistrict _PrelimBillingDocument SalesDistrict Sales District
Country _PrelimBillingDocument Country Venue: Ctry/Reg
Region _PrelimBillingDocument Region Venue Region
CityCode _PrelimBillingDocument CityCode IATA: City
County _PrelimBillingDocument County Wyoming County
CreditControlArea _PrelimBillingDocument CreditControlArea Credit Control Area
CustomerRebateAgreement
SalesGroup I_PrelimBillingDocumentItem SalesGroup Sales Group
AdditionalCustomerGroup1 I_PrelimBillingDocumentItem AdditionalCustomerGroup1 Customer Grp 1
AdditionalCustomerGroup2 I_PrelimBillingDocumentItem AdditionalCustomerGroup2 Customer Grp 2
AdditionalCustomerGroup3 I_PrelimBillingDocumentItem AdditionalCustomerGroup3 Customer Grp 3
AdditionalCustomerGroup4 I_PrelimBillingDocumentItem AdditionalCustomerGroup4 Customer Grp 4
AdditionalCustomerGroup5 I_PrelimBillingDocumentItem AdditionalCustomerGroup5 Customer Grp 5
SDDocumentReason I_PrelimBillingDocumentItem SDDocumentReason Order Reason
RetailPromotion
RebateBasisAmount I_PrelimBillingDocumentItem RebateBasisAmount Rebate Basis Amount
VolumeRebateGroup I_PrelimBillingDocumentItem VolumeRebateGroup Vol. Rebate Grp
ItemIsRelevantForCredit
CreditRelatedPrice I_PrelimBillingDocumentItem CreditRelatedPrice
SalesDeal I_PrelimBillingDocumentItem SalesDeal
SalesDealDescription
SalesPromotion
SalesOrganization _PrelimBillingDocument SalesOrganization Sales Organization
DistributionChannel _PrelimBillingDocument DistributionChannel RefDistCh-Cust/Mat.
OrganizationDivision
Division I_PrelimBillingDocumentItem Division Internal Division ID
SalesOffice I_PrelimBillingDocumentItem SalesOffice Sales Office
Material I_PrelimBillingDocumentItem Material Vehicle Model
OriginallyRequestedMaterial I_PrelimBillingDocumentItem OriginallyRequestedMaterial
InternationalArticleNumber I_PrelimBillingDocumentItem InternationalArticleNumber EAN/UPC
PricingReferenceMaterial I_PrelimBillingDocumentItem PricingReferenceMaterial Pr. Ref. Matl
Batch I_PrelimBillingDocumentItem Batch Lot No.
ProductHierarchyNode I_PrelimBillingDocumentItem ProductHierarchyNode Prod. Hierarchy
MaterialGroup I_PrelimBillingDocumentItem MaterialGroup Product Group
AdditionalMaterialGroup1 I_PrelimBillingDocumentItem AdditionalMaterialGroup1 MaterialGroup 1
AdditionalMaterialGroup2 I_PrelimBillingDocumentItem AdditionalMaterialGroup2 MaterialGroup 2
AdditionalMaterialGroup3 I_PrelimBillingDocumentItem AdditionalMaterialGroup3 MaterialGroup 3
AdditionalMaterialGroup4 I_PrelimBillingDocumentItem AdditionalMaterialGroup4 MaterialGroup 4
AdditionalMaterialGroup5 I_PrelimBillingDocumentItem AdditionalMaterialGroup5 MaterialGroup 5
MaterialCommissionGroup I_PrelimBillingDocumentItem MaterialCommissionGroup
Plant I_PrelimBillingDocumentItem Plant Valuation Area
PlantName
StorageLocation I_PrelimBillingDocumentItem StorageLocation StorageLocation
StorageLocationName
BillingDocumentDate _PrelimBillingDocument BillingDocumentDate Billing Date
ForeignTrade
IsExportDelivery
BillingDocCombinationCriteria _PrelimBillingDocument BillingDocCombinationCriteria
BillingDocumentItemText
ServicesRenderedDate I_PrelimBillingDocumentItem ServicesRenderedDate Services Rendered Date
BillingQuantity I_PrelimBillingDocumentItem BillingQuantity Invoiced Qty
BillingQuantityUnit I_PrelimBillingDocumentItem BillingQuantityUnit Sales Unit
BillingQuantityInBaseUnit I_PrelimBillingDocumentItem BillingQuantityInBaseUnit Bill.Qty in SKU
MRPRequiredQuantityInBaseUnit I_PrelimBillingDocumentItem MRPRequiredQuantityInBaseUnit Open Quantity
BillingToBaseQuantityDnmntr I_PrelimBillingDocumentItem BillingToBaseQuantityDnmntr
BillingToBaseQuantityNmrtr I_PrelimBillingDocumentItem BillingToBaseQuantityNmrtr
ItemGrossWeight I_PrelimBillingDocumentItem ItemGrossWeight Gross Weight
ItemNetWeight I_PrelimBillingDocumentItem ItemNetWeight Net Weight
ItemWeightUnit I_PrelimBillingDocumentItem ItemWeightUnit Unit of Weight
ItemVolume I_PrelimBillingDocumentItem ItemVolume Volume
ItemVolumeUnit I_PrelimBillingDocumentItem ItemVolumeUnit Volume Unit
BillToPartyCountry I_PrelimBillingDocumentItem BillToPartyCountry Dst.CtryRg.Ord.
BillToPartyRegion I_PrelimBillingDocumentItem BillToPartyRegion Region Order
BillingPlanRule I_PrelimBillingDocumentItem BillingPlanRule
BillingPlan I_PrelimBillingDocumentItem BillingPlan Bill. Plan No.
BillingPlanItem
CustomerPriceGroup _PrelimBillingDocument CustomerPriceGroup CustPrice Group
PriceListType _PrelimBillingDocument PriceListType Price List Tp.
TaxDepartureCountry _PrelimBillingDocument TaxDepartureCountry Tx Dep Ctry/Reg
VATRegistration _PrelimBillingDocument VATRegistration VAT Registration No.
VATRegistrationOrigin _PrelimBillingDocument VATRegistrationOrigin OriginSlsTxNo.
VATRegistrationCountry _PrelimBillingDocument VATRegistrationCountry CtryRgnSlsTxNo.
CustomerTaxClassification1 _PrelimBillingDocument CustomerTaxClassification1
CustomerTaxClassification2 _PrelimBillingDocument CustomerTaxClassification2
CustomerTaxClassification3 _PrelimBillingDocument CustomerTaxClassification3
CustomerTaxClassification4 _PrelimBillingDocument CustomerTaxClassification4
CustomerTaxClassification5 _PrelimBillingDocument CustomerTaxClassification5
CustomerTaxClassification6 _PrelimBillingDocument CustomerTaxClassification6
CustomerTaxClassification7 _PrelimBillingDocument CustomerTaxClassification7
CustomerTaxClassification8 _PrelimBillingDocument CustomerTaxClassification8
CustomerTaxClassification9 _PrelimBillingDocument CustomerTaxClassification9
SDPricingProcedure _PrelimBillingDocument SDPricingProcedure Pric. Procedure
ItemGrossAmountOfBillingDoc I_PrelimBillingDocumentItem GrossAmount Gross value
PricingDate I_PrelimBillingDocumentItem PricingDate Pricing Date
PriceDetnExchangeRate I_PrelimBillingDocumentItem PriceDetnExchangeRate Exchange Rate
PricingScaleQuantityInBaseUnit I_PrelimBillingDocumentItem PricingScaleQuantityInBaseUnit
TaxAmount I_PrelimBillingDocumentItem TaxAmount Tax Amt in Rptg Crcy
CostAmount I_PrelimBillingDocumentItem CostAmount
Subtotal1Amount I_PrelimBillingDocumentItem Subtotal1Amount Subtotal 1 Amount
Subtotal2Amount I_PrelimBillingDocumentItem Subtotal2Amount Subtotal 2 Amount
Subtotal3Amount I_PrelimBillingDocumentItem Subtotal3Amount Subtotal 3 Amount
Subtotal4Amount I_PrelimBillingDocumentItem Subtotal4Amount Subtotal 4 Amount
Subtotal5Amount I_PrelimBillingDocumentItem Subtotal5Amount Subtotal 5 Amount
Subtotal6Amount I_PrelimBillingDocumentItem Subtotal6Amount Subtotal 6 Amount
StatisticalValueControl I_PrelimBillingDocumentItem StatisticalValueControl
ShippingCondition _PrelimBillingDocument ShippingCondition Shipping Conditions
IncotermsVersion _PrelimBillingDocument IncotermsVersion Inco. Version
IncotermsClassification _PrelimBillingDocument IncotermsClassification Incoterms
IncotermsTransferLocation _PrelimBillingDocument IncotermsTransferLocation Incoterms 2
IncotermsLocation1 _PrelimBillingDocument IncotermsLocation1 Inco. Location1
IncotermsLocation2 _PrelimBillingDocument IncotermsLocation2 Inco. Location2
ShippingPoint I_PrelimBillingDocumentItem ShippingPoint Shipping Point
ContractAccount _PrelimBillingDocument ContractAccount Contract Acct
CustomerPaymentTerms _PrelimBillingDocument CustomerPaymentTerms Pyt Terms
PaymentMethod _PrelimBillingDocument PaymentMethod Pymt Meth.
PaymentMethodName
PaymentReference _PrelimBillingDocument PaymentReference Payment Reference
FixedValueDate _PrelimBillingDocument FixedValueDate Fixed Val. Date
AdditionalValueDays _PrelimBillingDocument AdditionalValueDays Add. Value Days
EligibleAmountForCashDiscount I_PrelimBillingDocumentItem EligibleAmountForCashDiscount
CompanyCode _PrelimBillingDocument CompanyCode Receiver Company Code
CompanyCodeName
CustomerAccountAssignmentGroup _PrelimBillingDocument CustomerAccountAssignmentGroup AccAssmtGrpCust
ExchangeRateType _PrelimBillingDocument ExchangeRateType Exch. Rate Type
DocumentReferenceID
AssignmentReference
DunningArea _PrelimBillingDocument DunningArea Dunning Area
DunningBlockingReason _PrelimBillingDocument DunningBlockingReason Set Dunning Block
DunningKey _PrelimBillingDocument DunningKey Dunning Key
BusinessArea I_PrelimBillingDocumentItem BusinessArea Business Area
ProfitCenter I_PrelimBillingDocumentItem ProfitCenter Profit Center
WBSElement
Luckily
However
ControllingArea
ControllingAreaName
ProfitabilitySegment I_PrelimBillingDocumentItem ProfitabilitySegment Profitability Segment
ProfitabilitySegment_2 I_PrelimBillingDocumentItem ProfitabilitySegment_2 Profit. segment
2018I_MFGOrderdeprecatedinmeantime
OrderID
CostCenter I_PrelimBillingDocumentItem CostCenter Cost Center
OriginSDDocument I_PrelimBillingDocumentItem OriginSDDocument Originating Doc
OriginSDDocumentItem
ExchangeRateDate I_PrelimBillingDocumentItem PriceDetnExchangeRateDate
ReferenceSDDocument I_PrelimBillingDocumentItem ReferenceSDDocument Reference Doc.
ReferenceSDDocumentItem I_PrelimBillingDocumentItem ReferenceSDDocumentItem Reference Item
ReferenceSDDocumentCategory I_PrelimBillingDocumentItem ReferenceSDDocumentCategory Prec.Doc.Categ.
SalesDocument I_PrelimBillingDocumentItem SalesDocument SD Document
SalesDocumentItem I_PrelimBillingDocumentItem SalesDocumentItem Sales Document Item
SalesSDDocumentCategory
HigherLevelItem I_PrelimBillingDocumentItem HigherLevelItem Higher-Lev.Item
BillingDocumentItemInPartSgmt I_PrelimBillingDocumentItem BillingDocumentItemInPartSgmt
OverallSDProcessStatus
BillingIssueType
OvrlItmGeneralIncompletionSts
OverallPricingIncompletionSts
TransactionCurrency
StatisticsCurrency
NetAmountasItemNetAmountOfBillingDoc
BaseUnit I_PrelimBillingDocumentItem BaseUnit Unit of Measure
_StatisticsCurrency _StatisticsCurrency
_TransactionCurrency I_PrelimBillingDocumentItem _TransactionCurrency
_SoldToPartyClassification _SoldToPartyClassification
_PrelimBillingDocument _PrelimBillingDocument
_BillingDocument
_SDDocumentCategory _PrelimBillingDocument _SDDocumentCategory
_BillingDocumentCategory _PrelimBillingDocument _BillingDocumentCategory
_BillingDocumentType _PrelimBillingDocument _BillingDocumentType
_SalesOrganization _PrelimBillingDocument _SalesOrganization
_DistributionChannel _PrelimBillingDocument _DistributionChannel
_CustomerPriceGroup _PrelimBillingDocument _CustomerPriceGroup
_PriceListType _PrelimBillingDocument _PriceListType
_TaxDepartureCountry _PrelimBillingDocument _TaxDepartureCountry
_VATRegistrationOrigin _PrelimBillingDocument _VATRegistrationOrigin
_VATRegistrationCountry _PrelimBillingDocument _VATRegistrationCountry
_ShippingCondition _PrelimBillingDocument _ShippingCondition
_IncotermsClassification _PrelimBillingDocument _IncotermsClassification
_IncotermsVersion _PrelimBillingDocument _IncotermsVersion
_CustomerPaymentTerms _PrelimBillingDocument _CustomerPaymentTerms
_PaymentMethod _PrelimBillingDocument _PaymentMethod
_CompanyCode _PrelimBillingDocument _CompanyCode
_CustomerAccountAssgmtGroup _PrelimBillingDocument _CustomerAccountAssgmtGroup
_ExchangeRateType _PrelimBillingDocument _ExchangeRateType
_DunningArea _PrelimBillingDocument _DunningArea
_DunningBlockingReason _PrelimBillingDocument _DunningBlockingReason
_DunningKey _PrelimBillingDocument _DunningKey
_CustomerGroup _PrelimBillingDocument _CustomerGroup
_Country _PrelimBillingDocument _Country
_Region _PrelimBillingDocument _Region
_CityCode _PrelimBillingDocument _CityCode
_SalesDistrict _PrelimBillingDocument _SalesDistrict
_CreditControlArea _PrelimBillingDocument _CreditControlArea
_OverallSDProcessStatus _PrelimBillingDocument _OverallSDProcessStatus
_BillingIssueType _PrelimBillingDocument _BillingIssueType
_OvrlItmGeneralIncompletionSts _PrelimBillingDocument _OvrlItmGeneralIncompletionSts
_OverallPricingIncompletionSts _PrelimBillingDocument _OverallPricingIncompletionSts
_SoldToParty _PrelimBillingDocument _SoldToParty
_PayerParty _PrelimBillingDocument _PayerParty
_SalesDocumentItemCategory I_PrelimBillingDocumentItem _SalesDocumentItemCategory
_SalesDocumentItemType I_PrelimBillingDocumentItem _SalesDocumentItemType
_CreatedByUser I_PrelimBillingDocumentItem _CreatedByUser
_OrganizationDivision I_PrelimBillingDocumentItem _OrganizationDivision
_Division I_PrelimBillingDocumentItem _Division
_SalesOffice I_PrelimBillingDocumentItem _SalesOffice
_Material I_PrelimBillingDocumentItem _Material
_OriginallyRequestedMaterial I_PrelimBillingDocumentItem _OriginallyRequestedMaterial
_PricingReferenceMaterial I_PrelimBillingDocumentItem _PricingReferenceMaterial
_ProductHierarchyNode I_PrelimBillingDocumentItem _ProductHierarchyNode
_MaterialGroup I_PrelimBillingDocumentItem _MaterialGroup
_AdditionalMaterialGroup1 I_PrelimBillingDocumentItem _AdditionalMaterialGroup1
_AdditionalMaterialGroup2 I_PrelimBillingDocumentItem _AdditionalMaterialGroup2
_AdditionalMaterialGroup3 I_PrelimBillingDocumentItem _AdditionalMaterialGroup3
_AdditionalMaterialGroup4 I_PrelimBillingDocumentItem _AdditionalMaterialGroup4
_AdditionalMaterialGroup5 I_PrelimBillingDocumentItem _AdditionalMaterialGroup5
_MaterialCommissionGroup I_PrelimBillingDocumentItem _MaterialCommissionGroup
_Plant I_PrelimBillingDocumentItem _Plant
_StorageLocation I_PrelimBillingDocumentItem _StorageLocation
_BillingQuantityUnit I_PrelimBillingDocumentItem _BillingQuantityUnit
_BaseUnit I_PrelimBillingDocumentItem _BaseUnit
_ItemWeightUnit I_PrelimBillingDocumentItem _ItemWeightUnit
_ItemVolumeUnit I_PrelimBillingDocumentItem _ItemVolumeUnit
_BillToPartyCountry I_PrelimBillingDocumentItem _BillToPartyCountry
_BillToPartyRegion I_PrelimBillingDocumentItem _BillToPartyRegion
_BillingPlanRule I_PrelimBillingDocumentItem _BillingPlanRule
_BusinessArea I_PrelimBillingDocumentItem _BusinessArea
_ControllingArea I_PrelimBillingDocumentItem _ControllingArea
2018I_MFGOrderdeprecatedinmeantime
sobetterdonotuseit_OrderID
_CostCenter I_PrelimBillingDocumentItem _CostCenter
_ReferenceSDDocumentCategory I_PrelimBillingDocumentItem _ReferenceSDDocumentCategory
_SalesSDDocumentCategory I_PrelimBillingDocumentItem _SalesSDDocumentCategory
_SalesGroup I_PrelimBillingDocumentItem _SalesGroup
_AdditionalCustomerGroup1 I_PrelimBillingDocumentItem _AdditionalCustomerGroup1
_AdditionalCustomerGroup2 I_PrelimBillingDocumentItem _AdditionalCustomerGroup2
_AdditionalCustomerGroup3 I_PrelimBillingDocumentItem _AdditionalCustomerGroup3
_AdditionalCustomerGroup4 I_PrelimBillingDocumentItem _AdditionalCustomerGroup4
_AdditionalCustomerGroup5 I_PrelimBillingDocumentItem _AdditionalCustomerGroup5
_SDDocumentReason I_PrelimBillingDocumentItem _SDDocumentReason
_SalesDeal I_PrelimBillingDocumentItem _SalesDeal
_ShippingPoint I_PrelimBillingDocumentItem _ShippingPoint
_StatisticalValueControl I_PrelimBillingDocumentItem _StatisticalValueControl

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_PrelimBillgDocItemAnalytics.
-- 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.
-- SQL view name: ISDPREBILDITMANA

CREATE VIEW I_PrelimBillgDocItemAnalytics AS
SELECT
  Item.PrelimBillingDocument AS PrelimBillingDocument,
  Item.PrelimBillingDocumentItem AS PrelimBillingDocumentItem,
  _PrelimBillingDocument.SDDocumentCategory AS SDDocumentCategory,
  _PrelimBillingDocument.BillingDocumentCategory AS BillingDocumentCategory,
  _PrelimBillingDocument.BillingDocumentType AS BillingDocumentType,
  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,
  _PrelimBillingDocument.LastChangeDate AS LastChangeDate,
  Item.CreatedByUser AS CreatedByUser,
  Item._CreatedByUser.UserDescription AS CreatedByUserName,
  Item.CreationDate AS CreationDate,
  cast( Item.CreationTime as creation_time ) AS CreationTime,
  _PrelimBillingDocument.SoldToParty AS SoldToParty,
  cast(_PrelimBillingDocument._SoldToParty.CustomerName as vdm_sold_to_name ) AS SoldToPartyName,
  _PrelimBillingDocument._SoldToParty.CustomerClassification AS SoldToPartyClassification,
  _PrelimBillingDocument.PayerParty AS PayerParty,
  cast(_PrelimBillingDocument._PayerParty.CustomerName as payer_name) AS PayerPartyName,
  _PrelimBillingDocument.PartnerCompany AS PartnerCompany,
  _PrelimBillingDocument.PurchaseOrderByCustomer AS PurchaseOrderByCustomer,
  _PrelimBillingDocument.CustomerGroup AS CustomerGroup,
  _PrelimBillingDocument.SalesDistrict AS SalesDistrict,
  _PrelimBillingDocument.Country AS Country,
  _PrelimBillingDocument.Region AS Region,
  _PrelimBillingDocument.CityCode AS CityCode,
  _PrelimBillingDocument.County AS County,
  _PrelimBillingDocument.CreditControlArea AS CreditControlArea,
  cast(_PrelimBillingDocument.CustomerRebateAgreement as customer_rebate_agreement) AS CustomerRebateAgreement,
  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,
  cast(Item.RetailPromotion as retail_promotion) AS RetailPromotion,
  Item.RebateBasisAmount AS RebateBasisAmount,
  Item.VolumeRebateGroup AS VolumeRebateGroup,
  cast(Item.ItemIsRelevantForCredit as credit_check_relevant_item) AS ItemIsRelevantForCredit,
  Item.CreditRelatedPrice AS CreditRelatedPrice,
  Item.SalesDeal AS SalesDeal,
  cast(Item._SalesDeal.SalesDealDescription as sales_deal_description) AS SalesDealDescription,
  cast(Item.SalesPromotion as sales_promotion) AS SalesPromotion,
  _PrelimBillingDocument.SalesOrganization AS SalesOrganization,
  _PrelimBillingDocument.DistributionChannel AS DistributionChannel,
  cast(Item.OrganizationDivision as organization_division preserving type) AS OrganizationDivision,
  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.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._Plant.PlantName AS PlantName,
  Item.StorageLocation AS StorageLocation,
  Item._StorageLocation.StorageLocationName AS StorageLocationName,
  _PrelimBillingDocument.BillingDocumentDate AS BillingDocumentDate,
  cast('' as exnum) AS ForeignTrade,
  cast('' as export_delivery_flag) AS IsExportDelivery,
  _PrelimBillingDocument.BillingDocCombinationCriteria AS BillingDocCombinationCriteria,
  cast(Item.BillingDocumentItemText as billing_document_item_desc ) AS BillingDocumentItemText,
  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,
  cast(Item.BillingPlanItem as billing_plan_item) AS BillingPlanItem,
  _PrelimBillingDocument.CustomerPriceGroup AS CustomerPriceGroup,
  _PrelimBillingDocument.PriceListType AS PriceListType,
  _PrelimBillingDocument.TaxDepartureCountry AS TaxDepartureCountry,
  _PrelimBillingDocument.VATRegistration AS VATRegistration,
  _PrelimBillingDocument.VATRegistrationOrigin AS VATRegistrationOrigin,
  _PrelimBillingDocument.VATRegistrationCountry AS VATRegistrationCountry,
  _PrelimBillingDocument.CustomerTaxClassification1 AS CustomerTaxClassification1,
  _PrelimBillingDocument.CustomerTaxClassification2 AS CustomerTaxClassification2,
  _PrelimBillingDocument.CustomerTaxClassification3 AS CustomerTaxClassification3,
  _PrelimBillingDocument.CustomerTaxClassification4 AS CustomerTaxClassification4,
  _PrelimBillingDocument.CustomerTaxClassification5 AS CustomerTaxClassification5,
  _PrelimBillingDocument.CustomerTaxClassification6 AS CustomerTaxClassification6,
  _PrelimBillingDocument.CustomerTaxClassification7 AS CustomerTaxClassification7,
  _PrelimBillingDocument.CustomerTaxClassification8 AS CustomerTaxClassification8,
  _PrelimBillingDocument.CustomerTaxClassification9 AS CustomerTaxClassification9,
  _PrelimBillingDocument.SDPricingProcedure AS SDPricingProcedure,
  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,
  _PrelimBillingDocument.ShippingCondition AS ShippingCondition,
  _PrelimBillingDocument.IncotermsVersion AS IncotermsVersion,
  _PrelimBillingDocument.IncotermsClassification AS IncotermsClassification,
  _PrelimBillingDocument.IncotermsTransferLocation AS IncotermsTransferLocation,
  _PrelimBillingDocument.IncotermsLocation1 AS IncotermsLocation1,
  _PrelimBillingDocument.IncotermsLocation2 AS IncotermsLocation2,
  Item.ShippingPoint AS ShippingPoint,
  _PrelimBillingDocument.ContractAccount AS ContractAccount,
  _PrelimBillingDocument.CustomerPaymentTerms AS CustomerPaymentTerms,
  _PrelimBillingDocument.PaymentMethod AS PaymentMethod,
  _PrelimBillingDocument._PaymentMethod.PaymentMethodName AS PaymentMethodName,
  _PrelimBillingDocument.PaymentReference AS PaymentReference,
  _PrelimBillingDocument.FixedValueDate AS FixedValueDate,
  _PrelimBillingDocument.AdditionalValueDays AS AdditionalValueDays,
  Item.EligibleAmountForCashDiscount AS EligibleAmountForCashDiscount,
  _PrelimBillingDocument.CompanyCode AS CompanyCode,
  _PrelimBillingDocument._CompanyCode.CompanyCodeName AS CompanyCodeName,
  _PrelimBillingDocument.CustomerAccountAssignmentGroup AS CustomerAccountAssignmentGroup,
  _PrelimBillingDocument.ExchangeRateType AS ExchangeRateType,
  cast(_PrelimBillingDocument.DocumentReferenceID as document_reference_id) AS DocumentReferenceID,
  cast(_PrelimBillingDocument.AssignmentReference as assignment_reference) AS AssignmentReference,
  _PrelimBillingDocument.DunningArea AS DunningArea,
  _PrelimBillingDocument.DunningBlockingReason AS DunningBlockingReason,
  _PrelimBillingDocument.DunningKey AS DunningKey,
  Item.BusinessArea AS BusinessArea,
  Item.ProfitCenter AS ProfitCenter,
  not used for current usages of THIS model. However AS However,
  where it is used !!! Item.ControllingArea AS ControllingArea,
  Item._ControllingArea.ControllingAreaName AS ControllingAreaName,
  Item.ProfitabilitySegment AS ProfitabilitySegment,
  Item.ProfitabilitySegment_2 AS ProfitabilitySegment_2,
  so better do not use it ! AS OrderID,
  Item.CostCenter AS CostCenter,
  Item.OriginSDDocument AS OriginSDDocument,
  cast(Item.OriginSDDocumentItem as origin_sd_document_item) AS OriginSDDocumentItem,
  Item.PriceDetnExchangeRateDate AS ExchangeRateDate,
  Item.ReferenceSDDocument AS ReferenceSDDocument,
  Item.ReferenceSDDocumentItem AS ReferenceSDDocumentItem,
  Item.ReferenceSDDocumentCategory AS ReferenceSDDocumentCategory,
  Item.SalesDocument AS SalesDocument,
  Item.SalesDocumentItem AS SalesDocumentItem,
  cast(Item.SalesSDDocumentCategory as sales_sd_doc_category preserving type ) AS SalesSDDocumentCategory,
  Item.HigherLevelItem AS HigherLevelItem,
  Item.BillingDocumentItemInPartSgmt AS BillingDocumentItemInPartSgmt,
  cast(_PrelimBillingDocument.OverallSDProcessStatus as overall_sd_process_status preserving type ) AS OverallSDProcessStatus,
  cast( _PrelimBillingDocument.BillingIssueType as billing_issue_type preserving type ) AS BillingIssueType,
  cast(_PrelimBillingDocument.OvrlItmGeneralIncompletionSts as itms_ovrl_incompletion_status preserving type ) AS OvrlItmGeneralIncompletionSts,
  cast(_PrelimBillingDocument.OverallPricingIncompletionSts as ovrl_pricing_incompletion_sts preserving type) AS OverallPricingIncompletionSts,
  _PrelimBillingDocument._SalesOrganization.SalesOrganizationCurrency AS StatisticsCurrency,
  Item.BaseUnit AS BaseUnit,
  Item._TransactionCurrency AS _TransactionCurrency,
  _PrelimBillingDocument._SDDocumentCategory AS _SDDocumentCategory,
  _PrelimBillingDocument._BillingDocumentCategory AS _BillingDocumentCategory,
  _PrelimBillingDocument._BillingDocumentType AS _BillingDocumentType,
  _PrelimBillingDocument._SalesOrganization AS _SalesOrganization,
  _PrelimBillingDocument._DistributionChannel AS _DistributionChannel,
  _PrelimBillingDocument._CustomerPriceGroup AS _CustomerPriceGroup,
  _PrelimBillingDocument._PriceListType AS _PriceListType,
  _PrelimBillingDocument._TaxDepartureCountry AS _TaxDepartureCountry,
  _PrelimBillingDocument._VATRegistrationOrigin AS _VATRegistrationOrigin,
  _PrelimBillingDocument._VATRegistrationCountry AS _VATRegistrationCountry,
  _PrelimBillingDocument._ShippingCondition AS _ShippingCondition,
  _PrelimBillingDocument._IncotermsClassification AS _IncotermsClassification,
  _PrelimBillingDocument._IncotermsVersion AS _IncotermsVersion,
  _PrelimBillingDocument._CustomerPaymentTerms AS _CustomerPaymentTerms,
  _PrelimBillingDocument._PaymentMethod AS _PaymentMethod,
  _PrelimBillingDocument._CompanyCode AS _CompanyCode,
  _PrelimBillingDocument._CustomerAccountAssgmtGroup AS _CustomerAccountAssgmtGroup,
  _PrelimBillingDocument._ExchangeRateType AS _ExchangeRateType,
  _PrelimBillingDocument._DunningArea AS _DunningArea,
  _PrelimBillingDocument._DunningBlockingReason AS _DunningBlockingReason,
  _PrelimBillingDocument._DunningKey AS _DunningKey,
  _PrelimBillingDocument._CustomerGroup AS _CustomerGroup,
  _PrelimBillingDocument._Country AS _Country,
  _PrelimBillingDocument._Region AS _Region,
  _PrelimBillingDocument._CityCode AS _CityCode,
  _PrelimBillingDocument._SalesDistrict AS _SalesDistrict,
  _PrelimBillingDocument._CreditControlArea AS _CreditControlArea,
  _PrelimBillingDocument._OverallSDProcessStatus AS _OverallSDProcessStatus,
  _PrelimBillingDocument._BillingIssueType AS _BillingIssueType,
  _PrelimBillingDocument._OvrlItmGeneralIncompletionSts AS _OvrlItmGeneralIncompletionSts,
  _PrelimBillingDocument._OverallPricingIncompletionSts AS _OverallPricingIncompletionSts,
  _PrelimBillingDocument._SoldToParty AS _SoldToParty,
  _PrelimBillingDocument._PayerParty AS _PayerParty,
  Item._SalesDocumentItemCategory AS _SalesDocumentItemCategory,
  Item._SalesDocumentItemType AS _SalesDocumentItemType,
  Item._CreatedByUser AS _CreatedByUser,
  Item._OrganizationDivision AS _OrganizationDivision,
  Item._Division AS _Division,
  Item._SalesOffice AS _SalesOffice,
  Item._Material AS _Material,
  Item._OriginallyRequestedMaterial AS _OriginallyRequestedMaterial,
  Item._PricingReferenceMaterial AS _PricingReferenceMaterial,
  Item._ProductHierarchyNode AS _ProductHierarchyNode,
  Item._MaterialGroup AS _MaterialGroup,
  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._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._ControllingArea AS _ControllingArea,
  so better do not use it ! AS sobetterdonotuseit_OrderID,
  Item._CostCenter AS _CostCenter,
  Item._ReferenceSDDocumentCategory AS _ReferenceSDDocumentCategory,
  Item._SalesSDDocumentCategory AS _SalesSDDocumentCategory,
  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._SalesDeal AS _SalesDeal,
  Item._ShippingPoint AS _ShippingPoint,
  Item._StatisticalValueControl AS _StatisticalValueControl
FROM I_PrelimBillingDocumentItem 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]
;