I_PurchasingDocumentHistoryBsc

DDL: I_PURCHASINGDOCUMENTHISTORYBSC SQL: IMMPURDOCHISB Type: view BASIC

History per Purchasing Document Item

I_PurchasingDocumentHistoryBsc is a Basic CDS View that provides data about "History per Purchasing Document Item" in SAP S/4HANA. It reads from 1 data source (ekbe) and exposes 64 fields with key fields PurchasingDocument, PurchasingDocumentItem, AccountAssignmentNumber, PurchasingHistoryDocumentType, PurchasingHistoryDocumentYear. It has 9 associations to related views.

Data Sources (1)

SourceAliasJoin Type
ekbe ekbe from

Associations (9)

CardinalityTargetAliasCondition
[1..1] I_PurchasingDocument _PurchasingDocument $projection.PurchasingDocument = _PurchasingDocument.PurchasingDocument
[1..1] I_PurchasingDocumentItem _PurchasingDocumentItem $projection.PurchasingDocument = _PurchasingDocumentItem.PurchasingDocument and $projection.PurchasingDocumentItem = _PurchasingDocumentItem.PurchasingDocumentItem
[1..1] I_UnitOfMeasure _OrderQuantityUnit $projection.orderquantityunit = _OrderQuantityUnit.UnitOfMeasure
[1..1] I_UnitOfMeasure _OrderPriceUnit $projection.orderpriceunit = _OrderPriceUnit.UnitOfMeasure
[1..1] I_UnitOfMeasure _DeliveryQuantityUnit $projection.DeliveryQuantityUnit = _DeliveryQuantityUnit.UnitOfMeasure
[1..1] I_UnitOfMeasure _BaseUnit $projection.baseunit = _BaseUnit.UnitOfMeasure
[1..1] I_Currency _Currency $projection.Currency = _Currency.Currency
[1..1] I_Currency _CompanyCodeCurrency $projection.CompanyCodeCurrency = _CompanyCodeCurrency.Currency
[1..1] I_Currency _PurchasingDocumentCurrency $projection.PurchasingDocumentCurrency = _PurchasingDocumentCurrency.Currency

Annotations (12)

NameValueLevelField
AbapCatalog.preserveKey true view
ClientHandling.algorithm #SESSION_VARIABLE view
AbapCatalog.sqlViewName IMMPURDOCHISB view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #PRIVILEGED_ONLY view
EndUserText.label History per Purchasing Document Item view
VDM.viewType #BASIC view
Metadata.ignorePropagatedAnnotations true view
ObjectModel.usageType.serviceQuality #A view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
VDM.lifecycle.contract.type #SAP_INTERNAL_API view

Fields (64)

KeyFieldSource TableSource FieldDescription
KEY PurchasingDocument ekbe ebeln Source PurchDoc
KEY PurchasingDocumentItem ekbe ebelp Item pur. doc.
KEY AccountAssignmentNumber ekbe zekkn Account Assgmt No.
KEY PurchasingHistoryDocumentType ekbe vgabe Transact. Type
KEY PurchasingHistoryDocumentYear ekbe gjahr Settlement Year
KEY PurchasingHistoryDocument ekbe belnr SD Document
KEY PurchasingHistoryDocumentItem ekbe buzei Posting View Item
PurchasingHistoryCategory ekbe bewtp PO History Cat.
GoodsMovementType ekbe bwart Valuation Type
PostingDate ekbe budat Posting Date
Currency ekbe waers Transaction Currency
DebitCreditCode ekbe shkzg Returns
IsCompletelyDelivered ekbe elikz Delivery Completion
ReferenceDocumentFiscalYear ekbe lfgja Year Cur.Period
InvtryMgmtReferenceDocument ekbe lfbnr Reference Doc.
InvtryMgmtRefDocumentItem ekbe lfpos Ref. Doc. Item
Material ekbe matnr Vehicle Model
Plant ekbe werks Receiving Plant
RvslOfGoodsReceiptIsAllowed ekbe xwsbr RevGR desp. IR
PricingDocument ekbe knumv Doc. Condition
TaxCode ekbe mwskz Tax Code
DocumentDate ekbe bldat Journal Entry Date
CreatedByUser ekbe ernam User Name
InventoryValuationType ekbe bwtar Valuation Type
DocumentReferenceID ekbe xblnr Reference
DeliveryQuantityUnit ekbe lsmeh Del. Note Unit
ManufacturerMaterial ekbe ematn MPN: Material
AccountingDocumentCreationDate ekbe cpudt Imported On
PurgHistDocumentCreationTime ekbe cputm Time
Quantity ekbe menge WarrCountValue
PurOrdAmountInCompanyCodeCrcy ekbe dmbtr Loc. amount
PurchaseOrderAmount ekbe wrbtr Gross Amount
QtyInPurchaseOrderPriceUnit ekbe bpmng Qty. in OPUn
GRIRAcctClrgAmtInCoCodeCrcy ekbe arewr Ord.GRIR.Val
GdsRcptBlkdStkQtyInOrdQtyUnit ekbe wesbs GR Bl.St. OUn
GdsRcptBlkdStkQtyInOrdPrcUnit ekbe bpwes GR blocked stck
InvoiceAmtInCoCodeCrcy ekbe reewr Ord.Set.Value
ShipgInstrnSupplierCompliance ekbe evere Compliance
InvoiceAmountInFrgnCurrency ekbe refwr Inv.Value in FC
QuantityInDeliveryQtyUnit ekbe lsmng Del. Note Qty
GRIRAcctClrgAmtInTransacCrcy ekbe areww GR/IR clr.value
QuantityInBaseUnit ekbe bamng Quantity
Batch ekbe charg Chargeable Proc.
GRIRAcctClrgAmtInOrdTrnsacCrcy ekbe arewb GR/IR clr.value
InvoiceAmtInPurOrdTransacCrcy ekbe rewrb FC invoice amnt
VltdGdsRcptBlkdStkQtyInOrdUnit ekbe wesbb Val. GR BlStock OUn
VltdGdsRcptBlkdQtyInOrdPrcUnit ekbe bpweb Val. GR BS OPUn
IsToBeAcceptedAtOrigin ekbe weora Origin Accept.
ExchangeRateDifferenceAmount ekbe kudif Exch.Rate Diff.
ExchangeRate
DeliveryDocument ekbe vbeln_st Delivery
DeliveryDocumentItem ekbe vbelp_st Item
OrderPriceUnit _PurchasingDocumentItem OrderPriceUnit Order Price Un.
OrderQuantityUnit _PurchasingDocumentItem OrderQuantityUnit Sales Unit
BaseUnit _PurchasingDocumentItem BaseUnit Unit of Measure
PurchasingDocumentCurrency _PurchasingDocument DocumentCurrency Document Currency
CompanyCodeCurrency
_OrderQuantityUnit _OrderQuantityUnit
_OrderPriceUnit _OrderPriceUnit
_DeliveryQuantityUnit _DeliveryQuantityUnit
_BaseUnit _BaseUnit
_Currency _Currency
_CompanyCodeCurrency _CompanyCodeCurrency
_PurchasingDocumentCurrency _PurchasingDocumentCurrency

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_PurchasingDocumentHistoryBsc.
-- 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: IMMPURDOCHISB

CREATE VIEW I_PurchasingDocumentHistoryBsc AS
SELECT
  ekbe.ebeln AS PurchasingDocument,
  ekbe.ebelp AS PurchasingDocumentItem,
  ekbe.zekkn AS AccountAssignmentNumber,
  ekbe.vgabe AS PurchasingHistoryDocumentType,
  ekbe.gjahr AS PurchasingHistoryDocumentYear,
  ekbe.belnr AS PurchasingHistoryDocument,
  ekbe.buzei AS PurchasingHistoryDocumentItem,
  ekbe.bewtp AS PurchasingHistoryCategory,
  ekbe.bwart AS GoodsMovementType,
  ekbe.budat AS PostingDate,
  ekbe.waers AS Currency,
  ekbe.shkzg AS DebitCreditCode,
  ekbe.elikz AS IsCompletelyDelivered,
  ekbe.lfgja AS ReferenceDocumentFiscalYear,
  ekbe.lfbnr AS InvtryMgmtReferenceDocument,
  ekbe.lfpos AS InvtryMgmtRefDocumentItem,
  ekbe.matnr AS Material,
  ekbe.werks AS Plant,
  ekbe.xwsbr AS RvslOfGoodsReceiptIsAllowed,
  ekbe.knumv AS PricingDocument,
  ekbe.mwskz AS TaxCode,
  ekbe.bldat AS DocumentDate,
  ekbe.ernam AS CreatedByUser,
  ekbe.bwtar AS InventoryValuationType,
  ekbe.xblnr AS DocumentReferenceID,
  ekbe.lsmeh AS DeliveryQuantityUnit,
  ekbe.ematn AS ManufacturerMaterial,
  ekbe.cpudt AS AccountingDocumentCreationDate,
  ekbe.cputm AS PurgHistDocumentCreationTime,
  ekbe.menge AS Quantity,
  ekbe.dmbtr AS PurOrdAmountInCompanyCodeCrcy,
  ekbe.wrbtr AS PurchaseOrderAmount,
  ekbe.bpmng AS QtyInPurchaseOrderPriceUnit,
  ekbe.arewr AS GRIRAcctClrgAmtInCoCodeCrcy,
  ekbe.wesbs AS GdsRcptBlkdStkQtyInOrdQtyUnit,
  ekbe.bpwes AS GdsRcptBlkdStkQtyInOrdPrcUnit,
  ekbe.reewr AS InvoiceAmtInCoCodeCrcy,
  ekbe.evere AS ShipgInstrnSupplierCompliance,
  ekbe.refwr AS InvoiceAmountInFrgnCurrency,
  ekbe.lsmng AS QuantityInDeliveryQtyUnit,
  ekbe.areww AS GRIRAcctClrgAmtInTransacCrcy,
  ekbe.bamng AS QuantityInBaseUnit,
  ekbe.charg AS Batch,
  ekbe.arewb AS GRIRAcctClrgAmtInOrdTrnsacCrcy,
  ekbe.rewrb AS InvoiceAmtInPurOrdTransacCrcy,
  ekbe.wesbb AS VltdGdsRcptBlkdStkQtyInOrdUnit,
  ekbe.bpweb AS VltdGdsRcptBlkdQtyInOrdPrcUnit,
  ekbe.weora AS IsToBeAcceptedAtOrigin,
  ekbe.kudif AS ExchangeRateDifferenceAmount,
  cast( ekbe.wkurs as fis_exchange_rate ) AS ExchangeRate,
  ekbe.vbeln_st AS DeliveryDocument,
  ekbe.vbelp_st AS DeliveryDocumentItem,
  _PurchasingDocumentItem.OrderPriceUnit AS OrderPriceUnit,
  _PurchasingDocumentItem.OrderQuantityUnit AS OrderQuantityUnit,
  _PurchasingDocumentItem.BaseUnit AS BaseUnit,
  _PurchasingDocument.DocumentCurrency AS PurchasingDocumentCurrency,
  _PurchasingDocument._CompanyCode.Currency AS CompanyCodeCurrency
FROM ekbe
LEFT OUTER JOIN I_PurchasingDocument AS _PurchasingDocument ON PurchasingDocument = _PurchasingDocument.PurchasingDocument  -- association [1..1]
LEFT OUTER JOIN I_PurchasingDocumentItem AS _PurchasingDocumentItem ON PurchasingDocument = _PurchasingDocumentItem.PurchasingDocument AND PurchasingDocumentItem = _PurchasingDocumentItem.PurchasingDocumentItem  -- association [1..1]
LEFT OUTER JOIN I_UnitOfMeasure AS _OrderQuantityUnit ON orderquantityunit = _OrderQuantityUnit.UnitOfMeasure  -- association [1..1]
LEFT OUTER JOIN I_UnitOfMeasure AS _OrderPriceUnit ON orderpriceunit = _OrderPriceUnit.UnitOfMeasure  -- association [1..1]
LEFT OUTER JOIN I_UnitOfMeasure AS _DeliveryQuantityUnit ON DeliveryQuantityUnit = _DeliveryQuantityUnit.UnitOfMeasure  -- association [1..1]
LEFT OUTER JOIN I_UnitOfMeasure AS _BaseUnit ON baseunit = _BaseUnit.UnitOfMeasure  -- association [1..1]
LEFT OUTER JOIN I_Currency AS _Currency ON Currency = _Currency.Currency  -- association [1..1]
LEFT OUTER JOIN I_Currency AS _CompanyCodeCurrency ON CompanyCodeCurrency = _CompanyCodeCurrency.Currency  -- association [1..1]
LEFT OUTER JOIN I_Currency AS _PurchasingDocumentCurrency ON PurchasingDocumentCurrency = _PurchasingDocumentCurrency.Currency  -- association [1..1]
;