R_PurchaseOrder
Purchase Order Internal View
R_PurchaseOrder is a Basic CDS View that provides data about "Purchase Order Internal View" in SAP S/4HANA. It reads from 1 data source (R_PurchasingDocument) and exposes 108 fields with key field PurchaseOrder. It has 7 associations to related views. Part of development package VDM_MM_PUR_PO.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| R_PurchasingDocument | R_PurchasingDocument | from |
Associations (7)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | I_PurchaseOrderType | _PurchaseOrderType | _PurchaseOrderType.PurchaseOrderType = $projection.PurchaseOrderType |
| [0..*] | R_PurchaseOrderItem | _PurchaseOrderItem | $projection.PurchaseOrder = _PurchaseOrderItem.PurchaseOrder |
| [0..*] | R_PurchaseOrderSupplierAddress | _SupplierAddress | $projection.PurchaseOrder = _SupplierAddress.PurchaseOrder |
| [1..1] | I_PurchaseOrderCalcFields | _PurchaseOrderCalcFields | $projection.PurchaseOrder = _PurchaseOrderCalcFields.PurchaseOrder |
| [1..1] | I_PurchaseOrderDeletionCode | _PurchaseOrderDeletionCode | $projection.PurchaseOrderDeletionCode = _PurchaseOrderDeletionCode.PurchaseOrderDeletionCode |
| [0..*] | I_PurchaseOrderDeletionCodeT | _PurchaseOrderDeletionCodeText | $projection.PurchaseOrderDeletionCode = _PurchaseOrderDeletionCodeText.PurchaseOrderDeletionCode |
| [0..*] | I_PurchasingDocumentTypeText | _PurchaseOrderTypeText | _PurchaseOrderTypeText.PurchasingDocumentCategory = 'F' and $projection.PurchaseOrderType = _PurchaseOrderTypeText.PurchasingDocumentType |
Annotations (16)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.preserveKey | true | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| EndUserText.label | Purchase Order Internal View | view | |
| AccessControl.authorizationCheck | #CHECK | view | |
| AccessControl.personalData.blocking | #BLOCKED_DATA_EXCLUDED | view | |
| VDM.viewType | #BASIC | view | |
| AbapCatalog.sqlViewName | RMMPURCHASEORDER | view | |
| ObjectModel.usageType.serviceQuality | #A | view | |
| ObjectModel.usageType.sizeCategory | #L | view | |
| ObjectModel.usageType.dataClass | #TRANSACTIONAL | view | |
| ObjectModel.modelCategory | #BUSINESS_OBJECT | view | |
| ObjectModel.compositionRoot | true | view | |
| ObjectModel.semanticKey | PurchaseOrder | view | |
| ObjectModel.representativeKey | PurchaseOrder | view | |
| VDM.lifecycle.contract.type | #SAP_INTERNAL_API | view |
Fields (108)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | PurchaseOrder | |||
| PurchaseOrderType | PurchasingDocumentType | |||
| PurchaseOrderSubtype | PurchasingDocumentSubtype | |||
| PurchasingDocumentProcessCode | PurchasingDocumentProcessCode | |||
| PurchasingDocumentOrigin | PurchasingDocumentOrigin | |||
| PurchasingDocumentIsAged | PurchasingDocumentIsAged | |||
| CreatedByUser | CreatedByUser | |||
| CreationDate | CreationDate | |||
| PurchaseOrderDate | ||||
| Language | Language | |||
| PurchaseOrderDeletionCode | ||||
| ReleaseIsNotCompleted | ReleaseIsNotCompleted | |||
| PurchasingCompletenessStatus | PurchasingCompletenessStatus | |||
| PurchasingProcessingStatus | PurchasingProcessingStatus | |||
| PurgReleaseSequenceStatus | PurgReleaseSequenceStatus | |||
| ReleaseCode | ReleaseCode | |||
| PurchasingReleaseStrategy | PurchasingReleaseStrategy | |||
| CompanyCode | CompanyCode | |||
| PurchasingOrganization | PurchasingOrganization | |||
| PurchasingGroup | PurchasingGroup | |||
| Supplier | Supplier | |||
| ManualSupplierAddressID | ManualSupplierAddressID | |||
| SupplierAddressID | SupplierAddressID | |||
| SupplierRespSalesPersonName | SupplierRespSalesPersonName | |||
| SupplierPhoneNumber | SupplierPhoneNumber | |||
| SupplyingSupplier | SupplyingSupplier | |||
| SupplyingPlant | SupplyingPlant | |||
| InvoicingParty | InvoicingParty | |||
| Customer | Customer | |||
| PurchaseContract | PurchaseContract | |||
| RequestForQuotation | RequestForQuotation | |||
| QuotationSubmissionDate | QuotationSubmissionDate | |||
| PurchasingCollectiveNumber | PurchasingCollectiveNumber | |||
| ItemNumberIntervalForSubItems | ItemNumberIntervalForSubItems | |||
| SupplierQuotationExternalID | SupplierQuotationExternalID | |||
| PaymentTerms | PaymentTerms | |||
| CashDiscount1Days | CashDiscount1Days | |||
| CashDiscount2Days | CashDiscount2Days | |||
| NetPaymentDays | NetPaymentDays | |||
| CashDiscount1Percent | CashDiscount1Percent | |||
| CashDiscount2Percent | CashDiscount2Percent | |||
| DownPaymentType | DownPaymentType | |||
| DownPaymentPercentageOfTotAmt | DownPaymentPercentageOfTotAmt | |||
| DownPaymentAmount | DownPaymentAmount | |||
| DownPaymentDueDate | DownPaymentDueDate | |||
| IncotermsClassification | IncotermsClassification | |||
| IncotermsTransferLocation | IncotermsTransferLocation | |||
| IncotermsVersion | IncotermsVersion | |||
| IncotermsLocation1 | IncotermsLocation1 | |||
| IncotermsLocation2 | IncotermsLocation2 | |||
| IncotermsSupChnLoc1AddlUUID | IncotermsSupChnLoc1AddlUUID | |||
| IncotermsSupChnLoc2AddlUUID | IncotermsSupChnLoc2AddlUUID | |||
| IncotermsSupChnDvtgLocAddlUUID | IncotermsSupChnDvtgLocAddlUUID | |||
| IsIntrastatReportingRelevant | IsIntrastatReportingRelevant | |||
| IsIntrastatReportingExcluded | IsIntrastatReportingExcluded | |||
| CorrespncExternalReference | CorrespncExternalReference | |||
| CorrespncInternalReference | CorrespncInternalReference | |||
| PricingDocument | PricingDocument | |||
| PricingProcedure | PricingProcedure | |||
| TargetAmount | TargetAmount | |||
| DocumentCurrency | DocumentCurrency | |||
| ValidityStartDate | ValidityStartDate | |||
| ValidityEndDate | ValidityEndDate | |||
| ExchangeRate | ExchangeRate | |||
| ExchangeRateIsFixed | ExchangeRateIsFixed | |||
| LastChangeDateTime | LastChangeDateTime | |||
| IsEndOfPurposeBlocked | IsEndOfPurposeBlocked | |||
| TaxReturnCountry | TaxReturnCountry | |||
| VATRegistration | VATRegistration | |||
| VATRegistrationCountry | VATRegistrationCountry | |||
| PurgReasonForDocCancellation | PurgReasonForDocCancellation | |||
| PurgReleaseTimeTotalAmount | PurgReleaseTimeTotalAmount | |||
| PurgAggrgdProdCmplncSuplrSts | PurgAggrgdProdCmplncSuplrSts | |||
| PurgAggrgdProdMarketabilitySts | PurgAggrgdProdMarketabilitySts | |||
| PurgAggrgdSftyDataSheetStatus | PurgAggrgdSftyDataSheetStatus | |||
| PurgProdCmplncTotDngrsGoodsSts | PurgProdCmplncTotDngrsGoodsSts | |||
| PurgDocDefaultShippingType | PurgDocDefaultShippingType | |||
| MsgOnGoodsReceiptIsRequested | MsgOnGoodsReceiptIsRequested | |||
| _PurchaseOrderItem | _PurchaseOrderItem | |||
| _PurchaseOrderType | _PurchaseOrderType | |||
| _CompanyCode | _CompanyCode | |||
| _CreatedByUser | _CreatedByUser | |||
| _Supplier | _Supplier | |||
| _SupplyingSupplier | _SupplyingSupplier | |||
| _InvoicingParty | _InvoicingParty | |||
| _PurchasingOrganization | _PurchasingOrganization | |||
| _PurchasingGroup | _PurchasingGroup | |||
| _DocumentCurrency | _DocumentCurrency | |||
| _IncotermsClassification | _IncotermsClassification | |||
| _IncotermsVersion | _IncotermsVersion | |||
| _SupplyingPlant | _SupplyingPlant | |||
| _PaymentTerms | _PaymentTerms | |||
| _SupplierAddress | _SupplierAddress | |||
| _Language | _Language | |||
| _PurchaseOrderDeletionCode | _PurchaseOrderDeletionCode | |||
| _PurchaseOrderCalcFields | _PurchaseOrderCalcFields | |||
| _PurchasingProcessingStatus | _PurchasingProcessingStatus | |||
| _PurchaseOrderTypeText | _PurchaseOrderTypeText | |||
| _PurchaseOrderDeletionCodeText | _PurchaseOrderDeletionCodeText | |||
| _IncotermsClassificationText | _IncotermsClassificationText | |||
| _IncotermsVersionText | _IncotermsVersionText | |||
| _DocumentCurrencyText | _DocumentCurrencyText | |||
| _TaxReturnCountryText | _TaxReturnCountryText | |||
| _VATRegistrationCountryText | _VATRegistrationCountryText | |||
| _PurgTotProdCmplncSuplrStsT | _PurgTotProdCmplncSuplrStsT | |||
| _PurgTotProdMarketabilityStsT | _PurgTotProdMarketabilityStsT | |||
| _PurgAggrgdSftyDataSheetStsT | _PurgAggrgdSftyDataSheetStsT | |||
| _PurgTotDangerousGoodsStsT | _PurgTotDangerousGoodsStsT |
@AbapCatalog.preserveKey: true
@AbapCatalog.compiler.compareFilter: true
@ClientHandling.algorithm: #SESSION_VARIABLE
@EndUserText.label: 'Purchase Order Internal View'
@AccessControl: { authorizationCheck:#CHECK, personalData.blocking: #BLOCKED_DATA_EXCLUDED, privilegedAssociations: [ '_SupplierAddress' ] }
@VDM.viewType : #BASIC
@AbapCatalog.sqlViewName: 'RMMPURCHASEORDER'
@ObjectModel.usageType.serviceQuality: #A
@ObjectModel.usageType.sizeCategory: #L
@ObjectModel.usageType.dataClass: #TRANSACTIONAL
@ObjectModel: {
modelCategory: #BUSINESS_OBJECT,
compositionRoot:true,
semanticKey: 'PurchaseOrder',
representativeKey: 'PurchaseOrder'
}
@VDM.lifecycle.contract.type: #SAP_INTERNAL_API
define view R_PurchaseOrder
as select from R_PurchasingDocument
association [0..1] to I_PurchaseOrderType as _PurchaseOrderType on _PurchaseOrderType.PurchaseOrderType = $projection.PurchaseOrderType
association [0..*] to R_PurchaseOrderItem as _PurchaseOrderItem on $projection.PurchaseOrder = _PurchaseOrderItem.PurchaseOrder
association [0..*] to R_PurchaseOrderSupplierAddress as _SupplierAddress on $projection.PurchaseOrder = _SupplierAddress.PurchaseOrder
association [1..1] to I_PurchaseOrderCalcFields as _PurchaseOrderCalcFields on $projection.PurchaseOrder = _PurchaseOrderCalcFields.PurchaseOrder
association [1..1] to I_PurchaseOrderDeletionCode as _PurchaseOrderDeletionCode on $projection.PurchaseOrderDeletionCode = _PurchaseOrderDeletionCode.PurchaseOrderDeletionCode
// new asociations for CustomUI
association [0..*] to I_PurchaseOrderDeletionCodeT as _PurchaseOrderDeletionCodeText on $projection.PurchaseOrderDeletionCode = _PurchaseOrderDeletionCodeText.PurchaseOrderDeletionCode
association [0..*] to I_PurchasingDocumentTypeText as _PurchaseOrderTypeText on _PurchaseOrderTypeText.PurchasingDocumentCategory = 'F'
and $projection.PurchaseOrderType = _PurchaseOrderTypeText.PurchasingDocumentType
{
//Key
key cast (PurchasingDocument as vdm_purchaseorder preserving type) as PurchaseOrder,
//Category
@ObjectModel.foreignKey.association: '_PurchaseOrderType'
PurchasingDocumentType as PurchaseOrderType,
PurchasingDocumentSubtype as PurchaseOrderSubtype,
PurchasingDocumentProcessCode,
PurchasingDocumentOrigin,
PurchasingDocumentIsAged,
//Admin
CreatedByUser,
// @Semantics.businessDate.createdAt
CreationDate,
cast (PurchasingDocumentOrderDate as bedat preserving type) as PurchaseOrderDate,
@Semantics.language: true
@ObjectModel.foreignKey.association: '_Language'
Language,
//Status
@ObjectModel.foreignKey.association: '_PurchaseOrderDeletionCode'
cast (PurchasingDocumentDeletionCode as mmpur_po_del_code preserving type) as PurchaseOrderDeletionCode,
ReleaseIsNotCompleted,
PurchasingCompletenessStatus,
PurchasingProcessingStatus,
PurgReleaseSequenceStatus,
ReleaseCode,
PurchasingReleaseStrategy,
//Organization
@ObjectModel.foreignKey.association: '_CompanyCode'
CompanyCode,
@ObjectModel.foreignKey.association: '_PurchasingOrganization'
PurchasingOrganization,
@ObjectModel.foreignKey.association: '_PurchasingGroup'
PurchasingGroup,
//Supplier
@ObjectModel.foreignKey.association: '_Supplier'
Supplier,
ManualSupplierAddressID,
SupplierAddressID,
SupplierRespSalesPersonName,
SupplierPhoneNumber,
@ObjectModel.foreignKey.association: '_SupplyingSupplier'
SupplyingSupplier,
@ObjectModel.foreignKey.association: '_SupplyingPlant'
SupplyingPlant,
@ObjectModel.foreignKey.association: '_InvoicingParty'
InvoicingParty,
Customer,
// Contract
PurchaseContract,
// Request For Quotation
RequestForQuotation,
QuotationSubmissionDate,
// Collective Number
PurchasingCollectiveNumber,
ItemNumberIntervalForSubItems,
//Quotation
SupplierQuotationExternalID,
//PaymentTerms
@ObjectModel.foreignKey.association: '_PaymentTerms'
PaymentTerms,
CashDiscount1Days,
CashDiscount2Days,
NetPaymentDays,
CashDiscount1Percent,
CashDiscount2Percent,
//DownPayment
DownPaymentType,
DownPaymentPercentageOfTotAmt,
DownPaymentAmount,
DownPaymentDueDate,
//Incoterms
@ObjectModel.foreignKey.association: '_IncotermsClassification'
IncotermsClassification,
IncotermsTransferLocation,
@ObjectModel.foreignKey.association: '_IncotermsVersion'
IncotermsVersion,
IncotermsLocation1,
IncotermsLocation2,
IncotermsSupChnLoc1AddlUUID,
IncotermsSupChnLoc2AddlUUID,
IncotermsSupChnDvtgLocAddlUUID,
//Intratat
IsIntrastatReportingRelevant,
IsIntrastatReportingExcluded,
//References
CorrespncExternalReference, //Your reference
CorrespncInternalReference, //Our reference
//Pricing
PricingDocument,
PricingProcedure,
TargetAmount,
@Semantics.currencyCode
@ObjectModel.foreignKey.association: '_DocumentCurrency'
DocumentCurrency,
ValidityStartDate,
ValidityEndDate,
@Consumption.hidden: true
ExchangeRate,
ExchangeRateIsFixed,
LastChangeDateTime,
IsEndOfPurposeBlocked,
TaxReturnCountry,
VATRegistration,
VATRegistrationCountry,
PurgReasonForDocCancellation,
PurgReleaseTimeTotalAmount,
// fields from product compliance
PurgAggrgdProdCmplncSuplrSts,
PurgAggrgdProdMarketabilitySts,
PurgAggrgdSftyDataSheetStatus,
PurgProdCmplncTotDngrsGoodsSts,
PurgDocDefaultShippingType,
MsgOnGoodsReceiptIsRequested,
//_CompanyCode.FiscalYearVariant as FiscalYearVariant,
// Associations
@ObjectModel.association.type: [#TO_COMPOSITION_CHILD]
_PurchaseOrderItem,
_PurchaseOrderType,
_CompanyCode,
_CreatedByUser,
_Supplier,
_SupplyingSupplier,
_InvoicingParty,
_PurchasingOrganization,
_PurchasingGroup,
_DocumentCurrency,
_IncotermsClassification,
_IncotermsVersion,
_SupplyingPlant,
_PaymentTerms,
_SupplierAddress,
_Language,
_PurchaseOrderDeletionCode,
_PurchaseOrderCalcFields,
_PurchasingProcessingStatus,
//Missing Associations
//_AllContacts
// Partner
//Conditions
//PricingProcedure
// Text associations for CustomUI
_PurchaseOrderTypeText,
_PurchaseOrderDeletionCodeText,
_IncotermsClassificationText,
_IncotermsVersionText,
_DocumentCurrencyText,
_TaxReturnCountryText,
_VATRegistrationCountryText,
_PurgTotProdCmplncSuplrStsT,
_PurgTotProdMarketabilityStsT,
_PurgAggrgdSftyDataSheetStsT,
_PurgTotDangerousGoodsStsT
}
where
R_PurchasingDocument.PurchasingDocumentCategory = 'F'
and R_PurchasingDocument.PurchasingDocumentIsAged = ''
and IsEndOfPurposeBlocked = ''
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