P_ProdAllocPlngBusPartners is a Composite CDS View 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.
@VDM.private: true@VDM.viewType: #COMPOSITE@AbapCatalog.sqlViewName: 'PPABOBJ_PLNGBPS'
@AccessControl.authorizationCheck: #NOT_REQUIRED@ClientHandling.algorithm: #SESSION_VARIABLE@ObjectModel.usageType.serviceQuality: #C@ObjectModel.usageType.sizeCategory: #M@ObjectModel.usageType.dataClass: #MASTER// Since this viewis used in a generic characteristic F4-help, which works for
// characteristics and accesses this viewwith a generic select statement getting
// view name and field names from the CharacteristicCatalogPath meta data, we cannot
// use a DCL on this viewwith corresponding BusinessPartner authorization objects
// for the diffrent roles (Customer, Supplier, Contact, Employee). Inorder 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.
defineview P_ProdAllocPlngBusPartners
asselectfrom 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 = ''
unionselectfrom 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 = ''
unionselectfrom 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
casewhen contact.FirstName <> '' or contact.LastName <> ''
then substring(rtrim(replace(concat(contact.FirstName, concat(' &@', contact.LastName)), '&@', ''),' '),1,80)
else ''
endas BusinessPartnerName
}
where contact.IsBusinessPurposeCompleted = ''
unionselectfrom 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 = ''
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_CONTACTPERSON",
"I_CUSTOMER",
"I_PERSWRKAGRMTALLSRCHHELP",
"I_SUPPLIER"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/