I_EMPLOYSTATDET
Employment status
I_EMPLOYSTATDET is a CDS View in S/4HANA. Employment status. 2 CDS views read from this table.
CDS Views using this table (2)
| View | Type | Join | VDM | Description |
|---|---|---|---|---|
| C_ChgRecdWorkflowRecipientVH | view | inner | CONSUMPTION | People Picker for Change Record task processor |
| I_Employeeshlp | view | left_outer | BASIC | Search Help for Employee |
@AbapCatalog.sqlViewName: 'IEMPLOYSTATDET'
@VDM.viewType: #BASIC
@EndUserText.label: 'Employment status'
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel.usageType.dataClass: #MASTER
@ObjectModel.usageType.serviceQuality: #C
//@ObjectModel.usageType.serviceQuality: #A
@ObjectModel.usageType.sizeCategory: #L
define view I_EmployStatDet
as select from wfd_d_assgmtdets as assgmtdets
inner join wfd_d_assgmt as assgmt on assgmt.workforce_assgmt_id = assgmtdets.workforce_assgmt_id
and assgmtdets.end_date between assgmt.start_date and assgmt.end_date
inner join wfd_d_keymap as wfd_d_keymap on assgmt.workforce_assgmt_id = wfd_d_keymap.workforce_assgmt_id
// inner join WFD_TF_EmploymentMinPernr( p_client : $session.client ) as mainEmployment on mainEmployment.PersonnelNumber = wfd_d_keymap.business_partner_id
// and mainEmployment.mandt = $session.client
inner join P_WFD_GET_MINEPERNR as mainEmployment on mainEmployment.PersonnelNumber = wfd_d_keymap.business_partner_id
{
key assgmtdets.workforce_assgmt_id as EmploymentInternalID,
@Semantics.businessDate.from
key assgmtdets.start_date as StartDate,
@Semantics.businessDate.to
assgmtdets.end_date as EndDate,
wfd_d_keymap.central_person as PersonnelNumber,
case when assgmtdets.workforce_assgmt_id = mainEmployment.EmploymentInternalID
then 'X'
else ''
end as IsMainEmployment,
assgmtdets.employment_status as EmploymentStatus,
cast('' as vdsk1 ) as PersonWorkAgrmtAuthznGrpg
}
where
assgmtdets.block_ind = ''
and assgmt.block_ind = ''
and wfd_d_keymap.block_ind = ''
and assgmtdets.company_code != ''
and assgmtdets.technical_inactive_ind is initial;
/*
//define view I_EmployStatDet as select from P_U_EmployStatDet
define view I_EmployStatDet as select from wfd_tf_EmployStatDet( p_client : $session.client )
{
key EmploymentInternalID,
// @Semantics.businessDate.from/to - Annotation SEMANTICS.BUSINESSDATE.FROM/TO does not exist
@Semantics.businessDate.from
key StartDate,
// @Semantics.businessDate.from/to - Annotation SEMANTICS.BUSINESSDATE.FROM/TO does not exist
@Semantics.businessDate.to
EndDate,
PersonnelNumber, //cast(Employment.PersonnelNumber as /shcm/employee_int_id) as PersonnelNumber,
IsMainEmployment, //cast(Employment.IsMainEmployment as /shcm/main_employmnt_indicator) as IsMainEmployment,
EmploymentStatus,
PersonWorkAgrmtAuthznGrpg
}*/
//define view I_EmployStatDet as select from P_U_EmployStatDet
//{
// key EmploymentInternalID,
// @Semantics.businessDate.from/to
// key StartDate,
// @Semantics.businessDate.from/to
// EndDate,
// PersonnelNumber, //cast(Employment.PersonnelNumber as /shcm/employee_int_id) as PersonnelNumber,
// IsMainEmployment, //cast(Employment.IsMainEmployment as /shcm/main_employmnt_indicator) as IsMainEmployment,
// EmploymentStatus,
// PersonWorkAgrmtAuthznGrpg
//}
//as select from /shcm/hrp5090 as details
//
//association[0..1] to P_EmploymentCl as XM on
// details.objid = XM.EmploymentInternalID and
// details.begda <= XM.EndDate and
// details.endda >= XM.StartDate
//
// {
//
// // key cast(details.objid as PERNR_D) as EmploymentInternalID,
// key details.objid as EmploymentInternalID,
// @Semantics.businessDate.from/to
// key details.begda as StartDate,
// @Semantics.businessDate.from/to
// details.endda as EndDate,
// XM.PersonnelNumber,
// XM.IsMainEmployment,
// details.status as EmploymentStatus
//}
//
//union all
// as select from pa0000 as it0000
// inner join pa0001 as it0001 on it0000.pernr = it0001.pernr
// and it0001.sprps <> 'X'
// and it0000.endda between it0001.begda and it0001.endda
// association[0..1] to P_EmploymentOp as Employment on it0000.pernr = Employment.EmploymentInternalID
//
//{
// key it0000.pernr as EmploymentInternalID,
// @Semantics.businessDate.from/to
// key it0000.begda as StartDate,
// @Semantics.businessDate.from/to
// it0000.endda as EndDate,
// Employment.PersonnelNumber as PersonnelNumber, //cast(Employment.PersonnelNumber as /shcm/employee_int_id) as PersonnelNumber,
// Employment.IsMainEmployment as IsMainEmployment, //cast(Employment.IsMainEmployment as /shcm/main_employmnt_indicator) as IsMainEmployment,
// case it0000.stat2
// when '3' then '1'
// else '0'
// end as EmploymentStatus ,
// it0001.vdsk1 as PersonWorkAgrmtAuthznGrpg
//}