P_ScheduleAgmtMassUpdate
Private View for Scheduling Agreement
P_ScheduleAgmtMassUpdate is a Consumption CDS View that provides data about "Private View for Scheduling Agreement" in SAP S/4HANA. It reads from 5 data sources (I_Schedgagrmthdr, I_Schedgagrmthdr, I_Schedgagrmthdr, I_SchedgAgrmtItm, I_PurchasingDocumentPartner) and exposes 158 fields with key field FormattedPurchasingDocItem. It has 2 associations to related views.
Data Sources (5)
| Source | Alias | Join Type |
|---|---|---|
| I_Schedgagrmthdr | _Header | from |
| I_Schedgagrmthdr | _Headr | left_outer |
| I_Schedgagrmthdr | _Headr | left_outer |
| I_SchedgAgrmtItm | _Item | union_all |
| I_PurchasingDocumentPartner | _Partner | union_all |
Associations (2)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [1..1] | C_SchedAgrmtMassUpdtValdtySts | _ShdStatusVH | $projection.SchedulingAgreement = _ShdStatusVH.SchedulingAgreement |
| [1..1] | P_ScheduleItemCount | _SACount | $projection.SchedulingAgreement = _SACount.SchedulingAgreement |
Annotations (13)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PSAGREEMENT | view | |
| VDM.private | true | view | |
| VDM.viewType | #CONSUMPTION | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AccessControl.authorizationCheck | #PRIVILEGED_ONLY | view | |
| EndUserText.label | Private View for Scheduling Agreement | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| ObjectModel.usageType.serviceQuality | #C | view | |
| ObjectModel.usageType.sizeCategory | #XL | view | |
| ObjectModel.usageType.dataClass | #TRANSACTIONAL | view | |
| Metadata.ignorePropagatedAnnotations | true | view | |
| VDM.lifecycle.status | #DEPRECATED | view | |
| VDM.lifecycle.successor | C_SchedgAgrmtMassUpdt | view |
Fields (158)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | FormattedPurchasingDocItem | |||
| SchedulingAgreement | SchedulingAgreement | |||
| SchedulingAgreementItem | ||||
| HierarchyNodeLevel | ||||
| ParentNode | ||||
| DrillDownState | ||||
| PaymentTerms | I_Schedgagrmthdr | PaymentTerms | ||
| DocumentCurrency | I_Schedgagrmthdr | DocumentCurrency | ||
| ExchangeRate | I_Schedgagrmthdr | ExchangeRate | ||
| ExchangeRateIsFixed | I_Schedgagrmthdr | ExchangeRateIsFixed | ||
| IncotermsClassification | I_Schedgagrmthdr | IncotermsClassification | ||
| IncotermsLocation1 | I_Schedgagrmthdr | IncotermsLocation1 | ||
| IncotermsLocation2 | I_Schedgagrmthdr | IncotermsLocation2 | ||
| IncotermsVersion | I_Schedgagrmthdr | IncotermsVersion | ||
| ProductType | ||||
| FirmTradeOffZoneBindMRP | ||||
| ShippingInstruction | ||||
| PurchasingDocumentCategory | ||||
| QualityCertificateType | ||||
| ConfirmationControl | ||||
| ReferenceDeliveryAddressID | ||||
| ItemLastTransmissionDate | ||||
| MinRemainingShelfLife | ||||
| MaterialType | ||||
| PurchasingDocumentDeletionCode | ||||
| PurchasingDocumentItemText | ||||
| Material | ||||
| Plant | ||||
| StorageLocation | ||||
| RequirementTracking | ||||
| SchedLineSemiFirmOrderInDays | ||||
| ScheduleLineFirmOrderInDays | ||||
| SchedAgrmtCumQtyReconcileDate | ||||
| PurgDocOrderAcknNumber | ||||
| IsOrderAcknRqd | ||||
| InvoiceIsGoodsReceiptBased | ||||
| InvoiceIsExpected | ||||
| AccountAssignmentCategory | ||||
| UnderdelivTolrtdLmtRatioInPct | ||||
| UnlimitedOverdeliveryIsAllowed | ||||
| OverdelivTolrtdLmtRatioInPct | ||||
| NoDaysReminder3 | ||||
| NoDaysReminder2 | ||||
| NoDaysReminder1 | ||||
| PurgDocEstimatedPrice | ||||
| PriceIsToBePrinted | ||||
| IsInfoRecordUpdated | ||||
| StockType | ||||
| TaxCode | ||||
| SupplierMaterialNumber | ||||
| PurchasingInfoRecord | ||||
| MaterialGroup | ||||
| PurchasingDocumentType | I_Schedgagrmthdr | PurchasingDocumentType | ||
| PurchasingOrganization | I_Schedgagrmthdr | PurchasingOrganization | ||
| CompanyCode | I_Schedgagrmthdr | CompanyCode | ||
| PurchasingGroup | ||||
| ItemIncotermsClassification | ||||
| PurchasingDocumentTypeName | ||||
| CompanyCodeName | ||||
| PurchasingDocumentOrderDate | I_Schedgagrmthdr | PurchasingDocumentOrderDate | ||
| TaxCalculationProcedure | ||||
| MaterialTypeName | ||||
| PurchasingDocumentCategoryName | ||||
| Supplier | I_Schedgagrmthdr | Supplier | ||
| PurchasingDocumentItemCategory | ||||
| PurchasingGroupName | ||||
| PurchaseContractValidityStatus | _ShdStatusVH | PurchaseContractValidityStatus | ||
| PurContrValidityStatusName | _ShdStatusVH | PurContrValidityStatusName | ||
| MaterialGroupName | ||||
| DefaultPartner | ||||
| EmploymentInternalID | ||||
| PartnerCounter | ||||
| PartnerFunction | ||||
| SupplierContact | ||||
| ReferenceSupplier | ||||
| SupplierSubrange | ||||
| IsStrategicPartner | ||||
| NumberOfContractItems | _SACount | NumberOfContractItems | ||
| char16asFormattedPurchasingDocItem | ||||
| SchedulingAgreement | I_SchedgAgrmtItm | SchedulingAgreement | ||
| SchedulingAgreementItem | SchedulingAgreementItem | |||
| HierarchyNodeLevel | ||||
| ParentNode | I_SchedgAgrmtItm | SchedulingAgreement | ||
| DrillDownState | ||||
| PaymentTerms | ||||
| DocumentCurrency | ||||
| ExchangeRate | ||||
| ExchangeRateIsFixed | ||||
| IncotermsClassification | ||||
| IncotermsLocation1 | ||||
| IncotermsLocation2 | ||||
| IncotermsVersion | ||||
| ProductType | ProductType | |||
| FirmTradeOffZoneBindMRP | FirmTradeOffZoneBindMRP | |||
| ShippingInstruction | ShippingInstruction | |||
| PurchasingDocumentCategory | I_SchedgAgrmtItm | PurchasingDocumentCategory | ||
| QualityCertificateType | QualityCertificateType | |||
| ConfirmationControl | ConfirmationControl | |||
| ReferenceDeliveryAddressID | ReferenceDeliveryAddressID | |||
| MinRemainingShelfLife | MinRemainingShelfLife | |||
| MaterialType | MaterialType | |||
| PurchasingDocumentDeletionCode | I_SchedgAgrmtItm | PurchasingDocumentDeletionCode | ||
| PurchasingDocumentItemText | PurchasingDocumentItemText | |||
| Material | Material | |||
| Plant | Plant | |||
| StorageLocation | StorageLocation | |||
| RequirementTracking | RequirementTracking | |||
| SchedLineSemiFirmOrderInDays | SchedLineSemiFirmOrderInDays | |||
| ScheduleLineFirmOrderInDays | ScheduleLineFirmOrderInDays | |||
| SchedAgrmtCumQtyReconcileDate | SchedAgrmtCumQtyReconcileDate | |||
| PurgDocOrderAcknNumber | PurgDocOrderAcknNumber | |||
| IsOrderAcknRqd | IsOrderAcknRqd | |||
| InvoiceIsGoodsReceiptBased | InvoiceIsGoodsReceiptBased | |||
| InvoiceIsExpected | InvoiceIsExpected | |||
| AccountAssignmentCategory | AccountAssignmentCategory | |||
| UnderdelivTolrtdLmtRatioInPct | UnderdelivTolrtdLmtRatioInPct | |||
| UnlimitedOverdeliveryIsAllowed | UnlimitedOverdeliveryIsAllowed | |||
| OverdelivTolrtdLmtRatioInPct | OverdelivTolrtdLmtRatioInPct | |||
| NoDaysReminder3 | NoDaysReminder3 | |||
| NoDaysReminder2 | NoDaysReminder2 | |||
| NoDaysReminder1 | NoDaysReminder1 | |||
| PurgDocEstimatedPrice | PurgDocEstimatedPrice | |||
| PriceIsToBePrinted | PriceIsToBePrinted | |||
| IsInfoRecordUpdated | IsInfoRecordUpdated | |||
| StockType | StockType | |||
| TaxCode | TaxCode | |||
| SupplierMaterialNumber | SupplierMaterialNumber | |||
| PurchasingInfoRecord | PurchasingInfoRecord | |||
| MaterialGroup | MaterialGroup | |||
| PurchasingDocumentType | ||||
| PurchasingOrganization | I_Schedgagrmthdr | PurchasingOrganization | ||
| CompanyCode | I_Schedgagrmthdr | CompanyCode | ||
| PurchasingGroup | ||||
| ItemIncotermsClassification | I_SchedgAgrmtItm | IncotermsClassification | ||
| PurchasingDocumentTypeName | ||||
| CompanyCodeName | ||||
| PurchasingDocumentOrderDate | ||||
| TaxCalculationProcedure | ||||
| MaterialTypeName | ||||
| PurchasingDocumentCategoryName | ||||
| ValidityStartDate | ||||
| ValidityEndDate | ||||
| Supplier | ||||
| PurchasingDocumentItemCategory | I_SchedgAgrmtItm | PurchasingDocumentItemCategory | ||
| PurchasingGroupName | ||||
| PurchaseContractValidityStatus | ||||
| PurContrValidityStatusName | ||||
| MaterialGroupName | ||||
| DefaultPartner | ||||
| EmploymentInternalID | ||||
| PartnerCounter | ||||
| PartnerFunction | ||||
| SupplierContact | ||||
| ReferenceSupplier | ||||
| SupplierSubrange | ||||
| IsStrategicPartner | ||||
| NumberOfContractItems | ||||
| PreferredSupplierName |
@AbapCatalog.sqlViewName: 'PSAGREEMENT'
@VDM.private: true
@VDM.viewType: #CONSUMPTION
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #PRIVILEGED_ONLY
@EndUserText.label: 'Private View for Scheduling Agreement'
@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel.usageType.serviceQuality: #C
@ObjectModel.usageType.sizeCategory: #XL
@ObjectModel.usageType.dataClass: #TRANSACTIONAL
@Metadata.ignorePropagatedAnnotations: true
@VDM.lifecycle.status:#DEPRECATED
@VDM.lifecycle.successor: 'C_SchedgAgrmtMassUpdt'
define view P_ScheduleAgmtMassUpdate
as select from I_Schedgagrmthdr as _Header
association [1..1] to C_SchedAgrmtMassUpdtValdtySts as _ShdStatusVH on $projection.SchedulingAgreement = _ShdStatusVH.SchedulingAgreement
association [1..1] to P_ScheduleItemCount as _SACount on $projection.SchedulingAgreement = _SACount.SchedulingAgreement
{
key cast(SchedulingAgreement as abap.char(16)) as FormattedPurchasingDocItem,
SchedulingAgreement,
cast('' as ebelp) as SchedulingAgreementItem,
//---------------------------------------------------------------------------------
// Hierarchy Fields - Would be used for creating SA and Item tree on the UI
//----------------------------------------------------------------------------------
cast ( '0' as abap.char(1)) as HierarchyNodeLevel,
cast ( ' ' as abap.char(16)) as ParentNode,
cast ('expanded' as abap.char(8)) as DrillDownState,
_Header.PaymentTerms as PaymentTerms,
@Semantics.currencyCode:true
_Header.DocumentCurrency as DocumentCurrency,
_Header.ExchangeRate as ExchangeRate,
_Header.ExchangeRateIsFixed as ExchangeRateIsFixed,
_Header.IncotermsClassification as IncotermsClassification,
_Header.IncotermsLocation1 as IncotermsLocation1,
_Header.IncotermsLocation2 as IncotermsLocation2,
_Header.IncotermsVersion as IncotermsVersion,
cast('' as producttype) as ProductType,
cast('' as mrpre) as FirmTradeOffZoneBindMRP,
cast('' as evers) as ShippingInstruction,
cast('' as bstyp) as PurchasingDocumentCategory,
cast('' as qzgtyp) as QualityCertificateType,
cast('' as bstae) as ConfirmationControl,
cast('' as adrn2) as ReferenceDeliveryAddressID,
cast('00000000' as drdat) as ItemLastTransmissionDate,
cast('0' as mhdrz) as MinRemainingShelfLife,
cast('' as mtart) as MaterialType,
cast('' as eloek) as PurchasingDocumentDeletionCode,
cast('' as txz01) as PurchasingDocumentItemText,
cast('_' as matnr) as Material,
cast('_' as ewerk) as Plant,
cast('' as vdm_storage_location) as StorageLocation,
cast('' as bednr) as RequirementTracking,
cast ('0' as etfz2) as SchedLineSemiFirmOrderInDays,
cast ('0' as etfz1) as ScheduleLineFirmOrderInDays,
cast ('00000000' as abdat) as SchedAgrmtCumQtyReconcileDate,
cast ('' as labnr) as PurgDocOrderAcknNumber,
cast ('' as kzabs) as IsOrderAcknRqd,
cast ('' as webre) as InvoiceIsGoodsReceiptBased,
cast ('' as repos) as InvoiceIsExpected,
cast ('_' as knttp) as AccountAssignmentCategory,
cast ('0' as untto) as UnderdelivTolrtdLmtRatioInPct,
cast ('' as uebtk) as UnlimitedOverdeliveryIsAllowed,
cast ('0' as uebto) as OverdelivTolrtdLmtRatioInPct,
cast ('0' as mahn3) as NoDaysReminder3,
cast ('0' as mahn2) as NoDaysReminder2,
cast ('0' as mahn1) as NoDaysReminder1,
cast ('' as schpr) as PurgDocEstimatedPrice,
cast ('' as prsdr) as PriceIsToBePrinted,
cast ('' as spinf) as IsInfoRecordUpdated,
cast ('' as insmk) as StockType,
cast ('' as mwskz) as TaxCode,
cast ('' as idnlf) as SupplierMaterialNumber,
cast ('' as infnr) as PurchasingInfoRecord,
cast ('_' as matkl) as MaterialGroup,
_Header.PurchasingDocumentType,
_Header.PurchasingOrganization,
_Header.CompanyCode,
_Header. PurchasingGroup,
cast('' as inco1) as ItemIncotermsClassification,
_Header._PurchasingDocumentType._Text[1: Language = $session.system_language ].PurchasingDocumentTypeName,
_Header._CompanyCode.CompanyCodeName as CompanyCodeName,
_Header.PurchasingDocumentOrderDate,
cast ('' as kalsm_d) as TaxCalculationProcedure,
cast('' as mtbez) as MaterialTypeName,
_PurchasingDocumentCategory._Text[1: Language = $session.system_language ].PurchasingDocumentCategoryName,
case ValidityStartDate
when (' ') then '00000000'
else ValidityStartDate
end as ValidityStartDate,
case ValidityEndDate
when (' ') then '00000000'
else ValidityEndDate
end as ValidityEndDate,
_Header.Supplier,
cast('_' as pstyp) as PurchasingDocumentItemCategory,
_Header._PurchasingGroup.PurchasingGroupName,
_ShdStatusVH.PurchaseContractValidityStatus,
_ShdStatusVH.PurContrValidityStatusName,
cast('' as productgroupdescription) as MaterialGroupName,
//---------------------------------------------------------------------------------
//Updatable Partner Fields
//----------------------------------------------------------------------------------
cast ('' as defpa) as DefaultPartner,
cast ('00000000' as pernr_d) as EmploymentInternalID, //Personnel Number
cast('' as parza) as PartnerCounter,
cast('_' as parvw) as PartnerFunction,
cast ('0000000000' as parnr) as SupplierContact, //Number of Contact Person
cast ('_' as lifn2) as ReferenceSupplier,
cast ('_' as ltsnr) as SupplierSubrange,
cast(' ' as boolean) as IsStrategicPartner,
_SACount.NumberOfContractItems,
cast('' as suppliername) as PreferredSupplierName
//SupplyingSupplier,
//InvoicingParty
}
where
_Header.PurchasingDocumentDeletionCode = ' '
union all select from I_SchedgAgrmtItm as _Item
left outer join I_Schedgagrmthdr as _Headr on _Item.SchedulingAgreement = _Headr.SchedulingAgreement
{
key cast(concat(concat(_Item.SchedulingAgreement, '/'), SchedulingAgreementItem) as abap.char(16)) as FormattedPurchasingDocItem,
_Item.SchedulingAgreement,
SchedulingAgreementItem,
//---------------------------------------------------------------------------------
// Hierarchy Fields - Would be used for creating SA and Item tree on the UI
//----------------------------------------------------------------------------------
cast ( '1' as abap.char( 1 )) as HierarchyNodeLevel,
_Item.SchedulingAgreement as ParentNode,
cast ('leaf' as abap.char(8)) as DrillDownState,
cast('' as farp_dzterm) as PaymentTerms,
@Semantics.currencyCode:true
cast('' as waers) as DocumentCurrency,
cast('0' as wkurs) as ExchangeRate,
cast('' as kufix) as ExchangeRateIsFixed,
cast ('' as inco1) as IncotermsClassification,
cast('' as inco2_l) as IncotermsLocation1,
cast('' as inco3_l) as IncotermsLocation2,
cast('' as incov) as IncotermsVersion,
ProductType,
FirmTradeOffZoneBindMRP,
ShippingInstruction,
_Item.PurchasingDocumentCategory,
QualityCertificateType,
ConfirmationControl,
ReferenceDeliveryAddressID,
case ItemLastTransmissionDate
when (' ') then '00000000'
else ItemLastTransmissionDate
end as ItemLastTransmissionDate,
MinRemainingShelfLife,
MaterialType,
_Item.PurchasingDocumentDeletionCode,
PurchasingDocumentItemText,
Material,
Plant,
StorageLocation,
RequirementTracking,
SchedLineSemiFirmOrderInDays,
ScheduleLineFirmOrderInDays,
SchedAgrmtCumQtyReconcileDate,
PurgDocOrderAcknNumber,
IsOrderAcknRqd,
InvoiceIsGoodsReceiptBased,
InvoiceIsExpected,
AccountAssignmentCategory,
UnderdelivTolrtdLmtRatioInPct,
UnlimitedOverdeliveryIsAllowed,
OverdelivTolrtdLmtRatioInPct,
NoDaysReminder3,
NoDaysReminder2,
NoDaysReminder1,
PurgDocEstimatedPrice,
PriceIsToBePrinted,
IsInfoRecordUpdated,
StockType,
TaxCode,
SupplierMaterialNumber,
PurchasingInfoRecord,
MaterialGroup,
cast('_' as bsart) as PurchasingDocumentType,
_Headr.PurchasingOrganization,
_Headr.CompanyCode,
cast('_' as ekgrp) as PurchasingGroup,
_Item.IncotermsClassification as ItemIncotermsClassification,
cast('' as batxt) as PurchasingDocumentTypeName,
_Item._CompanyCode.CompanyCodeName as CompanyCodeName,
cast ('00000000' as ebdat) as PurchasingDocumentOrderDate,
_Plant._Address._Country.TaxCalculationProcedure,
_Item._Material._MaterialType._Text[1: Language = $session.system_language ].MaterialTypeName,
_PurgDocumentCategory._Text[1: Language = $session.system_language ].PurchasingDocumentCategoryName,
cast('00000000' as kdatb) as ValidityStartDate,
cast('00000000' as kdate) as ValidityEndDate,
cast('_' as md_supplier) as Supplier,
_Item.PurchasingDocumentItemCategory,
cast('' as mm_a_purg_grp_name) as PurchasingGroupName,
cast('_' as mm_contract_status_id) as PurchaseContractValidityStatus,
cast('_' as mm_contract_status) as PurContrValidityStatusName,
_Item._MaterialGroup._Text[1: Language = $session.system_language ].MaterialGroupName,
//---------------------------------------------------------------------------------
//Updatable Partner Fields
//----------------------------------------------------------------------------------
cast ('' as defpa) as DefaultPartner,
cast ('00000000' as pernr_d) as EmploymentInternalID, //Personnel Number
cast('' as parza) as PartnerCounter,
cast('_' as parvw) as PartnerFunction,
cast ('0000000000' as parnr) as SupplierContact, //Number of Contact Person
cast ('_' as lifn2) as ReferenceSupplier,
cast ('_' as ltsnr) as SupplierSubrange,
cast(' ' as boolean) as IsStrategicPartner,
cast ('1' as mm_a_contractitems) as NumberOfContractItems,
cast('' as suppliername) as PreferredSupplierName
//cast('' as llief) as SupplyingSupplier,
//cast('' as lifre) as InvoicingParty
}
where
_Headr.PurchasingDocumentDeletionCode = ' '
and _Item.PurchasingDocumentDeletionCode = ' '
union all select from I_PurchasingDocumentPartner as _Partner
left outer join I_Schedgagrmthdr as _Headr on _Headr.SchedulingAgreement = _Partner.PurchasingDocument
{
key cast(concat(concat (concat(_Partner.PurchasingDocument, '/'), _Partner.PartnerFunction),_Partner.PartnerCounter) as abap.char( 16 )) as FormattedPurchasingDocItem,
_Partner.PurchasingDocument as SchedulingAgreement,
cast ('00000' as ebelp) as SchedulingAgreementItem,
//---------------------------------------------------------------------------------
// Hierarchy Fields - Would be used for creating SA and Item tree on the UI
//----------------------------------------------------------------------------------
cast ( '1' as abap.char(1)) as HierarchyNodeLevel,
_Partner.PurchasingDocument as ParentNode,
cast ('leaf' as abap.char(8)) as DrillDownState,
cast('' as farp_dzterm) as PaymentTerms,
@Semantics.currencyCode:true
cast('' as waers) as DocumentCurrency,
cast('0' as wkurs) as ExchangeRate,
cast('' as kufix) as ExchangeRateIsFixed,
cast ('' as inco1) as IncotermsClassification,
cast('' as inco2_l) as IncotermsLocation1,
cast('' as inco3_l) as IncotermsLocation2,
cast('' as incov) as IncotermsVersion,
cast('' as producttype) as ProductType,
cast('' as mrpre) as FirmTradeOffZoneBindMRP,
cast('' as evers) as ShippingInstruction,
cast('' as bstyp) as PurchasingDocumentCategory,
cast('' as qzgtyp) as QualityCertificateType,
cast('' as bstae) as ConfirmationControl,
cast('' as adrn2) as ReferenceDeliveryAddressID,
cast('00000000' as drdat) as ItemLastTransmissionDate,
cast('0' as mhdrz) as MinRemainingShelfLife,
cast('' as mtart) as MaterialType,
cast('' as eloek) as PurchasingDocumentDeletionCode,
cast('' as txz01) as PurchasingDocumentItemText,
cast('_' as matnr) as Material,
cast('_' as ewerk) as Plant,
cast('' as vdm_storage_location) as StorageLocation,
cast('' as bednr)
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