R_PPS_PURCHASEORDER

CDS View

PPS Purchase Order Internal View

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

CDS Views using this table (2)

ViewTypeJoinVDMDescription
R_PPS_PurchaseOrderTP view_entity from TRANSACTIONAL Purchase Order Transactional View
R_PPS_PurOrdVersionHistory view_entity inner BASIC Purchase Order Version History

Fields (87)

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

//@AbapCatalog.preserveKey: true

@AbapCatalog.compiler.compareFilter: true
@ClientHandling.algorithm: #SESSION_VARIABLE
@EndUserText.label: 'PPS Purchase Order Internal View'
@AccessControl: { authorizationCheck:#PRIVILEGED_ONLY, personalData.blocking: #BLOCKED_DATA_EXCLUDED, privilegedAssociations: [ '_SupplierAddress' ] }
@VDM.viewType : #BASIC
@AbapCatalog.sqlViewName: 'PPSPURCHASEORDER'
@ObjectModel.usageType.serviceQuality: #A
@ObjectModel.usageType.sizeCategory: #L
@ObjectModel.usageType.dataClass: #TRANSACTIONAL
@ObjectModel.semanticKey: [ 'PurchaseOrder' ]
@ObjectModel: {
 // modelCategory: #BUSINESS_OBJECT,

  compositionRoot:true,
  representativeKey: 'PurchaseOrder'
}

@VDM.lifecycle.contract.type: #SAP_INTERNAL_API

define view R_PPS_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,
      ActivePurchasingDocument,
      PurgDocChangeRequestStatus,
      PurchasingDocumentVersion,
      //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,

      cast( '' as abap.char( 510 ) )                                             as PPSFieldChangeIndicatorString,


      //_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                           = ''
  and(
       PurgDocChangeRequestStatus                      = ''
    or PurgDocChangeRequestStatus                      = '1'
    or PurgDocChangeRequestStatus                      = '2'
    or PurgDocChangeRequestStatus                      = '4'
  )
/*+[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":""
}
}*/