P_CntrlPurContrDistribution

DDL: P_CNTRLPURCONTRDISTRIBUTION SQL: PCNTRLPCONDSTR Type: view BASIC

P_CntrlPurContrDistribution is a Basic CDS View in SAP S/4HANA. It reads from 1 data source (ekpo_distr) and exposes 50 fields with key fields CentralPurchaseContract, CentralPurchaseContractItem, DistributionKey.

Data Sources (1)

SourceAliasJoin Type
ekpo_distr ekpo_distr from

Annotations (10)

NameValueLevelField
AbapCatalog.sqlViewName PCNTRLPCONDSTR view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #NOT_REQUIRED view
VDM.viewType #BASIC view
VDM.private true view
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #L view

Fields (50)

KeyFieldSource TableSource FieldDescription
KEY CentralPurchaseContract purchasingdocument
KEY CentralPurchaseContractItem purchasingdocumentitem
KEY DistributionKey ekpo_distr distributionnumber
PurchasingDocumentCategory ekpo_distr purchasingdocumentcategory
PurchasingDocumentType ekpo_distr purchasingdocumenttype
PurchasingOrganization ekpo_distr purchasingorganization
CompanyCode ekpo_distr companycode
Plant ekpo_distr plant
LogicalSystem ekpo_distr logicalsystem
DocumentCurrency ekpo_distr documentcurrency
Currency ekpo_distr documentcurrency
PurchasingGroup ekpo_distr purchasinggroup
StorageLocation ekpo_distr storagelocation
PaymentTerms ekpo_distr paymentterms
CashDiscount1Days ekpo_distr cashdiscount1days
CashDiscount2Days ekpo_distr cashdiscount2days
NetPaymentDays ekpo_distr netpaymentdays
CashDiscount1Percent ekpo_distr cashdiscount1percent
CashDiscount2Percent ekpo_distr cashdiscount2percent
Material ekpo_distr material
MaterialGroup ekpo_distr materialgroup
CntrlPurContrDistributionPct ekpo_distr purchasingdocumentdistrpct
TargetQuantity ekpo_distr targetquantity
TargetAmount ekpo_distr targetvalue
ExtContractForPurg ekpo_distr extcontractforpurg
ExtContractItemForPurg ekpo_distr extcontractitemforpurg
IsDeleted ekpo_distr isdeleted
OrderQuantityUnit ekpo_distr orderquantityunit
DistributionType ekpo_distr distributiontype
DistrResponseMessageUUID ekpo_distr responsemessageguid
ItemDistributionIsRelevant ekpo_distr itemdistributionisrelevant
ReferenceHeaderDistributionKey ekpo_distr referencedhdrdistrnumber
CntrlPurContrItmDistrIsBlocked ekpo_distr isitemdistributionblocked
CntrlPurContrDistributionLevel ekpo_distr distributionlevel
ManualDeliveryAddressID ekpo_distr manualdeliveryaddressid
AddressType ekpo_distr deliveryaddresstype
ExternalReferenceDocument ekpo_distr externalreferencedocument
ExternalReferenceDocumentItem ekpo_distr externalreferencedocumentitem
ExternalRefDocCategory ekpo_distr externalrefdoccategory
PurchasingInfoRecordUpdateCode ekpo_distr purchasinginforecordupdatecode
ProcmtHubPredecessorDocument ekpo_distr procmthubpredecessordocument
ProcmtHubPredecessorDocItem ekpo_distr procmthubpredecessordocitem
ProcmtHubPredecessorDocCat ekpo_distr procmthubpredecessordoccat
ProcmtHubPurchaseRequisition ekpo_distr procmthubpurchaserequisition
ProcmtHubPurRequisitionItem ekpo_distr procmthubpurrequisitionitem
SourceListIsUpdated ekpo_distr sourcelistisupdated
SourceListRestriction ekpo_distr sourcelistrestriction
SrceListResponseMsgUUID ekpo_distr srcelistresponsemsguuid
SourceListChangeConfStatus ekpo_distr sourcelistchangeconfstatus
ProcmtHubCompanyCodeGroupingID ekpo_distr procmthubcompanycodegroupingid
@AbapCatalog.sqlViewName: 'PCNTRLPCONDSTR'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #NOT_REQUIRED 
@VDM.viewType: #BASIC
@VDM.private: true
@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel.usageType.dataClass: #MIXED
@ObjectModel.usageType.serviceQuality: #C
@ObjectModel.usageType.sizeCategory: #L

define view P_CntrlPurContrDistribution as select from ekpo_distr {
    
 
  key purchasingdocument                                as CentralPurchaseContract,
  key purchasingdocumentitem                            as CentralPurchaseContractItem,
  key ekpo_distr.distributionnumber                     as DistributionKey,
      ekpo_distr.purchasingdocumentcategory             as PurchasingDocumentCategory,
      ekpo_distr.purchasingdocumenttype                 as PurchasingDocumentType,
      ekpo_distr.purchasingorganization                 as PurchasingOrganization,
      ekpo_distr.companycode                            as CompanyCode,
      ekpo_distr.plant                                  as Plant,
      ekpo_distr.logicalsystem                          as LogicalSystem,
      ekpo_distr.documentcurrency                       as DocumentCurrency,
      ekpo_distr.documentcurrency                       as Currency,
      ekpo_distr.purchasinggroup                        as PurchasingGroup,
      ekpo_distr.storagelocation                        as StorageLocation,
      ekpo_distr.paymentterms                           as PaymentTerms,
      ekpo_distr.cashdiscount1days                      as CashDiscount1Days,
      ekpo_distr.cashdiscount2days                      as CashDiscount2Days,
      ekpo_distr.netpaymentdays                         as NetPaymentDays,
      ekpo_distr.cashdiscount1percent                   as CashDiscount1Percent,
      ekpo_distr.cashdiscount2percent                   as CashDiscount2Percent,
      ekpo_distr.material                               as Material,
      ekpo_distr.materialgroup                          as MaterialGroup,
      ekpo_distr.purchasingdocumentdistrpct             as CntrlPurContrDistributionPct,
      ekpo_distr.targetquantity                         as TargetQuantity,
      ekpo_distr.targetvalue                            as TargetAmount,

      ekpo_distr.extcontractforpurg                     as ExtContractForPurg,
      ekpo_distr.extcontractitemforpurg                 as ExtContractItemForPurg,
      case
      when ekpo_distr.extcontractitemdistrstatus = '01' and ekpo_distr.extcontractforpurg <> ''
        then '04'
        else
          ekpo_distr.extcontractitemdistrstatus end     as ItemDistributionStatus,
      //ekpo_distr.extcontractitemdistrstatus                   as                             ItemDistributionStatus,

      ekpo_distr.isdeleted                              as IsDeleted,
      ekpo_distr.orderquantityunit                      as OrderQuantityUnit,
      ekpo_distr.distributiontype                       as DistributionType,
      ekpo_distr.responsemessageguid                    as DistrResponseMessageUUID,
      ekpo_distr.itemdistributionisrelevant             as ItemDistributionIsRelevant,
      ekpo_distr.referencedhdrdistrnumber               as ReferenceHeaderDistributionKey,
      ekpo_distr.isitemdistributionblocked              as CntrlPurContrItmDistrIsBlocked,
      ekpo_distr.distributionlevel                      as CntrlPurContrDistributionLevel,
 
      ekpo_distr.manualdeliveryaddressid                as ManualDeliveryAddressID,
      ekpo_distr.deliveryaddresstype                    as AddressType,
      case
      when ekpo_distr.procurementhubsourcesystem is not initial
      then ekpo_distr.procurementhubsourcesystem
      else
      ekpo_distr.logicalsystem
       end                                              as ProcurementHubSourceSystem,
      ekpo_distr.externalreferencedocument              as ExternalReferenceDocument,
      ekpo_distr.externalreferencedocumentitem          as ExternalReferenceDocumentItem,
      ekpo_distr.externalrefdoccategory                 as ExternalRefDocCategory,
      ekpo_distr.purchasinginforecordupdatecode         as PurchasingInfoRecordUpdateCode,
      ekpo_distr.procmthubpredecessordocument           as ProcmtHubPredecessorDocument,
      ekpo_distr.procmthubpredecessordocitem            as ProcmtHubPredecessorDocItem,
      ekpo_distr.procmthubpredecessordoccat             as ProcmtHubPredecessorDocCat,
      ekpo_distr.procmthubpurchaserequisition           as ProcmtHubPurchaseRequisition,
      ekpo_distr.procmthubpurrequisitionitem            as ProcmtHubPurRequisitionItem,
      
      /*sourcelist related */
      ekpo_distr.sourcelistisupdated                    as SourceListIsUpdated,
      ekpo_distr.sourcelistrestriction                  as SourceListRestriction,
      ekpo_distr.srcelistresponsemsguuid                as SrceListResponseMsgUUID,   
      ekpo_distr.sourcelistchangeconfstatus             as SourceListChangeConfStatus,   
      ekpo_distr.procmthubcompanycodegroupingid         as ProcmtHubCompanyCodeGroupingID
       

}
    
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"EKPO_DISTR"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/