R_WorkAssgmtPrivateAddressTP

DDL: R_WORKASSGMTPRIVATEADDRESSTP Type: view_entity TRANSACTIONAL

Private Address for Work Assignment

R_WorkAssgmtPrivateAddressTP is a Transactional CDS View that provides data about "Private Address for Work Assignment" in SAP S/4HANA. It reads from 2 data sources (R_WorkAssignmentBP, I_BusinessPartnerAddress_2) and exposes 18 fields with key fields WorkAssignmentUUID, AddressNumber. It has 3 associations to related views.

Data Sources (2)

SourceAliasJoin Type
R_WorkAssignmentBP _BuPaIdentification inner
I_BusinessPartnerAddress_2 _PrivateAddress from

Associations (3)

CardinalityTargetAliasCondition
[1..1] I_BusinessPartner _WorkAssignmentBP _WorkAssignmentBP.BusinessPartner = _BuPaIdentification.WorkAssignmentBusinessPartner
[1..1] I_BusinessPartner _WorkforcePersonBP _WorkforcePersonBP.BusinessPartner = _BuPaIdentification.BusinessPartner
[1..1] R_WorkforcePersonTP _WorkforcePerson $projection.PersonUUID = _WorkforcePerson.PersonUUID

Annotations (8)

NameValueLevelField
AccessControl.authorizationCheck #MANDATORY view
EndUserText.label Private Address for Work Assignment view
Metadata.ignorePropagatedAnnotations true view
VDM.viewType #TRANSACTIONAL view
VDM.lifecycle.contract.type #SAP_INTERNAL_API view
ObjectModel.usageType.serviceQuality #X view
ObjectModel.usageType.sizeCategory #S view
ObjectModel.usageType.dataClass #MIXED view

Fields (18)

KeyFieldSource TableSource FieldDescription
KEY WorkAssignmentUUID _WorkAssignmentBP BusinessPartnerUUID
KEY AddressNumber I_BusinessPartnerAddress_2 AddressNumber
ValidityStartDate
ValidityEndDate
HouseNumber I_BusinessPartnerAddress_2 HouseNumber
StreetName I_BusinessPartnerAddress_2 StreetName
HouseNumberSupplementText I_BusinessPartnerAddress_2 HouseNumberSupplementText
DistrictName I_BusinessPartnerAddress_2 DistrictName
PostalCode I_BusinessPartnerAddress_2 PostalCode
CityName I_BusinessPartnerAddress_2 CityName
Country I_BusinessPartnerAddress_2 Country
Region I_BusinessPartnerAddress_2 Region
POBox I_BusinessPartnerAddress_2 POBox
POBoxPostalCode I_BusinessPartnerAddress_2 POBoxPostalCode
Floor I_BusinessPartnerAddress_2 Floor
RoomNumber I_BusinessPartnerAddress_2 RoomNumber
PersonUUID _WorkforcePersonBP BusinessPartnerUUID
_WorkforcePerson _WorkforcePerson
@AbapCatalog.viewEnhancementCategory: [#NONE]
@AccessControl.authorizationCheck: #MANDATORY
@EndUserText.label: 'Private Address for Work Assignment'
@Metadata.ignorePropagatedAnnotations: true
@VDM: {
  viewType: #TRANSACTIONAL,
  lifecycle.contract.type: #SAP_INTERNAL_API
}
@ObjectModel.usageType:{
  serviceQuality: #X,
  sizeCategory: #S,
  dataClass: #MIXED
}

define view entity R_WorkAssgmtPrivateAddressTP

//HCM001

  as select from I_BusinessPartnerAddress_2 as _PrivateAddress
    inner join   R_WorkAssignmentBP         as _BuPaIdentification on _BuPaIdentification.WorkAssignmentBusinessPartner = _PrivateAddress.BusinessPartner

  //Below association/Join is to get the UUID

  association [1..1] to I_BusinessPartner         as _WorkAssignmentBP  on _WorkAssignmentBP.BusinessPartner = _BuPaIdentification.WorkAssignmentBusinessPartner

  //Below association required for deriving PersonUUID - because BEHDEF authorization/lock is depends on PersonUUID

  association [1..1] to I_BusinessPartner         as _WorkforcePersonBP on _WorkforcePersonBP.BusinessPartner = _BuPaIdentification.BusinessPartner

  //Below associations for handling DCL

  association [1..1] to R_WorkforcePersonTP       as _WorkforcePerson   on $projection.PersonUUID = _WorkforcePerson.PersonUUID
//  association        to parent R_WorkAssignmentTP as _WorkAssignment    on $projection.WorkAssignmentUUID = _WorkAssignment.WorkAssignmentUUID

{
  key    _WorkAssignmentBP.BusinessPartnerUUID                                            as WorkAssignmentUUID,
  key    _PrivateAddress.AddressNumber                                                    as AddressNumber,
         tstmp_to_dats(_PrivateAddress.ValidityStartDate,'UTC',  $session.client, 'NULL') as ValidityStartDate,
         tstmp_to_dats(_PrivateAddress.ValidityEndDate,'UTC',  $session.client, 'NULL')   as ValidityEndDate,
         _PrivateAddress.HouseNumber,
         _PrivateAddress.StreetName,
         _PrivateAddress.HouseNumberSupplementText,
         _PrivateAddress.DistrictName,
//         "                                                    as DistrictName,

         _PrivateAddress.PostalCode,
         _PrivateAddress.CityName,
         _PrivateAddress.Country,
         _PrivateAddress.Region,
         _PrivateAddress.POBox,
         _PrivateAddress.POBoxPostalCode,
         _PrivateAddress.Floor,
         _PrivateAddress.RoomNumber,
         _WorkforcePersonBP.BusinessPartnerUUID                                           as PersonUUID,

         /* Associations */
//         _WorkAssignment,

         _WorkforcePerson
}
//where usage_code = 'HCM001'

/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_BUSINESSPARTNER",
"I_BUSINESSPARTNERADDRESS_2",
"R_WORKASSIGNMENTBP"
],
"ASSOCIATED":
[
"R_WORKFORCEPERSONTP"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/