P_ProdAllocPlngBusPartners

DDL: P_PRODALLOCPLNGBUSPARTNERS SQL: PPABOBJ_PLNGBPS Type: view COMPOSITE Package: PRODUCT_ALLOCATION_OBJECT

Product Allocation Planning Business Partners

P_ProdAllocPlngBusPartners is a Composite CDS View that provides data about "Product Allocation Planning Business Partners" in SAP S/4HANA. It reads from 4 data sources (I_ContactPerson, I_Customer, I_PersWrkAgrmtAllSrchHelp, I_Supplier) and exposes 9 fields with key fields BusinessPartner, SDDocumentPartnerType, SDDocumentPartnerType, SDDocumentPartnerType, SDDocumentPartnerType. Part of development package PRODUCT_ALLOCATION_OBJECT.

Data Sources (4)

SourceAliasJoin Type
I_ContactPerson contact union
I_Customer customer from
I_PersWrkAgrmtAllSrchHelp employee union
I_Supplier vendor union

Annotations (9)

NameValueLevelField
VDM.private true view
VDM.viewType #COMPOSITE view
AbapCatalog.sqlViewName PPABOBJ_PLNGBPS view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #NOT_REQUIRED view
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #M view
ObjectModel.usageType.dataClass #MASTER view

Fields (9)

KeyFieldSource TableSource FieldDescription
KEY BusinessPartner
KEY SDDocumentPartnerType
SupplierasBusinessPartner
KEY SDDocumentPartnerType
ContactPersonasBusinessPartner
KEY SDDocumentPartnerType
PersonWorkAgreementasBusinessPartner
KEY SDDocumentPartnerType
BusinessPartnerName I_PersWrkAgrmtAllSrchHelp PersonFullName
@VDM.private: true
@VDM.viewType: #COMPOSITE
@AbapCatalog.sqlViewName: 'PPABOBJ_PLNGBPS'
@AbapCatalog.compiler.compareFilter:true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel.usageType.serviceQuality: #C
@ObjectModel.usageType.sizeCategory: #M
@ObjectModel.usageType.dataClass: #MASTER

// Since this view is used in a generic characteristic F4-help, which works for

// characteristics and accesses this view with a generic select statement getting

// view name and field names from the CharacteristicCatalogPath meta data, we cannot

// use a DCL on this view with corresponding BusinessPartner authorization objects

// for the diffrent roles (Customer, Supplier, Contact, Employee). In order to

// fulfill the Data Privacy & Protection standards for preventing blocked business

// partners from being displayed in the F4-helpm, we need to direclty access

// the blocking indicators of the different business partner roles.

// The employee has a different blocking logic (DP&P handling) and only returns

// in employee view I_Employmentshlp non-terminated employees and also only

// current and future employees which cannot be blocked.


define view P_ProdAllocPlngBusPartners
  as select from I_Customer as customer
{
  key  ltrim(customer.Customer,' ')                 as BusinessPartner,

  key  'KU'                                         as SDDocumentPartnerType,      //IF_PROD_ALLOC_CHARC_CATALOG_C=>SC_CUSTOMER-PARTNER_TYPE


       customer.CustomerName                        as BusinessPartnerName
}
where customer.IsBusinessPurposeCompleted = '' 

union

select from I_Supplier as vendor
{
  key  ltrim(vendor.Supplier,' ')                   as BusinessPartner,

  key  'LI'                                         as SDDocumentPartnerType,      //IF_PROD_ALLOC_CHARC_CATALOG_C=>SC_VENDOR-PARTNER_TYPE


       vendor.SupplierName                          as BusinessPartnerName
}
where vendor.IsBusinessPurposeCompleted = ''

union

select from I_ContactPerson as contact
{
  key  ltrim(contact.ContactPerson,' ')             as BusinessPartner,

  key  'AP'                                         as SDDocumentPartnerType, //IF_PROD_ALLOC_CHARC_CATALOG_C=>SC_CONTACT_PERSONS-PARTNER_TYPE


       case

       when contact.FirstName <> '' or contact.LastName <> ''

         then substring(rtrim(replace(concat(contact.FirstName, concat(' &@', contact.LastName)), '&@', ''),' '),1,80) 

       else ''

       end                                          as BusinessPartnerName
}
where contact.IsBusinessPurposeCompleted = ''

union

select from I_PersWrkAgrmtAllSrchHelp  as employee
{

  key  ltrim(employee.PersonWorkAgreement,' ')      as BusinessPartner,

  key  'PE'                                         as SDDocumentPartnerType, //IF_PROD_ALLOC_CHARC_CATALOG_C=>SC_PERSONNEL_NUMBER-PARTNER_TYPE


      employee.PersonFullName                       as BusinessPartnerName
}
where employee.IsBusinessPurposeCompleted = ''