P_SchedgAgrmtItemScheduleLines

DDL: P_SCHEDGAGRMTITEMSCHEDULELINES SQL: PSCHAGSCHEDLINE Type: view CONSUMPTION Package: ODATA_MM_ANALYTICS

Scheduling Agreement Item Schedule Lines

P_SchedgAgrmtItemScheduleLines is a Consumption CDS View that provides data about "Scheduling Agreement Item Schedule Lines" in SAP S/4HANA. It reads from 3 data sources (I_Schedgline, I_Schedgagrmthdr, I_SchedgAgrmtItm) and exposes 29 fields with key fields SchedulingAgreement, SchedulingAgreementItem, ScheduleLine. Part of development package ODATA_MM_ANALYTICS.

Data Sources (3)

SourceAliasJoin Type
I_Schedgline ScheduleLine inner
I_Schedgagrmthdr SchedulingAgreement inner
I_SchedgAgrmtItm SchedulingAgreementItem from

Parameters (3)

NameTypeDefault
P_DisplayCurrency displaycurrency
P_StartDate bedat
P_EndDate bedat

Annotations (6)

NameValueLevelField
AbapCatalog.sqlViewName PSCHAGSCHEDLINE view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #PRIVILEGED_ONLY view
EndUserText.label Scheduling Agreement Item Schedule Lines view
VDM.private true view
VDM.viewType #CONSUMPTION view

Fields (29)

KeyFieldSource TableSource FieldDescription
KEY SchedulingAgreement
KEY SchedulingAgreementItem
KEY ScheduleLine ScheduleLine Schedule Line
Supplier I_Schedgagrmthdr Supplier Supplier
PurchasingOrganization I_Schedgagrmthdr PurchasingOrganization Purchasing Organization
PurchasingGroup I_Schedgagrmthdr PurchasingGroup Purchasing Group
PurchasingDocumentOrderDate I_Schedgagrmthdr PurchasingDocumentOrderDate PO Date
DocumentCurrency I_Schedgagrmthdr DocumentCurrency Document Currency
ValidityStartDate I_Schedgagrmthdr ValidityStartDate Validity Start Date
ValidityEndDate I_Schedgagrmthdr ValidityEndDate ValidTo
PurchasingDocumentType I_Schedgagrmthdr PurchasingDocumentType RFQ Type
CompanyCode I_Schedgagrmthdr CompanyCode Receiver Company Code
Plant I_SchedgAgrmtItm Plant Valuation Area
StorageLocation I_SchedgAgrmtItm StorageLocation StorageLocation
MaterialGroup I_SchedgAgrmtItm MaterialGroup Product Group
Material I_SchedgAgrmtItm Material Vehicle Model
NetPriceAmount I_SchedgAgrmtItm NetPriceAmount Net Price
NetPriceQuantity I_SchedgAgrmtItm NetPriceQuantity Price Unit
OrderQuantityUnit I_SchedgAgrmtItm OrderQuantityUnit Sales Unit
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
TargetQuantity I_SchedgAgrmtItm TargetQuantity Target Quantity
ScheduleLineDeliveryDate I_Schedgline ScheduleLineDeliveryDate Delivery Date
dec32else0endasNetPriceAmountInDspCrcy

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_SchedgAgrmtItemScheduleLines.
-- 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: PSCHAGSCHEDLINE
-- Parameters: P_DisplayCurrency : displaycurrency, P_StartDate : bedat, P_EndDate : bedat

CREATE VIEW P_SchedgAgrmtItemScheduleLines AS
SELECT
  cast( SchedulingAgreementItem.SchedulingAgreement as mm_scheduling_agreement ) AS SchedulingAgreement,
  cast( SchedulingAgreementItem.SchedulingAgreementItem as mm_scheduling_agreement_item ) AS SchedulingAgreementItem,
  ScheduleLine,
  SchedulingAgreement.Supplier AS Supplier,
  SchedulingAgreement.PurchasingOrganization AS PurchasingOrganization,
  SchedulingAgreement.PurchasingGroup AS PurchasingGroup,
  SchedulingAgreement.PurchasingDocumentOrderDate AS PurchasingDocumentOrderDate,
  SchedulingAgreement.DocumentCurrency AS DocumentCurrency,
  SchedulingAgreement.ValidityStartDate AS ValidityStartDate,
  SchedulingAgreement.ValidityEndDate AS ValidityEndDate,
  SchedulingAgreement.PurchasingDocumentType AS PurchasingDocumentType,
  SchedulingAgreement.CompanyCode AS CompanyCode,
  SchedulingAgreementItem.Plant AS Plant,
  SchedulingAgreementItem.StorageLocation AS StorageLocation,
  SchedulingAgreementItem.MaterialGroup AS MaterialGroup,
  SchedulingAgreementItem.Material AS Material,
  SchedulingAgreementItem.NetPriceAmount AS NetPriceAmount,
  SchedulingAgreementItem.NetPriceQuantity AS NetPriceQuantity,
  SchedulingAgreementItem.OrderQuantityUnit AS OrderQuantityUnit,
  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,
  SchedulingAgreementItem.TargetQuantity AS TargetQuantity,
  ScheduleLine.ScheduleLineDeliveryDate AS ScheduleLineDeliveryDate,
  case when OrdPriceUnitToOrderUnitDnmntr > 0 then cast( currency_conversion(amount => NetPriceAmount, source_currency => SchedulingAgreement.DocumentCurrency, target_currency => $parameters.P_DisplayCurrency, exchange_rate_date => ScheduleLine.ScheduleLineDeliveryDate ) as abap.curr(13,3) ) * cast( division( OrderPriceUnitToOrderUnitNmrtr , OrdPriceUnitToOrderUnitDnmntr , 3 ) as abap.dec(3,2) ) else 0 end as NetPriceAmountInDspCrcy AS dec32else0endasNetPriceAmountInDspCrcy
FROM I_SchedgAgrmtItm AS SchedulingAgreementItem
INNER JOIN I_Schedgagrmthdr AS SchedulingAgreement ON /* join condition not captured in parsed metadata */
INNER JOIN I_Schedgline AS ScheduleLine ON /* join condition not captured in parsed metadata */
;