I_PURCHASINGDOCUMENTPARTNER

CDS View

I_PurchasingDocumentPartner

I_PURCHASINGDOCUMENTPARTNER is a CDS View in S/4HANA. I_PurchasingDocumentPartner. It contains 25 fields. 8 CDS views read from this table.

CDS Views using this table (8)

ViewTypeJoinVDMDescription
I_PurchaseOrderPartner view from BASIC Purchase Order Partner
I_PurgDocumentPartnerEnh view from COMPOSITE Purchasing Document Partner Enhanced
I_RFQBidder view from BASIC Request For Quotation Bidder
P_PurchaseContractMassUpdate view union CONSUMPTION Mass Changes to Purchase Contracts
P_ScheduleAgmtMassUpdate view union_all CONSUMPTION Private View for Scheduling Agreement
R_CntrlReqForQuotationBidder view from BASIC Restricted View for Central Request For Quotation Bidder
R_PurchaseOrderPartner view from BASIC Purchase Order Partner
R_RFQBidder view from BASIC Request For Quotation Bidder

Fields (25)

KeyField CDS FieldsUsed in Views
KEY PartnerCounter PartnerCounter 6
KEY PartnerFunction PartnerFunction 4
KEY Plant Plant 3
KEY PurchasingDocument CentralRequestForQuotation,ParentNode,PurchaseContract,PurchaseOrder,PurchasingDocument,RequestForQuotation 7
KEY PurchasingDocumentItem PurchasingDocumentItem 1
KEY PurchasingOrganization PurchasingOrganization 4
KEY SupplierSubrange SupplierSubrange 3
_PartnerFunction _PartnerFunction 2
_PartnerFunctionText _PartnerFunctionText 2
_PersonWorkAgreement _PersonWorkAgreement 1
_Plant _Plant 2
_PurchasingOrganization _PurchasingOrganization 2
_Supplier _Supplier 2
_SupplierContact _SupplierContact 1
CreatedByUser CreatedByUser 3
CreationDate CreationDate 3
DefaultPartner DefaultPartner 3
EmploymentInternalID EmploymentInternalID 3
PersonWorkAgreement PersonWorkAgreement 3
PurchasingDocumentCategory PurchasingDocumentCategory 1
PurchasingDocumentPartnerType PurchasingDocumentPartnerType 2
PurchasingDocumentType PurchasingDocumentType 1
Supplier ReferenceSupplier,Supplier 7
SupplierContact SupplierContact 3
SupplierHierarchyCategory SupplierHierarchyCategory 2
@AbapCatalog.sqlViewName: 'IPURDOCPARTNER'
@ClientHandling.algorithm: #SESSION_VARIABLE
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #PRIVILEGED_ONLY
@VDM.viewType : #BASIC
@EndUserText.label: 'I_PurchasingDocumentPartner'
@ObjectModel.usageType.dataClass: #MIXED
@ObjectModel.usageType.serviceQuality: #A
@ObjectModel.usageType.sizeCategory: #L
//@ObjectModel.representativeKey: 'PartnerCounter'

define view I_PurchasingDocumentPartner
  as select from ekpa
  association [0..1] to I_PurchasingDocument     as _PurchasingDocument     on  _PurchasingDocument.PurchasingDocument = $projection.PurchasingDocument
  association [0..1] to I_PurchasingDocumentItem as _PurchasingDocumentItem on  _PurchasingDocumentItem.PurchasingDocument     = $projection.PurchasingDocument
                                                                            and _PurchasingDocumentItem.PurchasingDocumentItem = $projection.PurchasingDocumentItem
  association [0..1] to I_PurchasingOrganization as _PurchasingOrganization on  _PurchasingOrganization.PurchasingOrganization = $projection.PurchasingOrganization
  association [0..1] to I_Plant                  as _Plant                  on  _Plant.Plant = $projection.Plant
  association [0..1] to I_PartnerFunction        as _PartnerFunction        on  _PartnerFunction.PartnerFunction = $projection.PartnerFunction
  association [0..*] to I_PartnerFunctionText    as _PartnerFunctionText    on  _PartnerFunctionText.PartnerFunction = $projection.PartnerFunction
  //  association [0..*] to I_PartnerTypeText        as _PartnerTypeText        on  _PartnerTypeText.PurchasingDocumentPartnerType = $projection.purchasingdocumentpartnertype


  // only one of the following associations is used within a single record

  association [0..1] to I_Supplier               as _Supplier               on  _Supplier.Supplier = $projection.Supplier
  association [0..1] to I_Suppliercontact        as _SupplierContact        on  _SupplierContact.SupplierContact = $projection.SupplierContact // untested, cardinality unclear

  association [0..1] to I_PersonWorkAgreement_1  as _PersonWorkAgreement    on  _PersonWorkAgreement.PersonWorkAgreement = $projection.PersonWorkAgreement

  // need to select based on date

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

{
      @ObjectModel.foreignKey.association: '_PurchasingDocument'
  key ekpa.ebeln                                     as PurchasingDocument,
      @ObjectModel.foreignKey.association: '_PurchasingDocumentItem'
  key ekpa.ebelp                                     as PurchasingDocumentItem, // Used in a single customer scenario but not in standard shipment, in standard 00000

      @ObjectModel.foreignKey.association: '_PurchasingOrganization'
  key ekpa.ekorg                                     as PurchasingOrganization, // attribute only, copied from PurchasingDocument

  key ekpa.ltsnr                                     as SupplierSubrange,       // empty

      @ObjectModel.foreignKey.association: '_Plant'
  key ekpa.werks                                     as Plant,                  // empty

      @ObjectModel: { foreignKey.association: '_PartnerFunction',
                      text.association: '_PartnerFunctionText' }
  key cast ( ekpa.parvw as parvw_unv preserving type ) as  PartnerFunction,        // must match a SUPPORTED entry in I_PartnerFunction


  key ekpa.parza                                     as PartnerCounter,         // ensures uniqueness of records


      @Consumption.hidden: true                                                 // transient

      _PurchasingDocument.PurchasingDocumentCategory as PurchasingDocumentCategory,
      @Consumption.hidden: true                                                 // transient

      _PurchasingDocument.PurchasingDocumentType     as PurchasingDocumentType,

      @Semantics.user.createdBy: true
      ekpa.ernam                                     as CreatedByUser,
      ekpa.erdat                                     as CreationDate,
      _PartnerFunction.SDDocumentPartnerType         as PurchasingDocumentPartnerType, // transient

      @ObjectModel.foreignKey.association: '_Supplier'
      cast(ekpa.lifn2 as lifnr preserving type)      as Supplier,
      ekpa.hityp                                     as SupplierHierarchyCategory,
      ekpa.parnr                                     as SupplierContact,

      @ObjectModel.foreignKey.association: '_PersonWorkAgreement'
      ekpa.pernr                                     as PersonWorkAgreement,
      //deprecated, replaced by PersonWorkAgreement

      ekpa.pernr                                     as EmploymentInternalID,
      ekpa.defpa                                     as DefaultPartner, // default for a particular partner function, checkbox on partner tab in ME21N

      //    ekpa.prfre as PricingRelevantIndicator,       // todo: Retail

      //    ekpa.bolre as SettlementAccountingIndicator,  // todo: Retail

      //    ekpa.histunr as HierarchyLevel,               // todo: Retail


      _PurchasingDocument,
      _PurchasingDocumentItem,
      _PurchasingOrganization,
      _Plant,
      _PartnerFunction, //_PartnerFunctionsValueHelp, _PartnerFunctionsValueHelp2,

      _PartnerFunctionText,
      //      _PartnerTypeText,

      _Supplier,
      _SupplierContact,
      _PersonWorkAgreement
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_PARTNERFUNCTION",
"I_PURCHASINGDOCUMENT",
"EKPA"
],
"ASSOCIATED":
[
"I_PARTNERFUNCTION",
"I_PARTNERFUNCTIONTEXT",
"I_PERSONWORKAGREEMENT_1",
"I_PLANT",
"I_PURCHASINGDOCUMENT",
"I_PURCHASINGDOCUMENTITEM",
"I_PURCHASINGORGANIZATION",
"I_SUPPLIER",
"I_SUPPLIERCONTACT"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/