I_PurchasingDocumentHistoryBsc
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)
| Source | Alias | Join Type |
|---|---|---|
| ekbe | ekbe | from |
Associations (9)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [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)
| Name | Value | Level | Field |
|---|---|---|---|
| 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)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | PurchasingDocument | ekbe | ebeln | |
| KEY | PurchasingDocumentItem | ekbe | ebelp | |
| KEY | AccountAssignmentNumber | ekbe | zekkn | |
| KEY | PurchasingHistoryDocumentType | ekbe | vgabe | |
| KEY | PurchasingHistoryDocumentYear | ekbe | gjahr | |
| KEY | PurchasingHistoryDocument | ekbe | belnr | |
| KEY | PurchasingHistoryDocumentItem | ekbe | buzei | |
| PurchasingHistoryCategory | ekbe | bewtp | ||
| GoodsMovementType | ekbe | bwart | ||
| PostingDate | ekbe | budat | ||
| Currency | ekbe | waers | ||
| DebitCreditCode | ekbe | shkzg | ||
| IsCompletelyDelivered | ekbe | elikz | ||
| ReferenceDocumentFiscalYear | ekbe | lfgja | ||
| InvtryMgmtReferenceDocument | ekbe | lfbnr | ||
| InvtryMgmtRefDocumentItem | ekbe | lfpos | ||
| Material | ekbe | matnr | ||
| Plant | ekbe | werks | ||
| RvslOfGoodsReceiptIsAllowed | ekbe | xwsbr | ||
| PricingDocument | ekbe | knumv | ||
| TaxCode | ekbe | mwskz | ||
| DocumentDate | ekbe | bldat | ||
| CreatedByUser | ekbe | ernam | ||
| InventoryValuationType | ekbe | bwtar | ||
| DocumentReferenceID | ekbe | xblnr | ||
| DeliveryQuantityUnit | ekbe | lsmeh | ||
| ManufacturerMaterial | ekbe | ematn | ||
| AccountingDocumentCreationDate | ekbe | cpudt | ||
| PurgHistDocumentCreationTime | ekbe | cputm | ||
| Quantity | ekbe | menge | ||
| PurOrdAmountInCompanyCodeCrcy | ekbe | dmbtr | ||
| PurchaseOrderAmount | ekbe | wrbtr | ||
| QtyInPurchaseOrderPriceUnit | ekbe | bpmng | ||
| GRIRAcctClrgAmtInCoCodeCrcy | ekbe | arewr | ||
| GdsRcptBlkdStkQtyInOrdQtyUnit | ekbe | wesbs | ||
| GdsRcptBlkdStkQtyInOrdPrcUnit | ekbe | bpwes | ||
| InvoiceAmtInCoCodeCrcy | ekbe | reewr | ||
| ShipgInstrnSupplierCompliance | ekbe | evere | ||
| InvoiceAmountInFrgnCurrency | ekbe | refwr | ||
| QuantityInDeliveryQtyUnit | ekbe | lsmng | ||
| GRIRAcctClrgAmtInTransacCrcy | ekbe | areww | ||
| QuantityInBaseUnit | ekbe | bamng | ||
| Batch | ekbe | charg | ||
| GRIRAcctClrgAmtInOrdTrnsacCrcy | ekbe | arewb | ||
| InvoiceAmtInPurOrdTransacCrcy | ekbe | rewrb | ||
| VltdGdsRcptBlkdStkQtyInOrdUnit | ekbe | wesbb | ||
| VltdGdsRcptBlkdQtyInOrdPrcUnit | ekbe | bpweb | ||
| IsToBeAcceptedAtOrigin | ekbe | weora | ||
| ExchangeRateDifferenceAmount | ekbe | kudif | ||
| ExchangeRate | ||||
| DeliveryDocument | ekbe | vbeln_st | ||
| DeliveryDocumentItem | ekbe | vbelp_st | ||
| OrderPriceUnit | _PurchasingDocumentItem | OrderPriceUnit | ||
| OrderQuantityUnit | _PurchasingDocumentItem | OrderQuantityUnit | ||
| BaseUnit | _PurchasingDocumentItem | BaseUnit | ||
| PurchasingDocumentCurrency | _PurchasingDocument | DocumentCurrency | ||
| CompanyCodeCurrency | ||||
| _OrderQuantityUnit | _OrderQuantityUnit | |||
| _OrderPriceUnit | _OrderPriceUnit | |||
| _DeliveryQuantityUnit | _DeliveryQuantityUnit | |||
| _BaseUnit | _BaseUnit | |||
| _Currency | _Currency | |||
| _CompanyCodeCurrency | _CompanyCodeCurrency | |||
| _PurchasingDocumentCurrency | _PurchasingDocumentCurrency |
@AbapCatalog.preserveKey: true
@ClientHandling.algorithm: #SESSION_VARIABLE
@AbapCatalog.sqlViewName: 'IMMPURDOCHISB'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #PRIVILEGED_ONLY
@EndUserText.label: 'History per Purchasing Document Item'
@VDM.viewType : #BASIC
@Metadata.ignorePropagatedAnnotations: true
@ObjectModel.usageType.serviceQuality: #A
@ObjectModel.usageType.sizeCategory: #L
@ObjectModel.usageType.dataClass: #TRANSACTIONAL
@VDM.lifecycle.contract.type: #SAP_INTERNAL_API
define view I_PurchasingDocumentHistoryBsc
as select from ekbe
association [1..1] to I_PurchasingDocument as _PurchasingDocument on $projection.PurchasingDocument = _PurchasingDocument.PurchasingDocument
association [1..1] to I_PurchasingDocumentItem as _PurchasingDocumentItem on $projection.PurchasingDocument = _PurchasingDocumentItem.PurchasingDocument
and $projection.PurchasingDocumentItem = _PurchasingDocumentItem.PurchasingDocumentItem
association [1..1] to I_UnitOfMeasure as _OrderQuantityUnit on $projection.orderquantityunit = _OrderQuantityUnit.UnitOfMeasure
association [1..1] to I_UnitOfMeasure as _OrderPriceUnit on $projection.orderpriceunit = _OrderPriceUnit.UnitOfMeasure
association [1..1] to I_UnitOfMeasure as _DeliveryQuantityUnit on $projection.DeliveryQuantityUnit = _DeliveryQuantityUnit.UnitOfMeasure
association [1..1] to I_UnitOfMeasure as _BaseUnit on $projection.baseunit = _BaseUnit.UnitOfMeasure
association [1..1] to I_Currency as _Currency on $projection.Currency = _Currency.Currency
association [1..1] to I_Currency as _CompanyCodeCurrency on $projection.CompanyCodeCurrency = _CompanyCodeCurrency.Currency
association [1..1] to I_Currency as _PurchasingDocumentCurrency on $projection.PurchasingDocumentCurrency = _PurchasingDocumentCurrency.Currency
{
key ekbe.ebeln as PurchasingDocument,
key ekbe.ebelp as PurchasingDocumentItem,
key ekbe.zekkn as AccountAssignmentNumber,
key ekbe.vgabe as PurchasingHistoryDocumentType,
key ekbe.gjahr as PurchasingHistoryDocumentYear,
key ekbe.belnr as PurchasingHistoryDocument,
key ekbe.buzei as PurchasingHistoryDocumentItem,
ekbe.bewtp as PurchasingHistoryCategory,
ekbe.bwart as GoodsMovementType,
ekbe.budat as PostingDate,
@Semantics.currencyCode: true
@ObjectModel.foreignKey.association: '_Currency'
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,
@Semantics.unitOfMeasure: true
@ObjectModel.foreignKey.association: '_DeliveryQuantityUnit'
ekbe.lsmeh as DeliveryQuantityUnit,
ekbe.ematn as ManufacturerMaterial,
ekbe.cpudt as AccountingDocumentCreationDate,
ekbe.cputm as PurgHistDocumentCreationTime,
@Semantics.quantity.unitOfMeasure:'OrderQuantityUnit'
ekbe.menge as Quantity,
@Semantics.amount.currencyCode: 'CompanyCodeCurrency'
ekbe.dmbtr as PurOrdAmountInCompanyCodeCrcy,
@Semantics.amount.currencyCode: 'Currency'
ekbe.wrbtr as PurchaseOrderAmount,
@Semantics.quantity.unitOfMeasure:'OrderPriceUnit'
ekbe.bpmng as QtyInPurchaseOrderPriceUnit,
@Semantics.amount.currencyCode: 'CompanyCodeCurrency'
ekbe.arewr as GRIRAcctClrgAmtInCoCodeCrcy,
@Semantics.quantity.unitOfMeasure:'OrderQuantityUnit'
ekbe.wesbs as GdsRcptBlkdStkQtyInOrdQtyUnit,
@Semantics.quantity.unitOfMeasure:'OrderPriceUnit'
ekbe.bpwes as GdsRcptBlkdStkQtyInOrdPrcUnit,
@Semantics.amount.currencyCode: 'CompanyCodeCurrency'
ekbe.reewr as InvoiceAmtInCoCodeCrcy,
ekbe.evere as ShipgInstrnSupplierCompliance,
@Semantics.amount.currencyCode: 'Currency'
ekbe.refwr as InvoiceAmountInFrgnCurrency,
@Semantics.quantity.unitOfMeasure:'DeliveryQuantityUnit'
ekbe.lsmng as QuantityInDeliveryQtyUnit,
@Semantics.amount.currencyCode: 'Currency'
ekbe.areww as GRIRAcctClrgAmtInTransacCrcy,
@Semantics.quantity.unitOfMeasure: 'BaseUnit'
ekbe.bamng as QuantityInBaseUnit,
ekbe.charg as Batch,
@Semantics.amount.currencyCode: 'PurchasingDocumentCurrency'
ekbe.arewb as GRIRAcctClrgAmtInOrdTrnsacCrcy,
@Semantics.amount.currencyCode: 'PurchasingDocumentCurrency'
ekbe.rewrb as InvoiceAmtInPurOrdTransacCrcy,
@Semantics.quantity.unitOfMeasure:'OrderQuantityUnit'
ekbe.wesbb as VltdGdsRcptBlkdStkQtyInOrdUnit,
@Semantics.quantity.unitOfMeasure:'OrderPriceUnit'
ekbe.bpweb as VltdGdsRcptBlkdQtyInOrdPrcUnit,
ekbe.weora as IsToBeAcceptedAtOrigin,
@Semantics.amount.currencyCode: 'Currency'
ekbe.kudif as ExchangeRateDifferenceAmount,
// ekbe.wkurs as ExchangeRate,
cast( ekbe.wkurs as fis_exchange_rate ) as ExchangeRate,
ekbe.vbeln_st as DeliveryDocument,
ekbe.vbelp_st as DeliveryDocumentItem,
@Semantics.unitOfMeasure: true
@ObjectModel.foreignKey.association: '_OrderPriceUnit'
_PurchasingDocumentItem.OrderPriceUnit,
@Semantics.unitOfMeasure: true
@ObjectModel.foreignKey.association: '_OrderQuantityUnit'
_PurchasingDocumentItem.OrderQuantityUnit,
@Semantics.unitOfMeasure: true
@ObjectModel.foreignKey.association: '_BaseUnit'
_PurchasingDocumentItem.BaseUnit,
@Semantics.currencyCode: true
@ObjectModel.foreignKey.association: '_PurchasingDocumentCurrency'
_PurchasingDocument.DocumentCurrency as PurchasingDocumentCurrency,
@Semantics.currencyCode: true
@ObjectModel.foreignKey.association: '_CompanyCodeCurrency'
_PurchasingDocument._CompanyCode.Currency as CompanyCodeCurrency,
_OrderQuantityUnit,
_OrderPriceUnit,
_DeliveryQuantityUnit,
_BaseUnit,
_Currency,
_CompanyCodeCurrency,
_PurchasingDocumentCurrency
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_COMPANYCODE",
"I_PURCHASINGDOCUMENT",
"I_PURCHASINGDOCUMENTITEM",
"EKBE"
],
"ASSOCIATED":
[
"I_CURRENCY",
"I_PURCHASINGDOCUMENT",
"I_PURCHASINGDOCUMENTITEM",
"I_UNITOFMEASURE"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/
Learn More
- What Is a CDS View in SAP S/4HANA?
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- CDS View Annotations — A Complete Guide
- CDS View Field Mapping and Associations
- Understanding the SAP S/4HANA Data Model
- CDS View Extensions and Custom Fields in SAP S/4HANA
- Released APIs and Stability Contracts in SAP S/4HANA