R_PURCHASINGDOCUMENT
Purchasing Document
R_PURCHASINGDOCUMENT is a CDS View in S/4HANA. Purchasing Document. It contains 69 fields. 13 CDS views read from this table.
CDS Views using this table (13)
| View | Type | Join | VDM | Description |
|---|---|---|---|---|
| C_MaintOrdOpOutlineAgreementVH | view_entity | from | CONSUMPTION | Outline Agreement |
| I_ACMPurchaseOrder | view | from | COMPOSITE | Purchase Order |
| I_PPS_PurchaseOrder | view_entity | from | BASIC | Purchase order with PPS document types |
| I_PurchaseOrder | view | from | BASIC | Purchase Order |
| I_Schedgagrmthdr | view | from | BASIC | Scheduling Agreement Header |
| P_PurContrMassUpdt | view | from | CONSUMPTION | Purchase Contract Hdr |
| P_PurContrValdtySts | view | from | CONSUMPTION | Contract Validity Status Calculation |
| R_CentralPurchaseContract | view | from | BASIC | Central Purchase Contract Base View |
| R_CentralRequestForQuotation | view | from | BASIC | Restricted View for Central Request For Quotation Header |
| R_CentralSupplierQuotation | view | from | BASIC | Restricted View for Central Supplier Quotation Header |
| R_PPS_PurchaseOrder | view | from | BASIC | PPS Purchase Order Internal View |
| R_PurchaseContract | view | from | BASIC | Purchase Contract Base View |
| R_PurchaseOrder | view | from | BASIC | Purchase Order Internal View |
Fields (69)
| Key | Field | CDS Fields | Used in Views |
|---|---|---|---|
| KEY | PurchasingDocument | PurchaseContract,SchedulingAgreement | 2 |
| _CompanyCode | _CompanyCode | 1 | |
| _CreatedByUser | _CreatedByUser | 1 | |
| _DocumentCurrency | _DocumentCurrency | 2 | |
| _IncotermsClassification | _IncotermsClassification | 1 | |
| _InvoicingParty | _InvoicingParty | 1 | |
| _Language | _Language | 1 | |
| _PaymentTerms | _PaymentTerms | 1 | |
| _PurchasingDocumentCategory | _PurchasingDocumentCategory | 1 | |
| _PurchasingDocumentType | _PurchasingDocumentType | 1 | |
| _PurchasingGroup | _PurchasingGroup | 1 | |
| _PurchasingOrganization | _PurchasingOrganization | 1 | |
| _Supplier | _Supplier | 1 | |
| _SupplyingSupplier | _SupplyingSupplier | 1 | |
| BindingPeriodValidityEndDate | BindingPeriodValidityEndDate | 2 | |
| CashDiscount1Days | CashDiscount1Days | 3 | |
| CashDiscount1Percent | CashDiscount1Percent | 3 | |
| CashDiscount2Days | CashDiscount2Days | 3 | |
| CashDiscount2Percent | CashDiscount2Percent | 3 | |
| CompanyCode | CompanyCode | 3 | |
| CorrespncExternalReference | CorrespncExternalReference | 1 | |
| CorrespncInternalReference | CorrespncInternalReference | 2 | |
| CreatedByUser | CreatedByUser | 3 | |
| CreationDate | CreationDate | 3 | |
| DocumentCurrency | DocumentCurrency | 3 | |
| ExchangeRate | ExchangeRate | 1 | |
| ExchangeRateIsFixed | ExchangeRateIsFixed | 1 | |
| FollowOnDocumentCategory | FollowOnDocumentCategory | 2 | |
| FollowOnDocumentType | FollowOnDocumentType,PurgDocFollowOnDocumentType | 2 | |
| IncotermsClassification | IncotermsClassification | 3 | |
| IncotermsLocation1 | IncotermsLocation1 | 3 | |
| IncotermsLocation2 | IncotermsLocation2 | 3 | |
| IncotermsSupChnDvtgLocAddlUUID | IncotermsSupChnDvtgLocAddlUUID | 1 | |
| IncotermsSupChnLoc1AddlUUID | IncotermsSupChnLoc1AddlUUID | 1 | |
| IncotermsSupChnLoc2AddlUUID | IncotermsSupChnLoc2AddlUUID | 1 | |
| IncotermsTransferLocation | IncotermsTransferLocation | 3 | |
| IncotermsVersion | IncotermsVersion | 3 | |
| InvoicingParty | InvoicingParty | 1 | |
| IsEndOfPurposeBlocked | IsEndOfPurposeBlocked | 3 | |
| Language | Language | 3 | |
| LastChangeDateTime | LastChangeDateTime | 3 | |
| NetPaymentDays | NetPaymentDays | 3 | |
| PaymentTerms | PaymentTerms | 3 | |
| PricingDocument | CentralSuplrQuotationCondition | 1 | |
| PricingProcedure | PricingProcedure | 1 | |
| PurchasingDocumentCategory | PurchasingDocumentCategory | 3 | |
| PurchasingDocumentDeletionCode | PurchasingDocumentDeletionCode | 2 | |
| PurchasingDocumentOrderDate | PurchasingDocumentOrderDate | 2 | |
| PurchasingDocumentOrigin | PurchasingDocumentOrigin | 1 | |
| PurchasingDocumentSubtype | PurchasingDocumentSubtype | 1 | |
| PurchasingDocumentType | PurchasingDocumentType | 1 | |
| PurchasingGroup | PurchasingGroup | 3 | |
| PurchasingOrganization | PurchasingOrganization | 1 | |
| PurgAggrgdProdCmplncSuplrSts | PurgAggrgdProdCmplncSuplrSts | 1 | |
| QuotationEarliestSubmsnDate | QuotationEarliestSubmsnDate | 1 | |
| QuotationLatestSubmissionDate | QuotationLatestSubmissionDate | 2 | |
| QuotationSubmissionDate | QuotationSubmissionDate | 2 | |
| ScheduleAgreementHasReleaseDoc | ScheduleAgreementHasReleaseDoc | 1 | |
| Supplier | Supplier | 2 | |
| SupplierAddressID | SupplierAddressID | 1 | |
| SupplierPhoneNumber | SupplierPhoneNumber | 1 | |
| SupplierQuotationExternalID | SupplierQuotationExternalID | 2 | |
| SupplierRespSalesPersonName | SupplierRespSalesPersonName | 1 | |
| SupplyingSupplier | SupplyingSupplier | 1 | |
| TargetAmount | PurchaseContractTargetAmount,TargetAmount | 3 | |
| ValidityEndDate | PurContrValidityEndDate,ValidityEndDate | 2 | |
| ValidityStartDate | PurContrValidityStartDate,ValidityStartDate | 2 | |
| VATRegistration | CompanyVATRegistration | 1 | |
| VATRegistrationCountry | VATRegistrationCountry | 1 |
@AbapCatalog.preserveKey: true
@AbapCatalog.compiler.compareFilter: true
@ClientHandling.algorithm: #SESSION_VARIABLE
@AbapCatalog.sqlViewName: 'RMMPURCHASINGDOC'
@EndUserText.label: 'Purchasing Document'
@AccessControl.authorizationCheck:#PRIVILEGED_ONLY
@VDM.viewType : #BASIC
@Metadata.ignorePropagatedAnnotations: true
@VDM.lifecycle.contract.type: #SAP_INTERNAL_API
@ObjectModel: {
representativeKey: 'PurchasingDocument',
usageType.serviceQuality: #A,
usageType.sizeCategory: #L,
usageType.dataClass: #TRANSACTIONAL
}
@AccessControl.privilegedAssociations: [ '_SupplierAddress' ]
define view R_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_OrganizationAddress as _SupplierAddress_2 on $projection.ManualSupplierAddressID = _SupplierAddress_2.AddressID
and _SupplierAddress_2.AddressPersonID = ' '
and _SupplierAddress_2.AddressRepresentationCode = ' '
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 I_PurchasingProcessingStatus as _PurchasingProcessingStatus on $projection.PurchasingProcessingStatus = _PurchasingProcessingStatus.PurchasingProcessingStatus
// 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,
ekko.process_indicator as PurchasingDocumentProcessCode,
@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,
cast (ekko.telf1 as telfnr0) as SupplierPhoneNumber,
@VDM.lifecycle.status: #DEPRECATED
@VDM.lifecycle.successor: 'ManualSupplierAddressID'
ekko.adrnr as SupplierAddressID, //obsolete
@ObjectModel.foreignKey.association: '_SupplierAddress_2'
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 PricingDocument,
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.submi as PurchasingCollectiveNumber,
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,
cast ( ekko.inco2_key as /scmtms/inc_loc_1_key_nc preserving type ) as IncotermsSupChnLoc1AddlUUID,
cast ( ekko.inco3_key as /scmtms/inc_loc_2_key_nc preserving type ) as IncotermsSupChnLoc2AddlUUID,
cast ( ekko.inco4_key as /scmtms/inc_dv_plce_dst_key_nc preserving type ) as IncotermsSupChnDvtgLocAddlUUID,
@ObjectModel.foreignKey.association: '_PurchasingProcessingStatus'
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.vsart as PurgDocDefaultShippingType,
@VDM.lifecycle.status: #DEPRECATED
@VDM.lifecycle.successor: 'PurgDocFollowOnDocumentType'
ekko.followon_doc_type as FollowOnDocumentType,
ekko.followon_doc_type as PurgDocFollowOnDocumentType,
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.active_id as ActivePurchasingDocument,
ekko.cr_stat as PurgDocChangeRequestStatus,
ekko.revno as PurchasingDocumentVersion,
ekko.externalreferenceid as PurgDocExternalReference,
// fields from product compliance
ekko.total_status_dg as PurgProdCmplncTotDngrsGoodsSts,
ekko.total_status_pcs as PurgAggrgdProdCmplncSuplrSts,
ekko.total_status_pma as PurgAggrgdProdMarketabilitySts,
ekko.total_status_sds as PurgAggrgdSftyDataSheetStatus,
//ekko.absgr as
ekko.parent_id as PurchasingParentDocument,
ekko.grouping_id as ProcmtHubCompanyCodeGroupingID,
//IsCatalogRelevant filed enhancement
ekko.has_catalog_relevant_items as PurgHasCatalogRelevantItems,
_CompanyCode,
_PurchasingDocumentType,
_PurchasingDocumentCategory,
_Supplier,
_SupplyingSupplier,
_InvoicingParty,
_PaymentTerms,
_PurchasingOrganization,
_PurchasingGroup,
@VDM.lifecycle.status: #DEPRECATED
@VDM.lifecycle.successor: '_SupplierAddress_2'
_SupplierAddress,
_SupplierAddress_2,
_DocumentCurrency,
_CreatedByUser,
_IncotermsClassification,
_IncotermsVersion,
_SupplyingPlant,
_PurchasingDocumentOrigin,
_ReleaseCode,
_PurchaseContract,
_Language,
_PricingProcedure,
_PurchasingDocumentItem,
_PurchasingDocumentPartner,
_PurchasingProcessingStatus
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"EKKO"
],
"ASSOCIATED":
[
"I_ADDRESS",
"I_COMPANYCODE",
"I_CURRENCY",
"I_INCOTERMSCLASSIFICATION",
"I_INCOTERMSVERSION",
"I_LANGUAGE",
"I_ORGANIZATIONADDRESS",
"I_PAYMENTTERMS",
"I_PLANT",
"I_PURCHASECONTRACT",
"I_PURCHASINGDOCUMENTCATEGORY",
"I_PURCHASINGDOCUMENTITEM",
"I_PURCHASINGDOCUMENTORIGIN",
"I_PURCHASINGDOCUMENTPARTNER",
"I_PURCHASINGDOCUMENTTYPE",
"I_PURCHASINGGROUP",
"I_PURCHASINGORGANIZATION",
"I_PURCHASINGPROCESSINGSTATUS",
"I_RELEASECODE",
"I_SUPPLIER",
"I_TAXCALCULATIONPROCEDURE",
"I_USER"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/