R_WorkAssgmtPrivateAddressTP
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 (I_BusPartAddress, R_WorkAssignmentBP) and exposes 44 fields with key fields WorkAssignmentUUID, AddressNumber. It has 8 associations to related views. Part of development package ODATA_CA_BUM_WF.
Data Sources (2)
| Source | Alias | Join Type |
|---|---|---|
| I_BusPartAddress | _BPAddress | inner |
| R_WorkAssignmentBP | _BuPaIdentification | inner |
Associations (8)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | I_BPProtectedAddress | _BPProtectedAddress | $projection.BusinessPartner = _BPProtectedAddress.BusinessPartner and $projection.AddressNumber = _BPProtectedAddress.AddressID |
| [0..1] | I_CountryText | _CountryText | $projection.Country = _CountryText.Country and _CountryText.Language = $session.system_language |
| [0..1] | I_RegionText | _RegionText | $projection.Region = _RegionText.Region and $projection.Country = _RegionText.Country and _RegionText.Language = $session.system_language |
| [0..1] | I_TaxJurisdictionText | _TaxJurisdictionText | $projection.TaxJurisdiction = _TaxJurisdictionText.TaxJurisdiction and _TaxJurisdictionText.Language = $session.system_language |
| [0..1] | I_BusPartDelivSrvcTxt | _BusPartDelivSrvcTxt | $projection.DeliveryServiceTypeCode = _BusPartDelivSrvcTxt.DeliveryServiceTypeCode and _BusPartDelivSrvcTxt.Language = $session.system_language |
| [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 (9)
| Name | Value | Level | Field |
|---|---|---|---|
| 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 | #C | view | |
| ObjectModel.usageType.sizeCategory | #S | view | |
| ObjectModel.usageType.dataClass | #MIXED | view | |
| AccessControl.personalData.blocking | #NOT_REQUIRED | view |
Fields (44)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | WorkAssignmentUUID | _WorkAssignmentBP | BusinessPartnerUUID | |
| KEY | AddressNumber | _BPAddressUsage | AddressNumber | |
| BusinessPartner | _BPAddressUsage | BusinessPartner | ||
| HouseNumber | ||||
| HouseNumberSupplementText | ||||
| Region | ||||
| PostalCode | ||||
| DistrictName | ||||
| Street | ||||
| StreetName | ||||
| CityNumber | ||||
| CityName | ||||
| Floor | ||||
| Country | ||||
| RoomNumber | ||||
| TaxJurisdiction | ||||
| CareOfName | ||||
| StreetPrefixName1 | ||||
| StreetPrefixName2 | ||||
| StreetSuffixName1 | ||||
| StreetSuffixName2 | ||||
| SecondaryRegion | ||||
| SecondaryRegionName | ||||
| TertiaryRegion | ||||
| TertiaryRegionName | ||||
| AddressRepresentationCode | ||||
| POBoxPostalCode | ||||
| POBox | ||||
| POBoxLobbyName | ||||
| POBoxDeviatingCountry | ||||
| POBoxDeviatingRegion | ||||
| POBoxDeviatingCityCode | ||||
| POBoxDeviatingCityName | ||||
| POBoxIsWithoutNumber | ||||
| DeliveryServiceTypeCode | ||||
| DeliveryServiceNumber | ||||
| PersonUUID | _WorkforcePersonBP | BusinessPartnerUUID | ||
| _CountryText | _CountryText | |||
| _RegionText | _RegionText | |||
| _TaxJurisdictionText | _TaxJurisdictionText | |||
| _BusPartDelivSrvcTxt | _BusPartDelivSrvcTxt | |||
| _WorkAssignment | _WorkAssignment | |||
| _WorkforcePerson | _WorkforcePerson | |||
| _BPProtectedAddress | _BPProtectedAddress |
@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: #C,
sizeCategory: #S,
dataClass: #MIXED
}
@AccessControl.personalData.blocking: #NOT_REQUIRED
@Consumption.dbHints: [ '&PREFER_JOIN_WITH_FDA 0&', 'USE_HEX_PLAN' ]
define view entity R_WorkAssgmtPrivateAddressTP
as select distinct from I_Businesspartneraddressusage as _BPAddressUsage
inner join R_WorkAssignmentBP as _BuPaIdentification on _BuPaIdentification.WorkAssignmentBusinessPartner = _BPAddressUsage.BusinessPartner
inner join I_BusPartAddress as _BPAddress on _BPAddressUsage.BusinessPartner = _BPAddress.BusinessPartner
and _BPAddressUsage.AddressNumber = _BPAddress.AddressID
// association [1..1] to I_WorkAssignmentDetail_1 as _AssgmtDetails on _AssgmtDetails.WorkforceAssignment = _BuPaIdentification.WorkforceAssignment
// and _AssgmtDetails.WorkforceAssgmtStartDate <= $session.system_date
// and _AssgmtDetails.WorkforceAssgmtEndDate >= $session.system_date
// and _AssgmtDetails.WorkforceAssignmentStatus = '1'
association [0..1] to I_BPProtectedAddress as _BPProtectedAddress on $projection.BusinessPartner = _BPProtectedAddress.BusinessPartner
and $projection.AddressNumber = _BPProtectedAddress.AddressID
association [0..1] to I_CountryText as _CountryText on $projection.Country = _CountryText.Country
and _CountryText.Language = $session.system_language
association [0..1] to I_RegionText as _RegionText on $projection.Region = _RegionText.Region
and $projection.Country = _RegionText.Country
and _RegionText.Language = $session.system_language
association [0..1] to I_TaxJurisdictionText as _TaxJurisdictionText on $projection.TaxJurisdiction = _TaxJurisdictionText.TaxJurisdiction
and _TaxJurisdictionText.Language = $session.system_language
association [0..1] to I_BusPartDelivSrvcTxt as _BusPartDelivSrvcTxt on $projection.DeliveryServiceTypeCode = _BusPartDelivSrvcTxt.DeliveryServiceTypeCode
and _BusPartDelivSrvcTxt.Language = $session.system_language
//Below association/Join is to get the UUID
association [1..1] to I_BusinessPartner as _WorkAssignmentBP on _WorkAssignmentBP.BusinessPartner = _BuPaIdentification.WorkAssignmentBusinessPartner
// association [1..1] to I_BusinessPartner as _BP on _BP.BusinessPartner = _BPAddressUsage.BusinessPartner
//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 _BPAddressUsage.AddressNumber as AddressNumber,
key cast (tstmp_to_dats( _BPAddressUsage.ValidityStartDate,
abap_system_timezone( $session.client,'NULL' ), $session.client, 'NULL' ) as vdm_v_start_date) as ValidityStartDate,
cast (tstmp_to_dats( _BPAddressUsage.ValidityEndDate,
abap_system_timezone( $session.client,'NULL' ), $session.client, 'NULL' ) as vdm_v_end_date) as ValidityEndDate,
_BPAddressUsage.BusinessPartner as BusinessPartner,
_BPAddress._AddressDefaultRepresentation.HouseNumber as HouseNumber,
_BPAddress._AddressDefaultRepresentation.HouseNumberSupplementText as HouseNumberSupplementText, //HouseSupplement,
_BPAddress._AddressDefaultRepresentation.Region as Region, //AddressRegion,
_BPAddress._AddressDefaultRepresentation.PostalCode as PostalCode, //AddressPostalCode,
// _BPAddress._AddressDefaultRepresentation.DistrictNumber as DistrictNumber,
_BPAddress._AddressDefaultRepresentation.DistrictName as DistrictName,
_BPAddress._AddressDefaultRepresentation.Street as Street,
_BPAddress._AddressDefaultRepresentation.StreetName as StreetName,
_BPAddress._AddressDefaultRepresentation.CityNumber as CityNumber,
_BPAddress._AddressDefaultRepresentation.CityName as CityName, //City,
_BPAddress._AddressDefaultRepresentation.Floor as Floor,
_BPAddress._AddressDefaultRepresentation.Country as Country, //CountryOrRegion
_BPAddress._AddressDefaultRepresentation.RoomNumber as RoomNumber,
_BPAddress._AddressDefaultRepresentation.TaxJurisdiction as TaxJurisdiction,
_BPAddress._AddressDefaultRepresentation.CareOfName as CareOfName,
_BPAddress._AddressDefaultRepresentation.StreetPrefixName1 as StreetPrefixName1,
_BPAddress._AddressDefaultRepresentation.StreetPrefixName2 as StreetPrefixName2,
_BPAddress._AddressDefaultRepresentation.StreetSuffixName1 as StreetSuffixName1,
_BPAddress._AddressDefaultRepresentation.StreetSuffixName2 as StreetSuffixName2,
//API Fields to avoid Data loss
_BPAddress._AddressDefaultRepresentation.SecondaryRegion as SecondaryRegion,
_BPAddress._AddressDefaultRepresentation.SecondaryRegionName as SecondaryRegionName,
_BPAddress._AddressDefaultRepresentation.TertiaryRegion as TertiaryRegion,
_BPAddress._AddressDefaultRepresentation.TertiaryRegionName as TertiaryRegionName,
_BPAddress._AddressDefaultRepresentation.AddressRepresentationCode as AddressRepresentationCode,
//PO BOX related fields
_BPAddress._AddressDefaultRepresentation.POBoxPostalCode as POBoxPostalCode, //PostOfficeBoxPostalCode,
_BPAddress._AddressDefaultRepresentation.POBox as POBox,
_BPAddress._AddressDefaultRepresentation.POBoxLobbyName as POBoxLobbyName,
_BPAddress._AddressDefaultRepresentation.POBoxDeviatingCountry as POBoxDeviatingCountry,
_BPAddress._AddressDefaultRepresentation.POBoxDeviatingRegion as POBoxDeviatingRegion,
_BPAddress._AddressDefaultRepresentation.POBoxDeviatingCityCode as POBoxDeviatingCityCode,
_BPAddress._AddressDefaultRepresentation.POBoxDeviatingCityName as POBoxDeviatingCityName,
_BPAddress._AddressDefaultRepresentation.POBoxIsWithoutNumber as POBoxIsWithoutNumber,
_BPAddress._AddressDefaultRepresentation.DeliveryServiceTypeCode as DeliveryServiceTypeCode,
_BPAddress._AddressDefaultRepresentation.DeliveryServiceNumber as DeliveryServiceNumber,
_WorkforcePersonBP.BusinessPartnerUUID as PersonUUID,
/* Associations */
_CountryText,
_RegionText,
_TaxJurisdictionText,
_BusPartDelivSrvcTxt,
_WorkAssignment,
_WorkforcePerson,
_BPProtectedAddress
}
where
_BPAddressUsage.AddressUsage = 'HCM001'
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