I_HCMEmployeeAddressBook
Employee Address Book
I_HCMEmployeeAddressBook is a CDS View that provides data about "Employee Address Book" in SAP S/4HANA. It reads from 8 data sources and exposes 32 fields with key field HCMPersonnelNumber.
Data Sources (8)
Annotations (12)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | I_HCMEEADRBOOK | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| EndUserText.label | Employee Address Book | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| ObjectModel.usageType.serviceQuality | #D | view | |
| ObjectModel.usageType.sizeCategory | #L | view | |
| ObjectModel.usageType.dataClass | #MASTER | view | |
| AccessControl.personalData.blocking | #BLOCKED_DATA_EXCLUDED | view | |
| ObjectModel.sapObjectNodeType.name | Employee | view | |
| Search.searchable | true | view | |
| Metadata.allowExtensions | true | view |
Fields (32)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | HCMPersonnelNumber | pa0003 | pernr | |
| HCMEmployeeLastName | pa0002 | nchmc | ||
| HCMEmployeeFirstName | pa0002 | vnamc | ||
| HCMEmployeeName | pa0001 | ename | ||
| HCMCompanyCode | pa0001 | bukrs | ||
| HCMCompanyCodeName | companyCode | CompanyCodeName | ||
| HCMOrganizationalUnit | orgUnit | orgeh | ||
| HCMOrganizationalUnitName | orgUnit | orgtx | ||
| HCMPosition | pa0001 | plans | ||
| HCMPersonnelArea | pa0001 | werks | ||
| HCMPersonnelAreaName | persArea | name1 | ||
| HCMPersonnelSubarea | pa0001 | btrtl | ||
| HCMPersonnelSubareaName | persSubArea | btext | ||
| HCMRoomNumber | it0032 | zimnr | ||
| HCMBuilding | it0032 | gebnr | ||
| HCMStreet | t777a | stras | ||
| HCMPostalCode | t777a | pstlz | ||
| HCMCityName | t777a | ort01 | ||
| HCMCountryCode | t777a | land1 | ||
| HCMCountryName | t005T | landx | ||
| RegionName | t005U | bezei | ||
| HCMHouseNumber | t777a | hausn | ||
| HCMEmployeePictureURL | picture | HCMEmployeePictureURL | ||
| HCMObjectType | hrp1001 | otype | ||
| InternationalPhoneNumber | bp_phone | telnr_long | ||
| HCMEmployeeEmailAddress | bp_mail | smtp_addr | ||
| InternationalMobilePhoneNumber | bp_mobile_phone | telnr_long | ||
| HCMJob | job | stell | ||
| HCMJobTitle | job | stltx | ||
| CostCenter | pa0001 | kostl | ||
| CostCenterName | costCenterText | kokrs | ||
| HCMEmployeeIsManager | isManagerText | ddtext |
@AbapCatalog.sqlViewName: 'I_HCMEEADRBOOK'
@ClientHandling.algorithm: #SESSION_VARIABLE
@AbapCatalog.compiler.compareFilter: true
@EndUserText.label: 'Employee Address Book'
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ObjectModel.usageType.serviceQuality: #D
@ObjectModel.usageType.sizeCategory: #L
@ObjectModel.usageType.dataClass: #MASTER
@AccessControl.personalData.blocking: #BLOCKED_DATA_EXCLUDED
@ObjectModel.semanticKey: ['HCMPersonnelNumber']
@ObjectModel.sapObjectNodeType.name: 'Employee'
@Search.searchable: true
@Metadata.allowExtensions: true
define view I_HCMEmployeeAddressBook
as select from pa0003 as it0003
//onyl active pers. numbers
inner join pa0000 as it0000 on it0000.pernr = it0003.pernr
and it0000.stat2 = '3'
and (
(
(
it0000.begda <= $session.system_date
and it0000.endda >= $session.system_date
)
)
or(
it0000.begda >= $session.system_date
)
)
//get IT0001 data
inner join pa0001 as it0001 on it0001.pernr = it0003.pernr
and it0001.begda <= $session.system_date
and it0001.endda >= $session.system_date
//get IT0002 data
inner join pa0002 as it0002 on it0002.pernr = it0003.pernr
and it0002.begda <= $session.system_date
and it0002.endda >= $session.system_date
//get CP
inner join hrp1001 as centralPerson on centralPerson.objid = it0003.pernr
and centralPerson.otype = 'P'
and centralPerson.rsign = 'A'
and centralPerson.relat = '209'
and centralPerson.endda = '99991231'
//BP
inner join hrp1001 as bp on bp.objid = centralPerson.sobid
and bp.otype = 'CP'
and bp.sclas = 'BP'
and bp.endda = '99991231'
inner join but000 as bp_gen_data on bp_gen_data.partner = bp.sobid
//check if selected Pernr is the Main contract
inner join but0id as bp_id_num on bp_id_num.partner = bp.sobid
and bp_id_num.idnumber = it0003.pernr
and (
bp_id_num.type = 'HCM012'
or bp_id_num.type = 'HCM032'
)
// BP address data (phone and mail)
left outer to one join mom052 as bp_work_address on bp_work_address.partner_guid = bp_gen_data.partner_guid
left outer to one join adr6 as bp_mail on bp_mail.addrnumber = bp_work_address.org_addr_number
and bp_mail.flgdefault = 'X'
left outer to one join adr2 as bp_phone on bp_phone.addrnumber = bp_work_address.org_addr_number
and bp_phone.flgdefault = 'X'
and bp_phone.r3_user = '1'
left outer to one join adr2 as bp_mobile_phone on bp_mobile_phone.addrnumber = bp_work_address.org_addr_number
and bp_mobile_phone.r3_user = '3'
left outer to one join adcp as bp_business_address on bp_business_address.addrnumber = bp_work_address.org_addr_number
//get contact infomation from IT0032
left outer to one join pa0032 as it0032 on it0032.pernr = it0001.pernr
and it0032.begda <= $session.system_date
and it0032.endda >= $session.system_date
//get contact infomation from IT1028
left outer to one join hrp1028 as hrp1028 on hrp1028.objid = it0001.plans
and hrp1028.begda <= $session.system_date
and hrp1028.endda >= $session.system_date
left outer to one join t777a as t777a on t777a.build = hrp1028.build
left outer to one join t005t as t005T on t005t.land1 = t777a.land1
and t005t.spras = $session.system_language
left outer to one join t005u as t005U on t005u.land1 = t777a.land1
and t005u.bland = t777a.regio
and t005u.spras = $session.system_language
//get Org Unit name
left outer to one join t527x as orgUnit on orgUnit.orgeh = it0001.orgeh
and orgUnit.begda <= $session.system_date
and orgUnit.endda >= $session.system_date
and orgUnit.sprsl = $session.system_language
//get Job name
left outer to one join t513s as job on job.stell = it0001.stell
and job.begda <= $session.system_date
and job.endda >= $session.system_date
and job.sprsl = $session.system_language
//get Company Code Name
left outer to one join I_CompanyCode as companyCode on companyCode.CompanyCode = it0001.bukrs
//get Pers Area Name
left outer to one join t500p as persArea on persArea.persa = it0001.werks
//get Pers Sub Area Name
left outer to one join t001p as persSubArea on persSubArea.werks = it0001.werks
and persSubArea.btrtl = it0001.btrtl
//get cost center name
left outer to one join cskt as costCenterText on costCenterText.kostl = it0001.kostl
and costCenterText.kokrs = it0001.kokrs
and costCenterText.datbi >= $session.system_date
and costCenterText.spras = $session.system_language
//Get Employee Picture
left outer to one join I_HCMEmployeePicture as picture on picture.HCMPersonID = centralPerson.sobid
and picture.HCMPersonnelNumber = it0001.pernr
//get "is Manager" Info
left outer to one join I_HCMIsManagerPosition as isManager on isManager.HCMPosition = it0001.plans
left outer to one join dd07t as isManagerText on isManagerText.domname = 'HR_H4S4_YESNO'
and isManagerText.domvalue_l = isManager.HCMIsManagerPosition
and isManagerText.as4local = 'A' --active
and isManagerText.valpos = '0001' --Position
and isManagerText.as4vers = '0000' --not used
and isManagerText.ddlanguage = $session.system_language
{
@Search.defaultSearchElement: true
@UI.identification: [{ importance: #HIGH, position: 1 }]
key it0003.pernr as HCMPersonnelNumber,
it0002.nchmc as HCMEmployeeLastName,
it0002.vnamc as HCMEmployeeFirstName,
it0001.ename as HCMEmployeeName,
it0001.bukrs as HCMCompanyCode,
companyCode.CompanyCodeName as HCMCompanyCodeName,
orgUnit.orgeh as HCMOrganizationalUnit,
orgUnit.orgtx as HCMOrganizationalUnitName,
it0001.plans as HCMPosition,
it0001.werks as HCMPersonnelArea,
persArea.name1 as HCMPersonnelAreaName,
it0001.btrtl as HCMPersonnelSubarea,
persSubArea.btext as HCMPersonnelSubareaName,
it0032.zimnr as HCMRoomNumber,
it0032.gebnr as HCMBuilding,
t777a.stras as HCMStreet,
t777a.pstlz as HCMPostalCode,
t777a.ort01 as HCMCityName,
t777a.land1 as HCMCountryCode,
t005T.landx as HCMCountryName,
t005U.bezei as RegionName,
t777a.hausn as HCMHouseNumber,
picture.HCMEmployeePictureURL as HCMEmployeePictureURL,
centralPerson.otype as HCMObjectType,
bp_phone.telnr_long as InternationalPhoneNumber,
bp_mail.smtp_addr as HCMEmployeeEmailAddress,
bp_mobile_phone.telnr_long as InternationalMobilePhoneNumber,
job.stell as HCMJob,
job.stltx as HCMJobTitle,
it0001.kostl as CostCenter,
costCenterText.kokrs as CostCenterName,
isManagerText.ddtext as HCMEmployeeIsManager
}
// BLOCKING INFORMATION
where
(
it0003.blocking_date >= $session.system_date
)
or(
it0003.blocking_date is initial
)
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_COMPANYCODE",
"I_HCMEMPLOYEEPICTURE",
"I_HCMISMANAGERPOSITION",
"ADCP",
"ADR2",
"ADR6",
"BUT000",
"BUT0ID",
"CSKT",
"DD07T",
"HRP1001",
"HRP1028",
"MOM052",
"PA0000",
"PA0001",
"PA0002",
"PA0003",
"PA0032",
"T001P",
"T005T",
"T005U",
"T500P",
"T513S",
"T527X",
"T777A"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/
Learn More
- What Is a CDS View in SAP S/4HANA?
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- CDS View Annotations — A Complete Guide
- CDS View Field Mapping and Associations
- Understanding the SAP S/4HANA Data Model
- CDS View Extensions and Custom Fields in SAP S/4HANA
- Released APIs and Stability Contracts in SAP S/4HANA