C_ServiceEmployeeVH

DDL: C_SERVICEEMPLOYEEVH Type: view CONSUMPTION

Value Help for Service Employee

C_ServiceEmployeeVH is a Consumption CDS View that provides data about "Value Help for Service Employee" in SAP S/4HANA. It reads from 1 data source (I_BusinessPartner) and exposes 27 fields with key field Employee. It has 3 associations to related views.

Data Sources (1)

SourceAliasJoin Type
I_BusinessPartner I_BusinessPartner from

Associations (3)

CardinalityTargetAliasCondition
[1..1] I_BPCurrentDefaultAddress _CurrentDefaultAddress $projection.Employee = _CurrentDefaultAddress.BusinessPartner
[0..1] I_WorkplaceAddress _WorkplaceAddress $projection.BusinessPartnerUUID = _WorkplaceAddress.BusinessPartnerUUID
[1..1] I_BusinessPartnerToBPRole _BusinessPartnerRole $projection.Employee = _BusinessPartnerRole.BusinessPartner and( _BusinessPartnerRole.BusinessPartnerRole = 'BUP003' or _BusinessPartnerRole.BusinessPartnerRole = 'BBP005' or _BusinessPartnerRole.BusinessPartnerRole = 'BBP010' )

Annotations (17)

NameValueLevelField
AbapCatalog.sqlViewName CSRVCEMPLVH view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #CHECK view
AccessControl.personalData.blocking #REQUIRED view
ClientHandling.algorithm #SESSION_VARIABLE view
VDM.viewType #CONSUMPTION view
ObjectModel.representativeKey Employee view
ObjectModel.dataCategory #VALUE_HELP view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.dataClass #MASTER view
Metadata.allowExtensions true view
Metadata.ignorePropagatedAnnotations true view
Consumption.ranked true view
Search.searchable true view
EndUserText.label Value Help for Service Employee view

Fields (27)

KeyFieldSource TableSource FieldDescription
KEY Employee
FullName
FamilyName LastName
GivenName FirstName
BusinessPartnerUUID BusinessPartnerUUID
CityName
CountryName
PostalCode
DefaultEmailAddress _WorkplaceAddress DefaultEmailAddress
NormalizedPhoneNumber
MblNormalizedPhoneNumber
AuthorizationGroup AuthorizationGroup
IsBusinessPurposeCompleted IsBusinessPurposeCompleted
BusinessPartnerRole
BPAddressIsProtected _CurrentDefaultAddress BPAddressIsProtected
BusinessPartnerCategory BusinessPartnerCategory
DataControllerSet DataControllerSet
DataController1 DataController1
DataController2 DataController2
DataController3 DataController3
DataController4 DataController4
DataController5 DataController5
DataController6 DataController6
DataController7 DataController7
DataController8 DataController8
DataController9 DataController9
DataController10 DataController10
@AbapCatalog: {
  sqlViewName: 'CSRVCEMPLVH',
  compiler.compareFilter: true,
  preserveKey: true
}

@AccessControl:{
  authorizationCheck: #CHECK,
  personalData.blocking: #REQUIRED
}

@ClientHandling.algorithm: #SESSION_VARIABLE

@VDM.viewType: #CONSUMPTION

@ObjectModel: {
  representativeKey: 'Employee',
  dataCategory: #VALUE_HELP,
  usageType: {
                serviceQuality: #C,
                sizeCategory: #L,
                dataClass: #MASTER
                }
}

@Metadata: {
  allowExtensions: true,
  ignorePropagatedAnnotations: true
}

@Consumption.ranked: true

@Search.searchable: true

@EndUserText.label: 'Value Help for Service Employee'

define view C_ServiceEmployeeVH
  as select from I_BusinessPartner // I_Employee is deprecated and not to be used

  association [1..1] to I_BPCurrentDefaultAddress as _CurrentDefaultAddress on $projection.Employee = _CurrentDefaultAddress.BusinessPartner

  association [0..1] to I_WorkplaceAddress        as _WorkplaceAddress      on $projection.BusinessPartnerUUID = _WorkplaceAddress.BusinessPartnerUUID

  association [1..1] to I_BusinessPartnerToBPRole as _BusinessPartnerRole   on $projection.Employee                       = _BusinessPartnerRole.BusinessPartner
                                                                            and(
                                                                              _BusinessPartnerRole.BusinessPartnerRole    = 'BUP003' // BUP003 - Employee

                                                                              or _BusinessPartnerRole.BusinessPartnerRole = 'BBP005' // BBP005 - Service Agent

                                                                              or _BusinessPartnerRole.BusinessPartnerRole = 'BBP010' // BBP010 - Freelancer

                                                                            )
{
           @ObjectModel.text.element: ['FullName']
  key      cast (BusinessPartner as crms4_serv_employee_lbl preserving type )                         as Employee,

           cast (BusinessPartnerName as crms4_serv_employee_name_lbl preserving type )                as FullName,

           // required for Fiori search on the name (as FullName is a calculated field it cannot be used)

           @Consumption.hidden:true
           LastName                                                                                   as FamilyName,

           @Consumption.hidden:true
           FirstName                                                                                  as GivenName,

           @Consumption.hidden: true
           BusinessPartnerUUID,

           _CurrentDefaultAddress._StandardAddress.CityName,
           _CurrentDefaultAddress._StandardAddress._Country._Text[1:Language=$session.system_language].CountryName,
           _CurrentDefaultAddress._StandardAddress.PostalCode,

           _WorkplaceAddress.DefaultEmailAddress,

           cast (_WorkplaceAddress.NormalizedPhoneNumber as crms4_serv_telephone_lbl preserving type) as NormalizedPhoneNumber,

           cast (_WorkplaceAddress.MblNormalizedPhoneNumber as crms4_serv_mobile_lbl preserving type) as MblNormalizedPhoneNumber,

           // required for authorization check

           @Consumption.hidden: true
           AuthorizationGroup,

           @Consumption.hidden:true
           IsBusinessPurposeCompleted,

           // inner statement causes inner join to select only the employees

           _BusinessPartnerRole[inner].BusinessPartnerRole,

           @Consumption.hidden: true
           _CurrentDefaultAddress.BPAddressIsProtected,

           @Consumption.hidden: true
           BusinessPartnerCategory,

           //added only for DCL check

           @Consumption.hidden:true
           @UI.hidden:true
           DataControllerSet,
           @Consumption.hidden:true
           @UI.hidden:true
           DataController1,
           //added only for DCL check

           @Consumption.hidden:true
           @UI.hidden:true
           DataController2,
           //added only for DCL check

           @Consumption.hidden:true
           @UI.hidden:true
           DataController3,
           //added only for DCL check

           @Consumption.hidden:true
           @UI.hidden:true
           DataController4,
           //added only for DCL check

           @Consumption.hidden:true
           @UI.hidden:true
           DataController5,
           @Consumption.hidden:true
           @UI.hidden:true
           DataController6,
           //added only for DCL check

           @Consumption.hidden:true
           @UI.hidden:true
           DataController7,
           //added only for DCL check

           @Consumption.hidden:true
           @UI.hidden:true
           DataController8,
           //added only for DCL check

           @Consumption.hidden:true
           @UI.hidden:true
           DataController9,
           //added only for DCL check

           @Consumption.hidden:true
           @UI.hidden:true
           DataController10

}
where
  BusinessPartnerCategory = '1'
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_ADDRESS",
"I_BPCURRENTDEFAULTADDRESS",
"I_BUSINESSPARTNER",
"I_BUSINESSPARTNERTOBPROLE",
"I_COUNTRY",
"I_COUNTRYTEXT",
"I_WORKPLACEADDRESS"
],
"ASSOCIATED":
[
"I_BPCURRENTDEFAULTADDRESS",
"I_BUSINESSPARTNERTOBPROLE",
"I_WORKPLACEADDRESS"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/