P_SchedgAgrmtItemHistory2
Scheduling Agreement Item History 2
P_SchedgAgrmtItemHistory2 is a Consumption CDS View that provides data about "Scheduling Agreement Item History 2" in SAP S/4HANA. It reads from 4 data sources (P_SchedulingAgreementHistory, P_SchedgAgrmtItemSLQty, I_Schedgagrmthdr, I_SchedgAgrmtItm) and exposes 32 fields with key fields SchedulingAgreement, SchedulingAgreementItem.
Data Sources (4)
| Source | Alias | Join Type |
|---|---|---|
| P_SchedulingAgreementHistory | History | left_outer |
| P_SchedgAgrmtItemSLQty | ScheduleLine | inner |
| I_Schedgagrmthdr | SchedulingAgreement | inner |
| I_SchedgAgrmtItm | SchedulingAgreementItem | from |
Parameters (1)
| Name | Type | Default |
|---|---|---|
| P_DisplayCurrency | displaycurrency |
Annotations (8)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PSCHAGITMHIST2 | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AbapCatalog.preserveKey | true | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| VDM.private | true | view | |
| VDM.viewType | #CONSUMPTION | view | |
| AccessControl.authorizationCheck | #CHECK | view | |
| EndUserText.label | Scheduling Agreement Item History 2 | view |
Fields (32)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | SchedulingAgreement | I_SchedgAgrmtItm | SchedulingAgreement | Scheduling Agreement |
| KEY | SchedulingAgreementItem | I_SchedgAgrmtItm | SchedulingAgreementItem | Schedule Item Number |
| Supplier | I_Schedgagrmthdr | Supplier | Supplier | |
| PurchasingOrganization | I_Schedgagrmthdr | PurchasingOrganization | Purchasing Organization | |
| PurchasingGroup | I_Schedgagrmthdr | PurchasingGroup | Purchasing Group | |
| CompanyCode | I_Schedgagrmthdr | CompanyCode | Receiver Company Code | |
| DocumentCurrency | I_SchedgAgrmtItm | DocumentCurrency | Document Currency | |
| ValidityStartDate | I_Schedgagrmthdr | ValidityStartDate | Validity Start Date | |
| ValidityEndDate | I_Schedgagrmthdr | ValidityEndDate | ValidTo | |
| PurchasingDocumentType | I_Schedgagrmthdr | PurchasingDocumentType | RFQ Type | |
| PurchasingDocumentCategory | I_Schedgagrmthdr | PurchasingDocumentCategory | Doc. Category | |
| ReleaseIsNotCompleted | ReleaseIsNotCompleted | Subj.to Release | ||
| PurchasingProcessingStatus | PurchasingProcessingStatus | Proc. State | ||
| Plant | I_SchedgAgrmtItm | Plant | Valuation Area | |
| StorageLocation | I_SchedgAgrmtItm | StorageLocation | StorageLocation | |
| MaterialGroup | I_SchedgAgrmtItm | MaterialGroup | Product Group | |
| Material | I_SchedgAgrmtItm | Material | Vehicle Model | |
| OrderQuantityUnit | I_SchedgAgrmtItm | OrderQuantityUnit | Sales Unit | |
| PurchasingDocumentOrderDate | I_Schedgagrmthdr | PurchasingDocumentOrderDate | PO Date | |
| PostingDate | PostingDate | Posting Date for GR | ||
| OrderPriceUnitToOrderUnitNmrtr | I_SchedgAgrmtItm | OrderPriceUnitToOrderUnitNmrtr | Quantity Conversion Numerator | |
| OrdPriceUnitToOrderUnitDnmntr | I_SchedgAgrmtItm | OrdPriceUnitToOrderUnitDnmntr | Quantity Conversion Denominator | |
| ProductType | I_SchedgAgrmtItm | ProductType | Product Type Group | |
| MaterialType | I_SchedgAgrmtItm | MaterialType | Material Type | |
| AccountAssignmentCategory | I_SchedgAgrmtItm | AccountAssignmentCategory | Acct Assgmt Cat | |
| MultipleAcctAssgmtDistribution | I_SchedgAgrmtItm | MultipleAcctAssgmtDistribution | Distribution | |
| PartialInvoiceDistribution | I_SchedgAgrmtItm | PartialInvoiceDistribution | Partial invoice | |
| GoodsReceiptQuantity | GoodsReceiptQuantity | Delivered | ||
| InvoiceReceiptQty | InvoiceReceiptQty | |||
| TargetQuantity | I_SchedgAgrmtItm | TargetQuantity | Target Quantity | |
| NetPriceQuantity | I_SchedgAgrmtItm | NetPriceQuantity | Price Unit | |
| ScheduleLineOrderQuantity | ScheduleLineOrderQuantity | Scheduled Qty |
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 P_SchedgAgrmtItemHistory2.
-- 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: PSCHAGITMHIST2
-- Parameters: P_DisplayCurrency : displaycurrency
CREATE VIEW P_SchedgAgrmtItemHistory2 AS
SELECT
SchedulingAgreementItem.SchedulingAgreement AS SchedulingAgreement,
SchedulingAgreementItem.SchedulingAgreementItem AS SchedulingAgreementItem,
SchedulingAgreement.Supplier AS Supplier,
SchedulingAgreement.PurchasingOrganization AS PurchasingOrganization,
SchedulingAgreement.PurchasingGroup AS PurchasingGroup,
SchedulingAgreement.CompanyCode AS CompanyCode,
SchedulingAgreementItem.DocumentCurrency AS DocumentCurrency,
SchedulingAgreement.ValidityStartDate AS ValidityStartDate,
SchedulingAgreement.ValidityEndDate AS ValidityEndDate,
SchedulingAgreement.PurchasingDocumentType AS PurchasingDocumentType,
SchedulingAgreement.PurchasingDocumentCategory AS PurchasingDocumentCategory,
ReleaseIsNotCompleted,
PurchasingProcessingStatus,
SchedulingAgreementItem.Plant AS Plant,
SchedulingAgreementItem.StorageLocation AS StorageLocation,
SchedulingAgreementItem.MaterialGroup AS MaterialGroup,
SchedulingAgreementItem.Material AS Material,
SchedulingAgreementItem.OrderQuantityUnit AS OrderQuantityUnit,
SchedulingAgreement.PurchasingDocumentOrderDate AS PurchasingDocumentOrderDate,
PostingDate,
SchedulingAgreementItem.OrderPriceUnitToOrderUnitNmrtr AS OrderPriceUnitToOrderUnitNmrtr,
SchedulingAgreementItem.OrdPriceUnitToOrderUnitDnmntr AS OrdPriceUnitToOrderUnitDnmntr,
SchedulingAgreementItem.ProductType AS ProductType,
SchedulingAgreementItem.MaterialType AS MaterialType,
SchedulingAgreementItem.AccountAssignmentCategory AS AccountAssignmentCategory,
SchedulingAgreementItem.MultipleAcctAssgmtDistribution AS MultipleAcctAssgmtDistribution,
SchedulingAgreementItem.PartialInvoiceDistribution AS PartialInvoiceDistribution,
GoodsReceiptQuantity,
InvoiceReceiptQty,
SchedulingAgreementItem.TargetQuantity AS TargetQuantity,
SchedulingAgreementItem.NetPriceQuantity AS NetPriceQuantity,
ScheduleLineOrderQuantity
FROM I_SchedgAgrmtItm AS SchedulingAgreementItem
INNER JOIN I_Schedgagrmthdr AS SchedulingAgreement ON /* join condition not captured in parsed metadata */
INNER JOIN P_SchedgAgrmtItemSLQty AS ScheduleLine ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN P_SchedulingAgreementHistory AS History ON /* join condition not captured in parsed metadata */
;
Learn More
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- CDS View Annotations — A Complete Guide
- What Is a CDS View in SAP S/4HANA?
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- 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
- BSEG to ACDOCA: The Universal Journal Migration
- Business Partner Migration: KNA1/LFA1 to BUT000
- Material Document Migration: MSEG/MKPF to MATDOC
- How to Find the Right CDS View for an SAP Table
- BW Extractor to CDS View Migration Guide
- S/4HANA CDS View Deprecation: What You Need to Know
- ABAP CDS View Tutorial — From Basics to Real-World Examples
- RAP and CDS Views — Building Transactional Apps in SAP S/4HANA
- Sales Document Status Migration: VBUP/VBUK Removal in S/4HANA
- CO Tables in S/4HANA: COEP, COBK, COSS, COSP to ACDOCA