I_EmployeePositionOP

DDL: I_EMPLOYEEPOSITIONOP SQL: IEMPPOSOP Type: view BASIC

Employee Position for OnPremise

I_EmployeePositionOP is a Basic CDS View that provides data about "Employee Position for OnPremise" in SAP S/4HANA. It reads from 4 data sources (I_Employee, hrp1001, hrp1001, P_PDRELATION) and exposes 10 fields with key field EmploymentInternalID.

Data Sources (4)

SourceAliasJoin Type
I_Employee Employee inner
hrp1001 EmployeeRelation from
hrp1001 PositionRelation left_outer
P_PDRELATION relat inner

Annotations (9)

NameValueLevelField
AbapCatalog.sqlViewName IEMPPOSOP view
VDM.viewType #BASIC view
AccessControl.authorizationCheck #NOT_REQUIRED view
EndUserText.label Employee Position for OnPremise view
AccessControl.personalData.blocking #NOT_REQUIRED view
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.dataClass #MASTER view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #L view

Fields (10)

KeyFieldSource TableSource FieldDescription
KEY EmploymentInternalID P_PDRELATION ObjectID
begdaasValidityStartDate
enddaasValidityEndDate
PersonnelNumber I_Employee PersonnelNumber
Employee I_Employee Employee
FullName I_Employee FullName
OrganizationalUnit hrp1001 objid
StartDate hrp1001 begda
EndDate hrp1001 endda
Appointment hrp1001 objid
@AbapCatalog.sqlViewName: 'IEMPPOSOP'
@VDM.viewType: #BASIC
@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'Employee Position for OnPremise'
@AccessControl.personalData.blocking: #NOT_REQUIRED
@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel.usageType.dataClass: #MASTER
@ObjectModel.usageType.serviceQuality: #C
@ObjectModel.usageType.sizeCategory: #L

define view I_EmployeePositionOP
  as select from    hrp1001                                       as EmployeeRelation

    inner join      P_PDRELATION                                  as relat            on  relat.ObjectID              = EmployeeRelation.sobid
                                                                                      and relat.ObjectType            = 'P'
                                                                                      and //P Person

                                                                                          relat.RelationShipDirection = 'A'
                                                                                      and relat.ReleationShip         = '209'
                                                                                      and relat.RelatedObjectType     = 'CP'
                                                                                      and relat.ObjectID              = EmployeeRelation.sobid
                                                                                      and relat.StartDate             <= $session.system_date
                                                                                      and relat.EndDate               >= $session.system_date
    inner join      I_Employee                                    as Employee         on relat.RelatedObjectID = Employee.PersonnelNumber
    left outer join hrp1001                                       as PositionRelation on  PositionRelation.otype      = 'O'
                                                                                      and PositionRelation.rsign      = 'B'
                                                                                      and PositionRelation.relat      = '003'
                                                                                      and PositionRelation.sclas      = 'S'
                                                                                      and PositionRelation.sobid      = EmployeeRelation.objid
                                                                                      and PositionRelation.begda      <= $session.system_date
                                                                                      and PositionRelation.endda      >= $session.system_date
    /*left outer join P_PDOBJECTRELATION(P_ObjectType :'O',
                                      P_RelationShipDirection :'B',
                                      P_RelationShip :'003',
                                      P_RelatedObjectType : 'S' ) as PositionRelation on  EmployeeRelation.objid     = PositionRelation.RelatedObjectID
                                                                                      and PositionRelation.StartDate <= $session.system_date
                                                                                      and PositionRelation.EndDate   >= $session.system_date*/
{

  key relat.ObjectID            as EmploymentInternalID,
      @Semantics.businessDate.from/to
      EmployeeRelation.begda    as ValidityStartDate,
      @Semantics.businessDate.from/to
      EmployeeRelation.endda    as ValidityEndDate,
      Employee.PersonnelNumber,
      Employee.Employee,
      Employee.FullName,
      PositionRelation.objid    as OrganizationalUnit,
      PositionRelation.begda    as StartDate,
      PositionRelation.endda    as EndDate,
      EmployeeRelation.objid    as Appointment

}
where
      EmployeeRelation.otype = 'S'
  and EmployeeRelation.rsign = 'A'
  and EmployeeRelation.relat = '008'
  and EmployeeRelation.sclas = 'P'
  and EmployeeRelation.begda <= $session.system_date
  and EmployeeRelation.endda >= $session.system_date