I_SchedulingAgreementHistory

DDL: I_SCHEDULINGAGREEMENTHISTORY SQL: IMMSAGMTHISTORY Type: view COMPOSITE

Scheduling Agreement History

I_SchedulingAgreementHistory is a Composite CDS View that provides data about "Scheduling Agreement History" in SAP S/4HANA. It reads from 2 data sources (I_PurchasingDocumentHistory, I_Schedgagrmthdr) and exposes 59 fields with key fields SchedulingAgreement, SchedulingAgreementItem, AccountAssignmentNumber, PurchaseOrderTransactionType, MaterialDocumentYear. It has 4 associations to related views.

Data Sources (2)

SourceAliasJoin Type
I_PurchasingDocumentHistory History from
I_Schedgagrmthdr SchedulingAgreement inner

Associations (4)

CardinalityTargetAliasCondition
[1..1] I_Currency _Currency $projection.Currency = _Currency.Currency
[1..1] I_PurchaseOrderHistCategory _PurchaseOrderHistCategory $projection.PurchaseOrderHistCategory = _PurchaseOrderHistCategory.PurchaseOrderHistCategory
[1..1] I_Schedgagrmthdr _SchedulingAgreement $projection.SchedulingAgreement = _SchedulingAgreement.SchedulingAgreement
[1..1] I_SchedgAgrmtItm _SchedulingAgreementItem $projection.SchedulingAgreementItem = _SchedulingAgreementItem.SchedulingAgreementItem and $projection.SchedulingAgreement = _SchedulingAgreementItem.SchedulingAgreement

Annotations (10)

NameValueLevelField
AbapCatalog.sqlViewName IMMSAGMTHISTORY view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #CHECK view
EndUserText.label Scheduling Agreement History view
VDM.viewType #COMPOSITE view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #L view
ClientHandling.algorithm #SESSION_VARIABLE view
VDM.lifecycle.contract.type #SAP_INTERNAL_API view

Fields (59)

KeyFieldSource TableSource FieldDescription
KEY SchedulingAgreement I_PurchasingDocumentHistory PurchasingDocument Purchasing Document
KEY SchedulingAgreementItem I_PurchasingDocumentHistory PurchasingDocumentItem Purchasing Doc. Item
KEY AccountAssignmentNumber I_PurchasingDocumentHistory AccountAssignmentNumber Account Assgmt No.
KEY PurchaseOrderTransactionType I_PurchasingDocumentHistory PurchasingHistoryDocumentType
KEY MaterialDocumentYear I_PurchasingDocumentHistory PurchasingHistoryDocumentYear
KEY MaterialDocument I_PurchasingDocumentHistory PurchasingHistoryDocument
KEY MaterialDocumentItem I_PurchasingDocumentHistory PurchasingHistoryDocumentItem
PurchaseOrderHistCategory I_PurchasingDocumentHistory PurchasingHistoryCategory
GoodsMovementType I_PurchasingDocumentHistory GoodsMovementType Movement Type
PostingDate I_PurchasingDocumentHistory PostingDate Posting Date for GR
Currency I_PurchasingDocumentHistory Currency Valuation Crcy
DebitCreditCode I_PurchasingDocumentHistory DebitCreditCode Single-Character Flag
IsCompletelyDelivered I_PurchasingDocumentHistory IsCompletelyDelivered Is completely delivered
ReferenceDocumentFiscalYear I_PurchasingDocumentHistory ReferenceDocumentFiscalYear Year Cur.Period
ReferenceDocument I_PurchasingDocumentHistory ReferenceDocument Reference Document
ReferenceDocumentItem I_PurchasingDocumentHistory ReferenceDocumentItem Reference item
Material I_PurchasingDocumentHistory Material Vehicle Model
Plant I_PurchasingDocumentHistory Plant Valuation Area
RvslOfGoodsReceiptIsAllowed I_PurchasingDocumentHistory RvslOfGoodsReceiptIsAllowed
PricingDocument I_PurchasingDocumentHistory PricingDocument Document Condition
TaxCode I_PurchasingDocumentHistory TaxCode Tax Code
DocumentDate I_PurchasingDocumentHistory DocumentDate Journal Entry Date
CreatedByUser I_PurchasingDocumentHistory CreatedByUser User Name
InventoryValuationType I_PurchasingDocumentHistory InventoryValuationType Valuation Type
DocumentReferenceID I_PurchasingDocumentHistory DocumentReferenceID Reference
DeliveryQuantityUnit I_PurchasingDocumentHistory DeliveryQuantityUnit Unit of measure
ManufacturerMaterial I_PurchasingDocumentHistory ManufacturerMaterial MPN: Material
AccountingDocumentCreationDate I_PurchasingDocumentHistory AccountingDocumentCreationDate Journal Entry Date
PurgHistDocumentCreationTime I_PurchasingDocumentHistory PurgHistDocumentCreationTime
Quantity I_PurchasingDocumentHistory Quantity Value
PurOrdAmountInCompanyCodeCrcy I_PurchasingDocumentHistory PurOrdAmountInCompanyCodeCrcy
PurchaseOrderAmount I_PurchasingDocumentHistory PurchaseOrderAmount
QtyInPurchaseOrderPriceUnit I_PurchasingDocumentHistory QtyInPurchaseOrderPriceUnit Qty in OPUn
GRIRAcctClrgAmtInCoCodeCrcy I_PurchasingDocumentHistory GRIRAcctClrgAmtInCoCodeCrcy
GdsRcptBlkdStkQtyInOrdQtyUnit I_PurchasingDocumentHistory GdsRcptBlkdStkQtyInOrdQtyUnit
GdsRcptBlkdStkQtyInOrdPrcUnit I_PurchasingDocumentHistory GdsRcptBlkdStkQtyInOrdPrcUnit
InvoiceAmtInCoCodeCrcy I_PurchasingDocumentHistory InvoiceAmtInCoCodeCrcy
ShipgInstrnSupplierCompliance I_PurchasingDocumentHistory ShipgInstrnSupplierCompliance
InvoiceAmountInFrgnCurrency I_PurchasingDocumentHistory InvoiceAmountInFrgnCurrency Invc. Amt Frgn Crcy
QuantityInDeliveryQtyUnit I_PurchasingDocumentHistory QuantityInDeliveryQtyUnit
GRIRAcctClrgAmtInTransacCrcy I_PurchasingDocumentHistory GRIRAcctClrgAmtInTransacCrcy
QuantityInBaseUnit I_PurchasingDocumentHistory QuantityInBaseUnit Quantity
Batch I_PurchasingDocumentHistory Batch Lot No.
GRIRAcctClrgAmtInOrdTrnsacCrcy I_PurchasingDocumentHistory GRIRAcctClrgAmtInOrdTrnsacCrcy
InvoiceAmtInPurOrdTransacCrcy I_PurchasingDocumentHistory InvoiceAmtInPurOrdTransacCrcy
VltdGdsRcptBlkdStkQtyInOrdUnit I_PurchasingDocumentHistory VltdGdsRcptBlkdStkQtyInOrdUnit
VltdGdsRcptBlkdQtyInOrdPrcUnit I_PurchasingDocumentHistory VltdGdsRcptBlkdQtyInOrdPrcUnit
IsToBeAcceptedAtOrigin I_PurchasingDocumentHistory IsToBeAcceptedAtOrigin Origin Accept.
ExchangeRateDifferenceAmount I_PurchasingDocumentHistory ExchangeRateDifferenceAmount
ExchangeRate I_PurchasingDocumentHistory ExchangeRate Exchange rate
DeliveryDocument I_PurchasingDocumentHistory DeliveryDocument Outbound Delivery
DeliveryDocumentItem I_PurchasingDocumentHistory DeliveryDocumentItem Outb. Delivery Item
BaseUnit I_PurchasingDocumentHistory BaseUnit Unit of Measure
OrderQuantityUnit _SchedulingAgreementItem OrderQuantityUnit Sales Unit
OrderPriceUnit _SchedulingAgreementItem OrderPriceUnit Order Price Un.
_SchedulingAgreement _SchedulingAgreement
_SchedulingAgreementItem _SchedulingAgreementItem
_PurchaseOrderHistCategory _PurchaseOrderHistCategory
_Currency _Currency

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_SchedulingAgreementHistory.
-- 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: IMMSAGMTHISTORY

CREATE VIEW I_SchedulingAgreementHistory AS
SELECT
  History.PurchasingDocument AS SchedulingAgreement,
  History.PurchasingDocumentItem AS SchedulingAgreementItem,
  History.AccountAssignmentNumber AS AccountAssignmentNumber,
  History.PurchasingHistoryDocumentType AS PurchaseOrderTransactionType,
  History.PurchasingHistoryDocumentYear AS MaterialDocumentYear,
  History.PurchasingHistoryDocument AS MaterialDocument,
  History.PurchasingHistoryDocumentItem AS MaterialDocumentItem,
  History.PurchasingHistoryCategory AS PurchaseOrderHistCategory,
  History.GoodsMovementType AS GoodsMovementType,
  History.PostingDate AS PostingDate,
  History.Currency AS Currency,
  History.DebitCreditCode AS DebitCreditCode,
  History.IsCompletelyDelivered AS IsCompletelyDelivered,
  History.ReferenceDocumentFiscalYear AS ReferenceDocumentFiscalYear,
  History.ReferenceDocument AS ReferenceDocument,
  History.ReferenceDocumentItem AS ReferenceDocumentItem,
  History.Material AS Material,
  History.Plant AS Plant,
  History.RvslOfGoodsReceiptIsAllowed AS RvslOfGoodsReceiptIsAllowed,
  History.PricingDocument AS PricingDocument,
  History.TaxCode AS TaxCode,
  History.DocumentDate AS DocumentDate,
  History.CreatedByUser AS CreatedByUser,
  History.InventoryValuationType AS InventoryValuationType,
  History.DocumentReferenceID AS DocumentReferenceID,
  History.DeliveryQuantityUnit AS DeliveryQuantityUnit,
  History.ManufacturerMaterial AS ManufacturerMaterial,
  History.AccountingDocumentCreationDate AS AccountingDocumentCreationDate,
  History.PurgHistDocumentCreationTime AS PurgHistDocumentCreationTime,
  History.Quantity AS Quantity,
  History.PurOrdAmountInCompanyCodeCrcy AS PurOrdAmountInCompanyCodeCrcy,
  History.PurchaseOrderAmount AS PurchaseOrderAmount,
  History.QtyInPurchaseOrderPriceUnit AS QtyInPurchaseOrderPriceUnit,
  History.GRIRAcctClrgAmtInCoCodeCrcy AS GRIRAcctClrgAmtInCoCodeCrcy,
  History.GdsRcptBlkdStkQtyInOrdQtyUnit AS GdsRcptBlkdStkQtyInOrdQtyUnit,
  History.GdsRcptBlkdStkQtyInOrdPrcUnit AS GdsRcptBlkdStkQtyInOrdPrcUnit,
  History.InvoiceAmtInCoCodeCrcy AS InvoiceAmtInCoCodeCrcy,
  History.ShipgInstrnSupplierCompliance AS ShipgInstrnSupplierCompliance,
  History.InvoiceAmountInFrgnCurrency AS InvoiceAmountInFrgnCurrency,
  History.QuantityInDeliveryQtyUnit AS QuantityInDeliveryQtyUnit,
  History.GRIRAcctClrgAmtInTransacCrcy AS GRIRAcctClrgAmtInTransacCrcy,
  History.QuantityInBaseUnit AS QuantityInBaseUnit,
  History.Batch AS Batch,
  History.GRIRAcctClrgAmtInOrdTrnsacCrcy AS GRIRAcctClrgAmtInOrdTrnsacCrcy,
  History.InvoiceAmtInPurOrdTransacCrcy AS InvoiceAmtInPurOrdTransacCrcy,
  History.VltdGdsRcptBlkdStkQtyInOrdUnit AS VltdGdsRcptBlkdStkQtyInOrdUnit,
  History.VltdGdsRcptBlkdQtyInOrdPrcUnit AS VltdGdsRcptBlkdQtyInOrdPrcUnit,
  History.IsToBeAcceptedAtOrigin AS IsToBeAcceptedAtOrigin,
  History.ExchangeRateDifferenceAmount AS ExchangeRateDifferenceAmount,
  History.ExchangeRate AS ExchangeRate,
  History.DeliveryDocument AS DeliveryDocument,
  History.DeliveryDocumentItem AS DeliveryDocumentItem,
  History.BaseUnit AS BaseUnit,
  _SchedulingAgreementItem.OrderQuantityUnit AS OrderQuantityUnit,
  _SchedulingAgreementItem.OrderPriceUnit AS OrderPriceUnit
FROM I_PurchasingDocumentHistory AS History
INNER JOIN I_Schedgagrmthdr AS SchedulingAgreement ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_Currency AS _Currency ON Currency = _Currency.Currency  -- association [1..1]
LEFT OUTER JOIN I_PurchaseOrderHistCategory AS _PurchaseOrderHistCategory ON PurchaseOrderHistCategory = _PurchaseOrderHistCategory.PurchaseOrderHistCategory  -- association [1..1]
LEFT OUTER JOIN I_Schedgagrmthdr AS _SchedulingAgreement ON SchedulingAgreement = _SchedulingAgreement.SchedulingAgreement  -- association [1..1]
LEFT OUTER JOIN I_SchedgAgrmtItm AS _SchedulingAgreementItem ON SchedulingAgreementItem = _SchedulingAgreementItem.SchedulingAgreementItem AND SchedulingAgreement = _SchedulingAgreementItem.SchedulingAgreement  -- association [1..1]
;