P_PurchaseOrderCommitment
Purchase Order Private View for Commitments
P_PurchaseOrderCommitment is a Composite CDS View that provides data about "Purchase Order Private View for Commitments" in SAP S/4HANA. It reads from 2 data sources (I_GLAccountLineItem, R_PurchaseOrderItem) and exposes 57 fields with key fields PurchasingDocument, PurchasingDocumentItem, AccountAssignmentNumber, SourceReferenceDocSubitem, GLAccount. Part of development package ODATA_MM_PUR_PO_MAINTAIN_V2.
Data Sources (2)
| Source | Alias | Join Type |
|---|---|---|
| I_GLAccountLineItem | GLAItem | from |
| R_PurchaseOrderItem | PurchaseOrderItem | inner |
Annotations (9)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PPURORDCOMMIT | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| AccessControl.authorizationCheck | #NOT_ALLOWED | view | |
| ObjectModel.usageType.serviceQuality | #C | view | |
| ObjectModel.usageType.sizeCategory | #L | view | |
| ObjectModel.usageType.dataClass | #MIXED | view | |
| VDM.private | true | view | |
| VDM.viewType | #COMPOSITE | view |
Fields (57)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | PurchasingDocument | I_GLAccountLineItem | PurchasingDocument | |
| KEY | PurchasingDocumentItem | I_GLAccountLineItem | PurchasingDocumentItem | |
| KEY | AccountAssignmentNumber | I_GLAccountLineItem | AccountAssignmentNumber | |
| KEY | SourceReferenceDocSubitem | I_GLAccountLineItem | SourceReferenceDocSubitem | |
| KEY | GLAccount | I_GLAccountLineItem | GLAccount | |
| KEY | ControllingArea | I_GLAccountLineItem | ControllingArea | |
| KEY | FunctionalArea | I_GLAccountLineItem | FunctionalArea | |
| KEY | CompanyCode | I_GLAccountLineItem | CompanyCode | |
| KEY | FiscalYearPeriod | I_GLAccountLineItem | FiscalYearPeriod | |
| KEY | CashLedgerAccount | I_GLAccountLineItem | CashLedgerAccount | |
| KEY | CashLedgerCompanyCode | I_GLAccountLineItem | CashLedgerCompanyCode | |
| KEY | Fund | I_GLAccountLineItem | Fund | |
| KEY | GrantID | I_GLAccountLineItem | GrantID | |
| KEY | BudgetPeriod | I_GLAccountLineItem | BudgetPeriod | |
| KEY | PubSecBudgetAccount | I_GLAccountLineItem | PubSecBudgetAccount | |
| KEY | PubSecBudgetAccountCoCode | I_GLAccountLineItem | PubSecBudgetAccountCoCode | |
| KEY | PubSecBudgetIsRelevant | I_GLAccountLineItem | PubSecBudgetIsRelevant | |
| KEY | PubSecBudgetCnsmpnType | I_GLAccountLineItem | PubSecBudgetCnsmpnType | |
| KEY | CostCenter | I_GLAccountLineItem | CostCenter | |
| KEY | ProfitCenter | I_GLAccountLineItem | ProfitCenter | |
| KEY | Segment | I_GLAccountLineItem | Segment | |
| KEY | WBSElementInternalID | I_GLAccountLineItem | WBSElementInternalID | |
| KEY | WBSElement | I_GLAccountLineItem | WBSElement | |
| KEY | AccountAssignmentType | I_GLAccountLineItem | AccountAssignmentType | |
| KEY | AccountAssignment | I_GLAccountLineItem | AccountAssignment | |
| KEY | SponsoredProgram | I_GLAccountLineItem | SponsoredProgram | |
| KEY | SponsoredClass | I_GLAccountLineItem | SponsoredClass | |
| KEY | Plant | R_PurchaseOrderItem | Plant | |
| KEY | PurchaseOrderType | R_PurchaseOrderItem | PurchaseOrderType | |
| KEY | PurchasingOrganization | R_PurchaseOrderItem | PurchasingOrganization | |
| KEY | PurchasingGroup | R_PurchaseOrderItem | PurchasingGroup | |
| KEY | PurchaseOrderItemText | R_PurchaseOrderItem | PurchaseOrderItemText | |
| Ledger | I_GLAccountLineItem | Ledger | ||
| IsCommitment | I_GLAccountLineItem | IsCommitment | ||
| TransactionCurrency | I_GLAccountLineItem | TransactionCurrency | ||
| CompanyCodeCurrency | I_GLAccountLineItem | CompanyCodeCurrency | ||
| GlobalCurrency | I_GLAccountLineItem | GlobalCurrency | ||
| FinancialManagementArea | I_GLAccountLineItem | FinancialManagementArea | ||
| _FunctionalArea | I_GLAccountLineItem | _FunctionalArea | ||
| _ControllingArea | I_GLAccountLineItem | _ControllingArea | ||
| _CompanyCodeText | I_GLAccountLineItem | _CompanyCodeText | ||
| _FundText | I_GLAccountLineItem | _FundText | ||
| _Grant | I_GLAccountLineItem | _Grant | ||
| _BudgetPeriod | I_GLAccountLineItem | _BudgetPeriod | ||
| _PubSecBudgetAccount | I_GLAccountLineItem | _PubSecBudgetAccount | ||
| _PubSecBudgetAccountCoCode | I_GLAccountLineItem | _PubSecBudgetAccountCoCode | ||
| _BudgetPeriodText | I_GLAccountLineItem | _BudgetPeriodText | ||
| _CashLedgerAccount | ||||
| _PubSecBudgetCnsmpnType | I_GLAccountLineItem | _PubSecBudgetCnsmpnType | ||
| _CostCenterText | I_GLAccountLineItem | _CostCenterText | ||
| _ProfitCenterText | I_GLAccountLineItem | _ProfitCenterText | ||
| _SegmentText | I_GLAccountLineItem | _SegmentText | ||
| _WBSElementBasicDataText | I_GLAccountLineItem | _WBSElementBasicDataText | ||
| _WBSElement | I_GLAccountLineItem | _WBSElement | ||
| _AccountAssignmentType | I_GLAccountLineItem | _AccountAssignmentType | ||
| _SponsoredProgram | I_GLAccountLineItem | _SponsoredProgram | ||
| _SponsoredClass | I_GLAccountLineItem | _SponsoredClass |
@AbapCatalog.sqlViewName: 'PPURORDCOMMIT'
@AbapCatalog.compiler.compareFilter: true
@ClientHandling.algorithm: #SESSION_VARIABLE
@AccessControl.authorizationCheck: #NOT_ALLOWED
@ObjectModel.usageType.serviceQuality: #C
@ObjectModel.usageType.sizeCategory: #L
@ObjectModel.usageType.dataClass: #MIXED
@VDM.private: true
@VDM.viewType: #COMPOSITE
define view P_PurchaseOrderCommitment
as select from I_GLAccountLineItem as GLAItem
inner join R_PurchaseOrderItem as PurchaseOrderItem on GLAItem.PurchasingDocument = PurchaseOrderItem.PurchaseOrder
and GLAItem.PurchasingDocumentItem = PurchaseOrderItem.PurchaseOrderItem
association[0..1] to I_PredictionLedger as _PredictionLedger on $projection.Ledger = _PredictionLedger.PredictionLedger
-- :* association to the Account Assignment child node
// association [1..1] to I_PurOrdAccountAssignment as _PurOrdAcctAssignment on _PurOrdAcctAssignment.PurchaseOrder = $projection.PurchasingDocument
// and _PurOrdAcctAssignment.PurchaseOrderItem = $projection.PurchasingDocumentItem
// and _PurOrdAcctAssignment.AccountAssignmentNumber = $projection.AccountAssignmentNumber
{
key GLAItem.PurchasingDocument,
key GLAItem.PurchasingDocumentItem,
key GLAItem.AccountAssignmentNumber,
key GLAItem.SourceReferenceDocSubitem,
key GLAItem.GLAccount,
key GLAItem.ControllingArea,
key GLAItem.FunctionalArea,
key GLAItem.CompanyCode,
key GLAItem.FiscalYearPeriod,
key GLAItem.CashLedgerAccount,
key GLAItem.CashLedgerCompanyCode,
key GLAItem.Fund,
key GLAItem.GrantID,
key GLAItem.BudgetPeriod,
key GLAItem.PubSecBudgetAccount,
key GLAItem.PubSecBudgetAccountCoCode,
key GLAItem.PubSecBudgetIsRelevant,
key GLAItem.PubSecBudgetCnsmpnType,
key GLAItem.CostCenter,
key GLAItem.ProfitCenter,
key GLAItem.Segment,
key GLAItem.WBSElementInternalID,
key GLAItem.WBSElement,
key GLAItem.AccountAssignmentType,
key GLAItem.AccountAssignment,
key GLAItem.SponsoredProgram,
key GLAItem.SponsoredClass,
key PurchaseOrderItem.Plant,
key PurchaseOrderItem.PurchaseOrderType,
key PurchaseOrderItem.PurchasingOrganization,
key PurchaseOrderItem.PurchasingGroup,
key PurchaseOrderItem.PurchaseOrderItemText,
GLAItem.Ledger,
GLAItem.IsCommitment,
// ------------------AGGREGATIONS----------------------
// aggregation of amounts in transaction currency is commited amount
@DefaultAggregation: #SUM
@Semantics.amount.currencyCode: 'TransactionCurrency'
sum (
GLAItem.AmountInTransactionCurrency
) as AmountInTransactionCurrency,
//// aggregation of positive amounts (created by PO) in transaction currency is planned amount
// @DefaultAggregation: #SUM
// @Semantics.amount.currencyCode: 'TransactionCurrency'
// sum (
// case
// when ( AmountInTransactionCurrency < 0 ) // ignore negative amounts
// then
// 0
// else
// AmountInTransactionCurrency end
// ) as PlannedAmountInTransactnCrncy,
@DefaultAggregation: #SUM
@Semantics.amount.currencyCode: 'CompanyCodeCurrency'
sum (
GLAItem.AmountInCompanyCodeCurrency
) as AmountInCompanyCodeCurrency,
@DefaultAggregation: #SUM
@Semantics.amount.currencyCode: 'GlobalCurrency'
sum (
GLAItem.AmountInGlobalCurrency
) as AmountInGlobalCurrency,
//------------------------------------------------------
// @Semantics: { unitOfMeasure: true }
// BaseUnit,
// @Semantics: { quantity.unitOfMeasure: 'BaseUnit' }
// _PurOrdAcctAssignment.Quantity as PlannedQuantity,
@Semantics.currencyCode: true
GLAItem.TransactionCurrency,
@Semantics.currencyCode: true
GLAItem.CompanyCodeCurrency,
@Semantics.currencyCode: true
GLAItem.GlobalCurrency,
GLAItem.FinancialManagementArea,
GLAItem._FunctionalArea,
// GLAItem._GLAccountInChartOfAccounts,
GLAItem._ControllingArea,
GLAItem._CompanyCodeText ,
//GLAItem._CashLedgerAccount,
GLAItem._FundText,
GLAItem._Grant,
GLAItem._BudgetPeriod,
GLAItem._PubSecBudgetAccount,
GLAItem._PubSecBudgetAccountCoCode,
GLAItem._BudgetPeriodText,
GLAItem. _CashLedgerAccount,
GLAItem._PubSecBudgetCnsmpnType,
GLAItem._CostCenterText ,
GLAItem._ProfitCenterText,
GLAItem._SegmentText,
GLAItem._WBSElementBasicDataText,
GLAItem._WBSElement,
GLAItem._AccountAssignmentType,
GLAItem._SponsoredProgram,
GLAItem._SponsoredClass
}
where
GLAItem.SourceReferenceDocumentType = 'PORD'
and GLAItem.IsCommitment = 'X'
and _PredictionLedger.LedgerIsRelevantForAvailyCtrl = 'X'
group by
GLAItem.PurchasingDocument,
GLAItem.PurchasingDocumentItem,
GLAItem.AccountAssignmentNumber,
GLAItem.SourceReferenceDocSubitem,
GLAItem.IsCommitment,
GLAItem.GLAccount,
GLAItem.ControllingArea,
GLAItem.FunctionalArea,
GLAItem.TransactionCurrency,
GLAItem.CompanyCodeCurrency,
GLAItem.GlobalCurrency,
GLAItem.ControllingObjectCurrency,
GLAItem.SourceLedger,
GLAItem.CompanyCode,
GLAItem.FiscalYearPeriod,
GLAItem.FiscalYear,
GLAItem.Ledger,
GLAItem.CashLedgerAccount,
GLAItem.CashLedgerCompanyCode,
GLAItem.Fund,
GLAItem.GrantID,
GLAItem.BudgetPeriod,
GLAItem.PubSecBudgetAccount,
GLAItem.PubSecBudgetAccountCoCode,
GLAItem.PubSecBudgetIsRelevant,
GLAItem.PubSecBudgetCnsmpnType,
GLAItem.CostCenter,
GLAItem.ProfitCenter,
GLAItem.Segment,
GLAItem.WBSElementInternalID,
GLAItem.WBSElement,
GLAItem.AccountAssignmentType,
GLAItem.AccountAssignment,
GLAItem.SponsoredProgram,
GLAItem.SponsoredClass,
GLAItem.FinancialManagementArea,
PurchaseOrderItem.Plant,
PurchaseOrderItem.PurchaseOrderType,
PurchaseOrderItem.PurchasingOrganization,
PurchaseOrderItem.PurchasingGroup,
PurchaseOrderItem.PurchaseOrderItemText
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