I_PURCHASINGDOCUMENT

CDS View

Purchasing Document

I_PURCHASINGDOCUMENT is a CDS View in S/4HANA. Purchasing Document. It contains 73 fields. 58 CDS views read from this table.

CDS Views using this table (58)

ViewTypeJoinVDMDescription
C_CPurConHierFltrMatlGrpVH view inner CONSUMPTION Hierarhy CCTR Matl Grp Filter
C_DspDocFlwPurchaseDocItemVH view_entity from CONSUMPTION Purchasing Document Items VH for DDF
C_DspDocFlwPurchaseDocVH view_entity from CONSUMPTION Purchasing Documents VH for DDF
C_DspDocFlwPurOrdAttrib view from CONSUMPTION Purchase Orders Attributes for DDF
C_GB_StRpAuditMMFileC view_entity from CONSUMPTION GB HRMC Audit File for MM - Cube
C_MM_PurDocsSuplrConfVH view from CONSUMPTION Value Help for PO and SA
C_MM_SubcontractingOrderVH view from CONSUMPTION Subcontracting Document Value Help
C_ProcurementSmartFilter view from CONSUMPTION Global Filter for Procurement Overview Page
C_PurchaseOutlineAgreementVH view from CONSUMPTION Outline Agreement Data
C_PurOrdMaintainOutlAIValHelp view left_outer CONSUMPTION PO Maintenance: Value Help for Outline Agreement Items
C_PurReqnSchedAgrmtVH view inner CONSUMPTION Sched Agreement val help for Prof PR
C_SameUsrCrteSuplrPurDoc view from CONSUMPTION Same User Create Supplier Purchasing Doc
C_Schagrhdr view from CONSUMPTION Scheduling Agreement Header
C_ScheduleAgreementVH view from CONSUMPTION Purchase Scheduling Agreement
C_SlsDocFlfmtPurgDoc view from CONSUMPTION Sales Doc Fulfillment: Purchasing Doc
C_SlsDocFlfmtPurOrderContacts view from CONSUMPTION Sales Doc Fulfillment: Purchase Order Contacts
C_SuplrEvalChangedScores view inner CONSUMPTION Supplier Evaluation Changed Scores
I_CFinPurchasingDocument view union_all COMPOSITE CFin Purchasing Document: Header
I_CFinPurgDocAccountAssignment view inner COMPOSITE CFin Purchasing Doc: Account Assignment
I_DigitalVehiclePurOrderItem view_entity inner COMPOSITE Vehicle Purchase Order
I_IN_STOHistory view from COMPOSITE Stock Transport Order History
I_MRPPurchaseOrder view from COMPOSITE MRP Purchase Order
I_PggngPurgDocumentCategory view_entity inner COMPOSITE Purchasing Documents with Category
I_PrepaymentProposedLinkagesPO view from COMPOSITE Prepayment Agreement Proposed PO Linkage
I_PurchasingDocumentStdVH view from COMPOSITE Purchasing Document
I_PurOrdAccrsCFinPurgDocAssgmt view inner COMPOSITE PurOrdAccrs: CFin PO Item Assgmt
I_PurOrdAccrsCFinPurgDocument view union_all COMPOSITE PurOrdAccrs: Purchasing Document
I_RequestForQuotation view from BASIC Request For Quotation
I_Schedgagrmthdrtranfields view from COMPOSITE View for Scheduling agreement Transient fields
I_SlsOrdFlfmtInSupplyContact view union_all COMPOSITE SOFM Sales Order Fulfillment In Supply Contact
I_SlsOrdFlfmtInSupPurContact view from COMPOSITE SOFM Sales Order Fulfillment In Supply Purchasing Contact
I_SlsOrdFlfmtInSupPurContact view union_all COMPOSITE SOFM Sales Order Fulfillment In Supply Purchasing Contact
I_SlsOrdFlfmtPurchaseOrder view from COMPOSITE SOFM Purchase Order
I_SourcesOfSupply view inner COMPOSITE Sources of Supply
I_SupplierQuotation view from BASIC Supplier Quotation
P_DDMaterialSOS view inner CONSUMPTION
P_DDPurchaseOrder view from COMPOSITE
P_FilteredSourceOfSupply view from CONSUMPTION Filtered Source of Supply
P_LogcDocPurchase view_entity from CONSUMPTION
P_MaintOrdCompScheduleLine view inner COMPOSITE
P_PrepaymentRefDocTotalAmount view inner COMPOSITE Prepayment Document Total Amount
P_PurchaseOrderForCIC view_entity from BASIC
P_PurchaseOrderItemForCIC view_entity inner BASIC
P_Purchaseorders_Fs view from BASIC
P_PURCHASEORDERWITHSTOFILTER view from CONSUMPTION Purchase Orders without STO
P_Purchasingdocument_Fs view from BASIC
P_PurchasingGroupAnalysis1 view inner CONSUMPTION Purchasing Group Analysis 1
P_PurchDocFiltered view from CONSUMPTION Purchasing Document filtered by date
P_PurchDocWthGRIRFlagNotSet view from CONSUMPTION Purchasing Document filtered by date
P_PurDocItemCurConv view inner CONSUMPTION Purchase Document with Currency Conversion for dates
P_PurgDocItemPricingKey view from BASIC
P_Purgdocscheduleline view inner CONSUMPTION Purchasing Document Schedule Lines
P_PurOrdItemTimeVar view from CONSUMPTION Purchase Order Item for Time Variance
P_RU_GtdFromPOMM7 view inner COMPOSITE
P_SCHDLNMIGRATION view from CONSUMPTION Schedule Line Migration
P_SourcesOfSupply view from COMPOSITE
P_WrkDistrPurDoc view from CONSUMPTION
shsm_ekpo_ekko view inner Value Help for Purchasing Document

Fields (73)

KeyField CDS FieldsUsed in Views
KEY CompanyCode bukrs_pohdr,CompanyCode 14
KEY PurchasingDocument DocNumber,PurchaseOrder,PurchasingDocument,SchedulingAgreement,SourceDocument 15
KEY PurchasingDocumentCategory bstyp,PurchasingDocumentCategory,PurchasingSourceType 19
KEY PurchasingDocumentOrderDate BEDAT_POHDR,PurchasingDocumentOrderDate 7
KEY PurchasingDocumentType bsart,DocumentType,PurchaseOrderType,PurchasingDocumentType 14
KEY PurchasingGroup ekgrp,PurchasingGroup 20
KEY PurchasingOrganization ekorg,PurchasingOrganization 18
KEY Supplier Counterparty,lifnr,Supplier 20
_CompanyCode _CompanyCode 1
_CreatedByUser _CreatedByUser 1
_DocumentCurrency _DocumentCurrency 2
_Language _Language 1
_PaymentTerms _PaymentTerms 1
_PurchasingDocumentCategory _PurchasingDocumentCategory 2
_PurchasingDocumentType _PurchasingDocumentType 2
_PurchasingGroup _PurchasingGroup 2
_PurchasingOrganization _PurchasingOrganization 1
_Supplier _Supplier 1
BindingPeriodValidityEndDate BindingPeriodValidityEndDate 3
CashDiscount1Days CashDiscount1Days 3
CashDiscount1Percent CashDiscount1Percent 2
CashDiscount2Days CashDiscount2Days 3
CashDiscount2Percent CashDiscount2Percent 2
CorrespncExternalReference CorrespncExternalReference 1
CorrespncInternalReference CorrespncInternalReference 2
CreatedByUser CreatedByUser,ernam 6
CreationDate aedat,CreationDate,PurchaseOrderDate,STOCreationDate 12
Customer Customer 1
DocumentCurrency DocumentCurrency,waers 11
DownPaymentAmount DownPaymentAmount 1
DownPaymentDueDate DownPaymentDueDate 1
DownPaymentPercentageOfTotAmt DownPaymentPercentageOfTotAmt 1
DownPaymentType DownPaymentType 1
ExchangeRate ExchangeRate 1
ExchangeRateIsFixed ExchangeRateIsFixed 1
FollowOnDocumentCategory FollowOnDocumentCategory 2
FollowOnDocumentType FollowOnDocumentType,PurgDocFollowOnDocumentType 2
IncotermsClassification IncotermsClassification 5
IncotermsLocation1 IncotermsLocation1 4
IncotermsLocation2 IncotermsLocation2 4
IncotermsTransferLocation IncotermsTransferLocation 5
IncotermsVersion IncotermsVersion 3
InvoicingParty InvoicingParty 1
IsEndOfPurposeBlocked IsEndOfPurposeBlocked 4
Language Language 4
LastChangeDateTime LastChangeDateTime 5
NetPaymentDays NetPaymentDays 3
PaymentTerms PaymentTerms 4
PricingProcedure PricingProcedure 1
PurchaseContract PurchaseContract 2
PurchasingCompletenessStatus memory 1
PurchasingDocumentCondition PurchasingDocumentCondition 2
PurchasingDocumentDeletionCode LOEKZ_POHDR,PurchasingDocumentDeletionCode 6
PurchasingDocumentIsAged isaged,PurchasingDocumentIsAged 3
PurchasingDocumentOrigin PurchasingDocumentOrigin,PurchasingDocumentStatus,STATU 5
PurchasingProcessingStatus procstat 1
QuotationEarliestSubmsnDate QuotationEarliestSubmsnDate 1
QuotationLatestSubmissionDate QuotationLatestSubmissionDate 3
QuotationSubmissionDate QuotationSubmissionDate 2
ReleaseIsNotCompleted frgrl 1
RequestForQuotation RequestForQuotation 1
ScheduleAgreementHasReleaseDoc ScheduleAgreementHasReleaseDoc 1
SupplierAddressID SupplierAddressID 1
SupplierPhoneNumber SupplierPhoneNumber 1
SupplierQuotationExternalID SupplierQuotationExternalID 2
SupplierRespSalesPersonName SupplierRespSalesPersonName 1
SupplyingPlant reswk,SupplyingPlant 5
SupplyingSupplier SupplyingSupplier 1
TargetAmount PurchaseContractTargetAmount,TargetAmount 3
ValidityEndDate PrepaymentRefDocItmValdToDte,ValidityEndDate 8
ValidityStartDate PrepaymentRefDocItmValdFromDte,ValidityStartDate 8
VATRegistration CompanyVATRegistration 1
VATRegistrationCountry VATRegistrationCountry 1

@AbapCatalog.preserveKey: true
@AbapCatalog.compiler.compareFilter: true
@ClientHandling.algorithm: #SESSION_VARIABLE
@AbapCatalog.sqlViewName: 'IMMPURCHASINGDOC'
@EndUserText.label: 'Purchasing Document'
@AccessControl.authorizationCheck:#CHECK
@VDM.viewType : #BASIC
@Metadata.ignorePropagatedAnnotations: true
@ObjectModel: {
  representativeKey: 'PurchasingDocument',
  usageType.serviceQuality: #A, 
  usageType.sizeCategory: #L, 
  usageType.dataClass: #TRANSACTIONAL
}
@AccessControl.privilegedAssociations: [ '_SupplierAddress' ]

define view I_PurchasingDocument
  as select from ekko as ekko //PurgDoc


  association [1..1] to I_PurchasingDocumentCategory as _PurchasingDocumentCategory on  $projection.PurchasingDocumentCategory = _PurchasingDocumentCategory.PurchasingDocumentCategory

  association [0..1] to I_PurchasingDocumentType     as _PurchasingDocumentType     on  $projection.PurchasingDocumentCategory = _PurchasingDocumentType.PurchasingDocumentCategory
                                                                                    and $projection.PurchasingDocumentType     = _PurchasingDocumentType.PurchasingDocumentType

  association [0..1] to I_CompanyCode                as _CompanyCode                on  $projection.CompanyCode = _CompanyCode.CompanyCode

  association [0..1] to I_User                       as _CreatedByUser              on  $projection.CreatedByUser = _CreatedByUser.UserID

  association [0..1] to I_Supplier                   as _Supplier                   on  $projection.Supplier = _Supplier.Supplier

  association [0..1] to I_Supplier                   as _SupplyingSupplier          on  $projection.SupplyingSupplier = _SupplyingSupplier.Supplier

  association [0..1] to I_Supplier                   as _InvoicingParty             on  $projection.InvoicingParty = _InvoicingParty.Supplier

  association [0..1] to I_PaymentTerms               as _PaymentTerms               on  $projection.PaymentTerms = _PaymentTerms.PaymentTerms

  association [0..1] to I_Address                    as _SupplierAddress            on  $projection.ManualSupplierAddressID = _SupplierAddress.AddressID

  association [0..1] to I_PurchasingOrganization     as _PurchasingOrganization     on  $projection.PurchasingOrganization = _PurchasingOrganization.PurchasingOrganization

  association [0..1] to I_PurchasingGroup            as _PurchasingGroup            on  $projection.PurchasingGroup = _PurchasingGroup.PurchasingGroup

  association [0..1] to I_Currency                   as _DocumentCurrency           on  $projection.DocumentCurrency = _DocumentCurrency.Currency

  association [0..1] to I_IncotermsClassification    as _IncotermsClassification    on  $projection.IncotermsClassification = _IncotermsClassification.IncotermsClassification

  association [0..1] to I_IncotermsVersion           as _IncotermsVersion           on  $projection.IncotermsVersion = _IncotermsVersion.IncotermsVersion

  association [0..1] to I_Plant                      as _SupplyingPlant             on  $projection.SupplyingPlant = _SupplyingPlant.Plant

  association [0..*] to I_PurchasingDocumentItem     as _PurchasingDocumentItem     on  $projection.PurchasingDocument = _PurchasingDocumentItem.PurchasingDocument

  association [0..*] to I_PurchasingDocumentPartner  as _PurchasingDocumentPartner  on  $projection.PurchasingDocument = _PurchasingDocumentPartner.PurchasingDocument

  association [0..1] to I_PurchasingDocumentOrigin   as _PurchasingDocumentOrigin   on  $projection.PurchasingDocumentOrigin = _PurchasingDocumentOrigin.PurchasingDocumentOrigin

  association [0..1] to I_ReleaseCode                as _ReleaseCode                on  $projection.ReleaseCode = _ReleaseCode.ReleaseCode

  association [0..1] to I_PurchaseContract           as _PurchaseContract           on  $projection.PurchaseContract = _PurchaseContract.PurchaseContract

  association [0..1] to I_Language                   as _Language                   on  $projection.Language = _Language.Language

  association [0..1] to I_TaxCalculationProcedure    as _PricingProcedure           on  $projection.PricingProcedure = _PricingProcedure.TaxCalculationProcedure

  association [0..1] to E_PurchasingDocument         as _HeaderExtension            on  $projection.PurchasingDocument = _HeaderExtension.PurchasingDocument

{
  key ekko.ebeln                                   as PurchasingDocument,

      @ObjectModel.foreignKey.association: '_PurchasingDocumentCategory'
      ekko.bstyp                                   as PurchasingDocumentCategory,

      @ObjectModel.foreignKey.association: '_PurchasingDocumentType'
      ekko.bsart                                   as PurchasingDocumentType,

      ekko.bsakz                                   as PurchasingDocumentSubtype,

      @ObjectModel.foreignKey.association: '_CompanyCode'
      ekko.bukrs                                   as CompanyCode,

      ekko.loekz                                   as PurchasingDocumentDeletionCode,

      ekko.isaged                                  as PurchasingDocumentIsAged,
      
      ekko.pincr                                   as ItemNumberInterval,
      
      ekko.upinc                                   as ItemNumberIntervalForSubItems,
     
      @ObjectModel.foreignKey.association: '_PurchasingDocumentOrigin'
      ekko.statu                                   as PurchasingDocumentOrigin,

      ekko.frgrl                                   as ReleaseIsNotCompleted,

      @ObjectModel.foreignKey.association: '_ReleaseCode'
      ekko.frgke                                   as ReleaseCode,
      
      ekko.frgsx                                   as PurchasingReleaseStrategy,

      ekko.frgzu                                   as PurgReleaseSequenceStatus,

      ekko.lands                                   as TaxReturnCountry,

      @Semantics.businessDate.createdAt: true
      ekko.aedat                                   as CreationDate,

      ekko.lastchangedatetime                      as LastChangeDateTime,

      @Semantics.user.createdBy: true
      ekko.ernam                                   as CreatedByUser,

      @ObjectModel.foreignKey.association: '_Supplier'
      cast ( ekko.lifnr as md_supplier preserving type)           as Supplier,

      ekko.verkf                                   as SupplierRespSalesPersonName,

      ekko.telf1                                   as SupplierPhoneNumber,

      ekko.adrnr                                   as SupplierAddressID, //obsolete


      @ObjectModel.foreignKey.association: '_SupplierAddress'
      ekko.adrnr                                   as ManualSupplierAddressID,

      ekko.ihrez                                   as CorrespncExternalReference,

      ekko.unsez                                   as CorrespncInternalReference,
      
      @ObjectModel.foreignKey.association: '_PurchasingOrganization'
      ekko.ekorg                                   as PurchasingOrganization,

      @ObjectModel.foreignKey.association: '_PurchasingGroup'
      ekko.ekgrp                                   as PurchasingGroup,

      //_CompanyCode.FiscalYearVariant as FiscalYearVariant,


      @Semantics.currencyCode:true
      @ObjectModel.foreignKey.association: '_DocumentCurrency'
      ekko.waers                                   as DocumentCurrency,

      cast ( ekko.wkurs as fis_exchange_rate preserving type )     as ExchangeRate,

      @Semantics.businessDate.at
      ekko.bedat                                   as PurchasingDocumentOrderDate,

      @ObjectModel.foreignKey.association: '_SupplyingSupplier'
      ekko.llief                                   as SupplyingSupplier,

      @ObjectModel.foreignKey.association: '_SupplyingPlant'
      ekko.reswk                                   as SupplyingPlant,

      @ObjectModel.foreignKey.association: '_InvoicingParty'
      ekko.lifre                                   as InvoicingParty,
      
      ekko.kunnr                                   as Customer,

      @ObjectModel.foreignKey.association: '_PurchaseContract'
      ekko.konnr                                   as PurchaseContract,

      @Semantics.language: true
      @ObjectModel.foreignKey.association: '_Language'
      ekko.spras                                   as Language,

      ekko.absgr                                   as PurgReasonForDocCancellation,

      ekko.memory                                  as PurchasingCompletenessStatus,

      @ObjectModel.foreignKey.association: '_IncotermsClassification'
      ekko.inco1                                   as IncotermsClassification,

      ekko.inco2                                   as IncotermsTransferLocation,

      @ObjectModel.foreignKey.association: '_PaymentTerms'
      cast( zterm as farp_dzterm preserving type)                 as PaymentTerms,

      cast (ekko.zbd1t as dzbd1t preserving type)                  as CashDiscount1Days,

      cast (ekko.zbd2t as dzbd2t preserving type)                  as CashDiscount2Days,

      cast (ekko.zbd3t as dzbd3t preserving type)                  as NetPaymentDays,

      ekko.zbd1p                                   as CashDiscount1Percent,

      ekko.zbd2p                                   as CashDiscount2Percent,

      @ObjectModel.foreignKey.association: '_PricingProcedure'
      ekko.kalsm                                   as PricingProcedure,

      @Semantics.amount.currencyCode: 'DocumentCurrency'
      @DefaultAggregation:#NONE
      ekko.ktwrt                                   as TargetAmount,
      
      ekko.distributiontype                        as PurgDocumentDistributionType,

      ekko.knumv                                   as PurchasingDocumentCondition,

      ekko.kdatb                                   as ValidityStartDate,

      ekko.kdate                                   as ValidityEndDate,

      ekko.lphis                                   as ScheduleAgreementHasReleaseDoc,

      ekko.angdt                                   as QuotationLatestSubmissionDate,

      ekko.bnddt                                   as BindingPeriodValidityEndDate,

      ekko.ihran                                   as QuotationSubmissionDate,

      ekko.angnr                                   as SupplierQuotationExternalID,

      ekko.ausnr                                   as RequestForQuotation,

      ekko.kufix                                   as ExchangeRateIsFixed,

      @ObjectModel.foreignKey.association: '_IncotermsVersion'
      ekko.incov                                   as IncotermsVersion,

      ekko.inco2_l                                 as IncotermsLocation1,

      ekko.inco3_l                                 as IncotermsLocation2,

      ekko.procstat                                as PurchasingProcessingStatus,

      @Semantics.amount.currencyCode: 'DocumentCurrency'
      ekko.rlwrt                                   as PurgReleaseTimeTotalAmount,
      
      ekko.dptyp                                   as DownPaymentType,
      
      ekko.dppct                                   as DownPaymentPercentageOfTotAmt,
      
      @Semantics.amount.currencyCode: 'DocumentCurrency' 
      ekko.dpamt                                   as DownPaymentAmount,
      
      ekko.dpdat                                   as DownPaymentDueDate,

      cast ( ekko.description as vdm_purgdoc_name preserving type ) as PurchasingDocumentName,

      ekko.qtn_erlst_submsn_date                   as QuotationEarliestSubmsnDate,

      ekko.bwbdt                                   as LatestRegistrationDate,

      ekko.followon_doc_cat                        as FollowOnDocumentCategory,
      
      ekko.followon_doc_type                       as FollowOnDocumentType,
      
      ekko.stceg                                   as VATRegistration,
            
      ekko.stceg_l                                 as VATRegistrationCountry,
      
      ekko.intra_rel                               as IsIntrastatReportingRelevant,
      
      ekko.intra_excl                              as IsIntrastatReportingExcluded,
      @Semantics.booleanIndicator: true
      ekko.iseopblocked                            as IsEndOfPurposeBlocked, //IsEopBlocked 

      
      //ekko.absgr                                   as 


      ekko.parent_id                               as PurchasingParentDocument,
      ekko.grouping_id                             as ProcmtHubCompanyCodeGroupingID,
      
      _CompanyCode,
      _PurchasingDocumentType,
      _PurchasingDocumentCategory,
      _Supplier,
      _SupplyingSupplier,
      _InvoicingParty,
      _PaymentTerms,
      _PurchasingOrganization,
      _PurchasingGroup,
      _SupplierAddress,
      _DocumentCurrency,
      _CreatedByUser,
      _IncotermsClassification,
      _IncotermsVersion,
      _SupplyingPlant,
      _PurchasingDocumentOrigin,
      _ReleaseCode,
      _PurchaseContract,
      _Language,
      _PricingProcedure,
      _PurchasingDocumentItem,
      _PurchasingDocumentPartner
} 

/*+[internal] {
"BASEINFO":
{
"FROM":
[
"EKKO"
],
"ASSOCIATED":
[
"E_PURCHASINGDOCUMENT",
"I_ADDRESS",
"I_COMPANYCODE",
"I_CURRENCY",
"I_INCOTERMSCLASSIFICATION",
"I_INCOTERMSVERSION",
"I_LANGUAGE",
"I_PAYMENTTERMS",
"I_PLANT",
"I_PURCHASECONTRACT",
"I_PURCHASINGDOCUMENTCATEGORY",
"I_PURCHASINGDOCUMENTITEM",
"I_PURCHASINGDOCUMENTORIGIN",
"I_PURCHASINGDOCUMENTPARTNER",
"I_PURCHASINGDOCUMENTTYPE",
"I_PURCHASINGGROUP",
"I_PURCHASINGORGANIZATION",
"I_RELEASECODE",
"I_SUPPLIER",
"I_TAXCALCULATIONPROCEDURE",
"I_USER"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/