R_PURCHASEORDER

CDS View

Purchase Order Internal View

R_PURCHASEORDER is a CDS View in S/4HANA. Purchase Order Internal View. It contains 87 fields. 18 CDS views read from this table.

CDS Views using this table (18)

ViewTypeJoinVDMDescription
A_PurchaseOrder view from COMPOSITE Purchase Order
C_CntrlSuplrConfPurOrdVH view from CONSUMPTION Replicated Purchase Order
C_POProdComplianceCriticality view from CONSUMPTION Purchase Order Product Compliance Criticality Rating
C_SuplrConfPurchaseOrderVH view from CONSUMPTION Purchase Order Value Help
ESH_N_PURCHASE_ORDER view from
I_ARunSupSelRulePurOrdVH view from BASIC
I_POSupplierConfirmationAPI01 view inner BASIC Supplier Confirmation Data in PurOrd
I_PurchaseOrderAPI01 view from BASIC Purchase Order
I_PurchaseOrderChangeDocument view inner BASIC Purchase Order Change Document
I_PurchaseOrderEnhanced view from COMPOSITE Purchase Order enhanced
I_PurchaseOrderHistoryBasic view inner COMPOSITE Purchase Order History
I_PurchaseOrderTP view from TRANSACTIONAL Transactional View for Purchase Order
I_PurOrdChangeDocumentItem view inner BASIC Purchase Order Change Document Items
R_PurchaseOrderPartner view inner BASIC Purchase Order Partner
R_PurchaseOrderPlainLongText view from COMPOSITE Restricted view for Purchase Order Long text
R_PurchaseOrderTP view_entity from TRANSACTIONAL Purchase Order Transactional View
R_PurOrdExternalReference view_entity inner BASIC PO External References
R_PurOrdHistoryDeliveryCost view inner COMPOSITE Purchase Order History Delivery Cost

Fields (87)

KeyField CDS FieldsUsed in Views
KEY PurchaseOrder ARunSupplySelRuleAttribVal,PurchaseOrder 9
_CompanyCode _CompanyCode 2
_CreatedByUser _CreatedByUser 1
_DocumentCurrency _DocumentCurrency 2
_IncotermsClassification _IncotermsClassification 2
_IncotermsVersion _IncotermsVersion 2
_InvoicingParty _InvoicingParty 2
_Language _Language 2
_PaymentTerms _PaymentTerms 2
_PurchaseOrderCalcFields _PurchaseOrderCalcFields 1
_PurchaseOrderDeletionCode _PurchaseOrderDeletionCode 1
_PurchaseOrderType _PurchaseOrderType 1
_PurchasingGroup _PurchasingGroup 2
_PurchasingOrganization _PurchasingOrganization 2
_Supplier _Supplier 2
_SupplierAddress _SupplierAddress_2 1
_SupplyingPlant _SupplyingPlant 1
_SupplyingSupplier _SupplyingSupplier 1
CashDiscount1Days CashDiscount1Days 2
CashDiscount1Percent CashDiscount1Percent 2
CashDiscount2Days CashDiscount2Days 2
CashDiscount2Percent CashDiscount2Percent 2
CompanyCode CompanyCode 4
CorrespncExternalReference CorrespncExternalReference 2
CorrespncInternalReference CorrespncInternalReference 2
CreatedByUser CreatedByUser 2
CreationDate CreationDate 2
Customer Customer 1
DocumentCurrency DocumentCurrency 2
DownPaymentAmount DownPaymentAmount 1
DownPaymentDueDate DownPaymentDueDate 1
DownPaymentPercentageOfTotAmt DownPaymentPercentageOfTotAmt 1
DownPaymentType DownPaymentType 1
ExchangeRate ExchangeRate 1
ExchangeRateIsFixed ExchangeRateIsFixed 2
IncotermsClassification IncotermsClassification 2
IncotermsLocation1 IncotermsLocation1 2
IncotermsLocation2 IncotermsLocation2 2
IncotermsSupChnDvtgLocAddlUUID IncotermsSupChnDvtgLocAddlUUID 1
IncotermsSupChnLoc1AddlUUID IncotermsSupChnLoc1AddlUUID 1
IncotermsSupChnLoc2AddlUUID IncotermsSupChnLoc2AddlUUID 1
IncotermsTransferLocation IncotermsTransferLocation 2
IncotermsVersion IncotermsVersion 2
InvoicingParty InvoicingParty 2
IsIntrastatReportingExcluded IsIntrastatReportingExcluded 2
IsIntrastatReportingRelevant IsIntrastatReportingRelevant 2
ItemNumberIntervalForSubItems ItemNumberIntervalForSubItems 1
Language Language 2
LastChangeDateTime LastChangeDateTime 2
ManualSupplierAddressID ManualSupplierAddressID 2
NetPaymentDays NetPaymentDays 2
PaymentTerms PaymentTerms 2
PricingDocument PricingDocument,PurchasingDocumentCondition 2
PricingProcedure PricingProcedure 2
PurchaseContract PurchaseContract 2
PurchaseOrderDate PurchaseOrderDate 2
PurchaseOrderDeletionCode PurchaseOrderDeletionCode,PurchasingDocumentDeletionCode 2
PurchaseOrderSubtype PurchaseOrderSubtype 2
PurchaseOrderType PurchaseOrderType 7
PurchasingCompletenessStatus PurchasingCompletenessStatus 2
PurchasingDocumentOrigin PurchasingDocumentOrigin 2
PurchasingGroup PurchasingGroup 7
PurchasingOrganization PurchasingOrganization 7
PurchasingProcessingStatus PurchasingProcessingStatus 2
PurchasingReleaseStrategy PurchasingReleaseStrategy 2
PurgAggrgdProdCmplncSuplrSts PurgAggrgdProdCmplncSuplrSts 2
PurgAggrgdProdMarketabilitySts PurgAggrgdProdMarketabilitySts 2
PurgAggrgdSftyDataSheetStatus PurgAggrgdSftyDataSheetStatus 2
PurgProdCmplncTotDngrsGoodsSts PurgProdCmplncTotDngrsGoodsSts 2
PurgReasonForDocCancellation PurgReasonForDocCancellation 1
PurgReleaseSequenceStatus PurgReleaseSequenceStatus 1
PurgReleaseTimeTotalAmount PurgReleaseTimeTotalAmount 1
QuotationSubmissionDate QuotationSubmissionDate 1
ReleaseCode ReleaseCode 1
ReleaseIsNotCompleted ReleaseIsNotCompleted 2
RequestForQuotation RequestForQuotation 1
Supplier Supplier 4
SupplierAddressID SupplierAddressID 1
SupplierPhoneNumber SupplierPhoneNumber 2
SupplierQuotationExternalID SupplierQuotationExternalID 2
SupplierRespSalesPersonName SupplierRespSalesPersonName 2
SupplyingPlant SupplyingPlant 2
SupplyingSupplier SupplyingSupplier 2
TaxReturnCountry TaxReturnCountry 1
ValidityEndDate ValidityEndDate 2
ValidityStartDate ValidityStartDate 2
VATRegistrationCountry VATRegistrationCountry 1
@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


{
      //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,

      @Semantics.currencyCode
      @ObjectModel.foreignKey.association: '_DocumentCurrency'
      DocumentCurrency,

      ValidityStartDate,
      ValidityEndDate,

      @Consumption.hidden: true
      ExchangeRate,
      ExchangeRateIsFixed,

      LastChangeDateTime,
      IsEndOfPurposeBlocked,

      TaxReturnCountry,
      VATRegistrationCountry,
      PurgReasonForDocCancellation,
      PurgReleaseTimeTotalAmount,

      // fields from product compliance

      PurgAggrgdProdCmplncSuplrSts,
      PurgAggrgdProdMarketabilitySts,
      PurgAggrgdSftyDataSheetStatus,
      PurgProdCmplncTotDngrsGoodsSts,
      
      PurgDocDefaultShippingType,


      //_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

}
where
      R_PurchasingDocument.PurchasingDocumentCategory = 'F'
  and R_PurchasingDocument.PurchasingDocumentIsAged   = ''
  and IsEndOfPurposeBlocked                           = ''
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"R_PURCHASINGDOCUMENT"
],
"ASSOCIATED":
[
"I_COMPANYCODE",
"I_CURRENCY",
"I_INCOTERMSCLASSIFICATION",
"I_INCOTERMSVERSION",
"I_LANGUAGE",
"I_PAYMENTTERMS",
"I_PLANT",
"I_PURCHASEORDERCALCFIELDS",
"I_PURCHASEORDERDELETIONCODE",
"I_PURCHASEORDERTYPE",
"I_PURCHASINGGROUP",
"I_PURCHASINGORGANIZATION",
"I_PURCHASINGPROCESSINGSTATUS",
"I_SUPPLIER",
"I_USER",
"R_PURCHASEORDERITEM",
"R_PURCHASEORDERSUPPLIERADDRESS"
],
"BASE":
[
"R_PURCHASINGDOCUMENT"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/