I_PURCHASEORDERTP

CDS View

Transactional View for Purchase Order

I_PURCHASEORDERTP is a CDS View in S/4HANA. Transactional View for Purchase Order. It contains 38 fields. 1 CDS views read from this table.

CDS Views using this table (1)

ViewTypeJoinVDMDescription
C_PurchaseOrderTP view from CONSUMPTION Purchase Order

Fields (38)

KeyField CDS FieldsUsed in Views
KEY PurchaseOrder PurchaseOrder 1
CashDiscount1Days CashDiscount1Days 1
CashDiscount2Days CashDiscount2Days 1
CompanyCode CompanyCode 1
CorrespncExternalReference CorrespncExternalReference 1
CorrespncInternalReference CorrespncInternalReference 1
CreatedByUserFullName CreatedByUserFullName 1
CreationDate CreationDate 1
DocumentCurrency DocumentCurrency 1
ExchangeRateForEdit ExchangeRateForEdit 1
ExchangeRateIsFixed ExchangeRateIsFixed 1
IncotermsClassification IncotermsClassification 1
IncotermsDvtgLocDescription IncotermsDvtgLocDescription 1
IncotermsDvtgLocIdentifier IncotermsDvtgLocIdentifier 1
IncotermsLocation1 IncotermsLocation1 1
IncotermsLocation1Identifier IncotermsLocation1Identifier 1
IncotermsLocation2 IncotermsLocation2 1
IncotermsLocation2Identifier IncotermsLocation2Identifier 1
IncotermsSupChnDvtgLocAddlUUID IncotermsSupChnDvtgLocAddlUUID 1
IncotermsSupChnLoc1AddlUUID IncotermsSupChnLoc1AddlUUID 1
IncotermsSupChnLoc2AddlUUID IncotermsSupChnLoc2AddlUUID 1
IncotermsVersion IncotermsVersion 1
InvoicingParty InvoicingParty 1
IsIntrastatReportingExcluded IsIntrastatReportingExcluded 1
IsIntrastatReportingRelevant IsIntrastatReportingRelevant 1
Language Language 1
NetPaymentDays NetPaymentDays 1
POReworkCommentText POReworkCommentText 1
PurchaseOrderDate PurchaseOrderDate 1
PurchaseOrderHasCommitmentItem PurchaseOrderHasCommitmentItem 1
PurchaseOrderType PurchaseOrderType 1
PurchaseOrderTypeName PurchaseOrderTypeName 1
PurchasingCompletenessStatus PurchasingCompletenessStatus 1
PurchasingGroup PurchasingGroup 1
PurchasingProcessingStatus PurchasingProcessingStatus 1
ReleaseIsNotCompleted ReleaseIsNotCompleted 1
Supplier Supplier 1
SupplierPhoneNumber SupplierPhoneNumber 1
@VDM.viewType: #TRANSACTIONAL
@AbapCatalog.sqlViewName: 'IPURORDTP'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'Transactional View for Purchase Order'
@VDM.lifecycle.contract.type: #SAP_INTERNAL_API

@ObjectModel: {
    compositionRoot: true,
    transactionalProcessingEnabled: true,
    draftEnabled: true,
    writeDraftPersistence: 'PURORDTP_D',
    createEnabled: true,
    updateEnabled: true,
    deleteEnabled: true,
    semanticKey: 'PurchaseOrder',
    representativeKey: 'PurchaseOrder',
    sapObjectNodeType.name: 'PurchaseOrder'
}

@ObjectModel.usageType.serviceQuality: #C
@ObjectModel.usageType.sizeCategory: #L
@ObjectModel.usageType.dataClass: #TRANSACTIONAL
@ObjectModel.entityChangeStateId: 'LastChangeDateTime'
@AccessControl.personalData.blocking: #NOT_REQUIRED
    
define view I_PurchaseOrderTP
 
  as select from R_PurchaseOrder as Document
  association [1..1] to I_PurchaseOrderNetAmount     as _PurchaseOrderNetAmount  on  _PurchaseOrderNetAmount.PurchaseOrder = $projection.PurchaseOrder
  association [1..*] to I_PurchaseOrderItemTP        as _PurchaseOrderItemTP     on  _PurchaseOrderItemTP.PurchaseOrder = $projection.PurchaseOrder
  association [1..*] to I_PurchaseOrderPartnerTP     as _PurchaseOrderPartnerTP  on  _PurchaseOrderPartnerTP.PurchaseOrder = $projection.PurchaseOrder
  
  association [1..1] to I_PurOrdSupplierAddressTP    as _PurOrdSupplierAddressTP on  _PurOrdSupplierAddressTP.PurchaseOrder = $projection.PurchaseOrder
  association [1..1] to I_PurchaseOrderCalcFields    as _PurchaseOrderCalcFields on  _PurchaseOrderCalcFields.PurchaseOrder = $projection.PurchaseOrder
  association [0..1] to I_PurchasingDocumentTypeText as _PurchaseOrderTypeText   on  _PurchaseOrderTypeText.PurchasingDocumentType     = $projection.PurchaseOrderType
                                                                                 and _PurchaseOrderTypeText.PurchasingDocumentCategory = 'F'
                                                                                 and _PurchaseOrderTypeText.Language                   = $session.system_language
  association [0..1] to I_User                       as _User                    on  _User.UserID = $projection.CreatedByUser
  --Extension Association
  association [1..1] to E_PurchasingDocument         as _PurchaseOrderExtension  on  $projection.PurchaseOrder = _PurchaseOrderExtension.PurchasingDocument
  association [0..*] to I_PurchaseOrderNoteTP        as _PurchaseOrderNote       on  _PurchaseOrderNote.PurchaseOrder = $projection.PurchaseOrder
  association [0..1] to R_PurOrdHasItemHierarchy     as _PurOrdHasItemHierarchy  on  $projection.PurchaseOrder = _PurOrdHasItemHierarchy.PurchaseOrder

{

  key Document.PurchaseOrder,
      @ObjectModel: { readOnly: 'EXTERNAL_CALCULATION'}
      Document.PurchaseOrderType,
      _PurchaseOrderTypeText.PurchasingDocumentTypeName                                   as PurchaseOrderTypeName,
      Document.PurchaseOrderSubtype,
      Document.PurchasingDocumentOrigin,
      Document.CreatedByUser,
      @Semantics.text: true
      _User.UserDescription                                                               as CreatedByUserFullName,
      Document.CreationDate,
      Document.PurchaseOrderDate,
      Document.ValidityStartDate,
      Document.ValidityEndDate,
      //@Semantics.language: true

      Document.Language,
      Document.PurchaseOrderDeletionCode                                                  as PurchasingDocumentDeletionCode,
      Document.ReleaseIsNotCompleted,
      Document.PurchasingProcessingStatus,
      //    Document.PurchasingProcessingStatusName,

      Document.PurchasingCompletenessStatus,
      Document.PurchasingReleaseStrategy,
      @ObjectModel: { readOnly: 'EXTERNAL_CALCULATION'}
      Document.CompanyCode,
      @ObjectModel: { readOnly: 'EXTERNAL_CALCULATION'}
      Document.PurchasingOrganization,
      @ObjectModel: { readOnly: 'EXTERNAL_CALCULATION'}
      Document.PurchasingGroup,
      @ObjectModel: { readOnly: 'EXTERNAL_CALCULATION' }
      Document.Supplier,
      Document.SupplierRespSalesPersonName,
      Document.SupplierPhoneNumber,
      Document.SupplyingSupplier,
      Document.SupplyingPlant,
      //References

      Document.CorrespncExternalReference, //Your reference

      Document.CorrespncInternalReference, //Our reference


      @ObjectModel: { readOnly: 'EXTERNAL_CALCULATION' }
      Document.InvoicingParty,
      @ObjectModel: { readOnly: 'EXTERNAL_CALCULATION' }
      Document.PaymentTerms,
      @ObjectModel: { readOnly: 'EXTERNAL_CALCULATION' }
      Document.CashDiscount1Days,
      @ObjectModel: { readOnly: 'EXTERNAL_CALCULATION' }
      Document.CashDiscount2Days,
      @ObjectModel: { readOnly: 'EXTERNAL_CALCULATION' }
      Document.NetPaymentDays,
      @ObjectModel: { readOnly: 'EXTERNAL_CALCULATION' }
      Document.CashDiscount1Percent,
      @ObjectModel: { readOnly: 'EXTERNAL_CALCULATION' }
      Document.CashDiscount2Percent,
      @ObjectModel: { readOnly: 'EXTERNAL_CALCULATION' }
      Document.IncotermsClassification,
      Document.IncotermsTransferLocation,
      Document.IncotermsVersion,
      Document.IncotermsLocation1,
      Document.IncotermsLocation2,

      // TM Location Handling

      cast( '' as tminco_loc_1_id )                                                      as IncotermsLocation1Identifier,
      cast( '' as tminco_loc_2_id )                                                      as IncotermsLocation2Identifier,
      cast( '' as tminco_loc_d_id )                                                      as IncotermsDvtgLocIdentifier,
      cast( '' as tminco_loc_d_descr )                                                   as IncotermsDvtgLocDescription,      
      Document.IncotermsSupChnLoc1AddlUUID,      
      Document.IncotermsSupChnLoc2AddlUUID,
      Document.IncotermsSupChnDvtgLocAddlUUID,
                        
      @ObjectModel: { readOnly: 'true' }
      Document.IsIntrastatReportingRelevant,
      @ObjectModel: { readOnly: 'true' }
      Document.IsIntrastatReportingExcluded,
      Document.PricingDocument                                                            as PurchasingDocumentCondition,
      Document.PricingProcedure,
      @ObjectModel: { readOnly: 'EXTERNAL_CALCULATION' }
      Document.DocumentCurrency,
      @ObjectModel: { readOnly: 'true' }
      Document.ExchangeRate,
      @ObjectModel: { readOnly: 'EXTERNAL_CALCULATION' }
      cast(Document.ExchangeRate as abap.char( 12 ))                                      as ExchangeRateForEdit,
      Document.ExchangeRateIsFixed,
      Document.LastChangeDateTime,

      @Semantics.amount.currencyCode: 'DocumentCurrency'
      cast(_PurchaseOrderNetAmount.PurchaseOrderNetAmount as mm_pur_order_tot_net_amount) as PurchaseOrderNetAmount,
      Document.ManualSupplierAddressID,
      case ManualSupplierAddressID
        when '' then _Supplier.AddressID
        else ManualSupplierAddressID
      end                                                                                 as SupplierAddressID,
      Document.PurchaseContract,
      Document.RequestForQuotation,
      Document.SupplierQuotationExternalID,
      Document._PurchaseOrderType,
      Document._Language,
      Document._CompanyCode,
      Document._PurchasingOrganization,
      Document._PurchasingGroup,
      Document._Supplier,
      Document._InvoicingParty,
      Document._PaymentTerms,
      Document._IncotermsClassification,
      Document._IncotermsVersion,
      Document._DocumentCurrency,
      // Data Privacy and Protection

      @UI.hidden: true
      IsEndOfPurposeBlocked,

      cast ( '' as podraftisreverted )                                                    as PODraftIsReverted,

      @ObjectModel: { readOnly: 'EXTERNAL_CALCULATION'}
      cast ( '' as purchaseorderhascommitmentitem )                                       as PurchaseOrderHasCommitmentItem,

      cast ( '' as mm_rework_comment )                                                    as POReworkCommentText, 

      cast ( '' as purchaseorderapprovalstatus )                                          as ApprovalStatus,

      cast ( '' as mm_approval_status )                                                   as ApprovalStatusName,

      //field from complex hierarchies

      @ObjectModel: { readOnly: 'EXTERNAL_CALCULATION'}
      _PurOrdHasItemHierarchy.PurchasingHasItemHierarchy,
      // fields from product compliance

      @ObjectModel: { readOnly: 'EXTERNAL_CALCULATION' }
      Document.PurgAggrgdProdCmplncSuplrSts,
      @ObjectModel: { readOnly: 'EXTERNAL_CALCULATION' }
      Document.PurgAggrgdProdMarketabilitySts,
      @ObjectModel: { readOnly: 'EXTERNAL_CALCULATION' }
      Document.PurgAggrgdSftyDataSheetStatus,
      @ObjectModel: { readOnly: 'EXTERNAL_CALCULATION' }
      Document.PurgProdCmplncTotDngrsGoodsSts,


      _PurchaseOrderTypeText,
      _User,

      _PurchaseOrderCalcFields,

      _PurchasingProcessingStatus,

      @ObjectModel.association.type: [ #TO_COMPOSITION_CHILD ]
      _PurchaseOrderItemTP,

      @ObjectModel.association.type: [ #TO_COMPOSITION_CHILD ]
      _PurOrdSupplierAddressTP,

      @ObjectModel.association.type: [ #TO_COMPOSITION_CHILD ]
      _PurchaseOrderNote,
      
       @ObjectModel.association.type: [ #TO_COMPOSITION_CHILD ]
      _PurchaseOrderPartnerTP

            
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_PURCHASEORDERNETAMOUNT",
"I_PURCHASINGDOCUMENTTYPETEXT",
"I_SUPPLIER",
"I_USER",
"R_PURCHASEORDER",
"R_PURORDHASITEMHIERARCHY"
],
"ASSOCIATED":
[
"E_PURCHASINGDOCUMENT",
"I_COMPANYCODE",
"I_CURRENCY",
"I_INCOTERMSCLASSIFICATION",
"I_INCOTERMSVERSION",
"I_LANGUAGE",
"I_PAYMENTTERMS",
"I_PURCHASEORDERCALCFIELDS",
"I_PURCHASEORDERITEMTP",
"I_PURCHASEORDERNETAMOUNT",
"I_PURCHASEORDERNOTETP",
"I_PURCHASEORDERPARTNERTP",
"I_PURCHASEORDERTYPE",
"I_PURCHASINGDOCUMENTTYPETEXT",
"I_PURCHASINGGROUP",
"I_PURCHASINGORGANIZATION",
"I_PURCHASINGPROCESSINGSTATUS",
"I_PURORDSUPPLIERADDRESSTP",
"I_SUPPLIER",
"I_USER",
"R_PURORDHASITEMHIERARCHY"
],
"BASE":
[
"R_PURCHASEORDER"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/