@AbapCatalog.viewEnhancementCategory: [#NONE]
@AccessControl.authorizationCheck: #MANDATORY
@EndUserText.label: 'TP View for Alternative Cost Assignment'
@Metadata.ignorePropagatedAnnotations: true
@VDM: {
viewType: #TRANSACTIONAL,
lifecycle.contract.type: #SAP_INTERNAL_API
}
@ObjectModel.usageType:{
serviceQuality: #C,
sizeCategory: #XL,
dataClass: #MASTER
}
define view entity R_WorkAssgmtAltCostAssgmtTP
as select from R_WorkAssgmtAltCostAssgmtUnion as _AlternativeCostAssgmt
association [0..1] to I_CostCenter as _CostCenterText on $projection.CostCenter = _CostCenterText.CostCenter
// and _CostCenterText.ControllingArea = _AlternativeCostAssgmt.ControllingArea
and _CostCenterText.ValidityStartDate <= _AlternativeCostAssgmt.WorkAssignmentStartDate
and _CostCenterText.ValidityEndDate >= _AlternativeCostAssgmt.WorkAssignmentEndDate
association [1..1] to I_FunctionalArea as _FunctionalAreaText on $projection.FunctionalArea = _FunctionalAreaText.FunctionalArea
association [1..1] to I_Grant as _GrantText on $projection.GrantID = _GrantText.GrantID
association [1..1] to I_Fund as _FundText on $projection.Fund = _FundText.Fund
and _AlternativeCostAssgmt.FinancialManagementArea = _FundText.FinancialManagementArea
//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 = _AlternativeCostAssgmt.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 _AlternativeCostAssgmt.WorkAssignmentUUID as WorkAssignmentUUID,
key _AlternativeCostAssgmt.WorkAssignmentStartDate as WorkAssignmentStartDate,
key _AlternativeCostAssgmt.SequenceNumber as SequenceNumber,
_AlternativeCostAssgmt.WorkAssignment as WorkAssignment,
_AlternativeCostAssgmt.WorkAssignmentEndDate as WorkAssignmentEndDate,
_AlternativeCostAssgmt.CostCenter as CostCenter,
_AlternativeCostAssgmt.FunctionalArea,
_AlternativeCostAssgmt.Fund,
_AlternativeCostAssgmt.GrantID,
_AlternativeCostAssgmt.AlternateCostPercent,
_AlternativeCostAssgmt.IsDefaultValue as OrganizationalAssignment,
_AlternativeCostAssgmt.ControllingArea,
_AlternativeCostAssgmt.FinancialManagementArea,
_WorkforcePersonBP.BusinessPartnerUUID as PersonUUID,
cast('%' as qprozent) as CostAssignmentPercentageUnit,
_CostCenterText,
_FunctionalAreaText,
_GrantText,
_FundText,
_WorkAssignment,
_WorkforcePerson
}
// as select from R_WorkAssgmtAltCostAssgmt as _AlternativeCostAssgmt
// inner join R_WorkAssignmentBP as _BuPaIdentification on _BuPaIdentification.WorkforceAssignment = _AlternativeCostAssgmt.WorkforceAssignment
// //Below association is to get the UUID
// association [1..1] to I_BusinessPartner as _WorkAssignmentBP on _WorkAssignmentBP.BusinessPartner = _BuPaIdentification.WorkAssignmentBusinessPartner
//// association [1..1] to I_WorkAssignmentDetail_1 as _AssignmentDetails on _AlternativeCostAssgmt.IsDefaultValue = 'X'
//// and _AssignmentDetails.WorkforceAssignment = $projection.WorkAssignment
//// and _AssignmentDetails.WorkforceAssgmtStartDate = _AlternativeCostAssgmt.WorkforceAssgmtStartDate
//// and _AssignmentDetails.WorkforceAssgmtEndDate = _AlternativeCostAssgmt.WorkforceAssgmtEndDate
//
// association [0..1] to I_CostCenter as _CostCenterText on $projection.CostCenter = _CostCenterText.CostCenter
// and _CostCenterText.ControllingArea = _AlternativeCostAssgmt.ControllingArea
// and _CostCenterText.ValidityStartDate <= _AlternativeCostAssgmt.WorkforceAssgmtStartDate
// and _CostCenterText.ValidityEndDate >= _AlternativeCostAssgmt.WorkforceAssgmtEndDate
//
// association [1..1] to I_FunctionalArea as _FunctionalAreaText on $projection.FunctionalArea = _FunctionalAreaText.FunctionalArea
// association [1..1] to I_Grant as _GrantText on $projection.GrantID = _GrantText.GrantID
// association [1..1] to I_Fund as _FundText on $projection.Fund = _FundText.Fund
// and _AlternativeCostAssgmt.FinancialManagementArea = _FundText.FinancialManagementArea
//
// //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 _AlternativeCostAssgmt.WorkforceAssgmtStartDate as WorkAssignmentStartDate,
// key _AlternativeCostAssgmt.SequenceNumber as SequenceNumber,
// _AlternativeCostAssgmt.WorkforceAssignment as WorkAssignment,
// _AlternativeCostAssgmt.WorkforceAssgmtEndDate as WorkAssignmentEndDate,
// _AlternativeCostAssgmt.CostCenter as CostCenter,
// _AlternativeCostAssgmt.IsDefaultValue,
// _AlternativeCostAssgmt.FunctionalArea,
// _AlternativeCostAssgmt.Fund,
// _AlternativeCostAssgmt.GrantID,
// _AlternativeCostAssgmt.AlternateCostPercent,
// _AlternativeCostAssgmt.IsDefaultValue as OrganizationalAssignment,
// _AlternativeCostAssgmt.ControllingArea,
// _AlternativeCostAssgmt.FinancialManagementArea,
// _WorkforcePersonBP.BusinessPartnerUUID as PersonUUID,
// _CostCenterText,
// _FunctionalAreaText,
// _GrantText,
// _FundText,
// _WorkAssignment,
// _WorkforcePerson
//}
//
//
//
//
//
//
//
//
//as select from R_WorkAssgmtAltCostAssgmt as _AlternativeCostAssgmt
// inner join R_WorkAssignmentBP as _BuPaIdentification on _BuPaIdentification.WorkforceAssignment = _AlternativeCostAssgmt.WorkforceAssignment
// //Below association is to get the UUID
// association [1..1] to I_BusinessPartner as _WorkAssignmentBP on _WorkAssignmentBP.BusinessPartner = _BuPaIdentification.WorkAssignmentBusinessPartner
// association [1..1] to I_WorkAssignmentDetail_1 as _AssignmentDetails on _AlternativeCostAssgmt.IsDefaultValue = 'X'
// and _AssignmentDetails.WorkforceAssignment = $projection.WorkAssignment
// and _AssignmentDetails.WorkforceAssgmtStartDate = _AlternativeCostAssgmt.WorkforceAssgmtStartDate
// and _AssignmentDetails.WorkforceAssgmtEndDate = _AlternativeCostAssgmt.WorkforceAssgmtEndDate
//
// association [0..1] to I_CostCenter as _CostCenterText on $projection.CostCenter = _CostCenterText.CostCenter
// and _CostCenterText.ControllingArea = _AlternativeCostAssgmt.ControllingArea
// and _CostCenterText.ValidityStartDate <= _AlternativeCostAssgmt.WorkforceAssgmtStartDate
// and _CostCenterText.ValidityEndDate >= _AlternativeCostAssgmt.WorkforceAssgmtEndDate
//
// association [1..1] to I_FunctionalArea as _FunctionalAreaText on $projection.FunctionalArea = _FunctionalAreaText.FunctionalArea
// association [1..1] to I_Grant as _GrantText on $projection.GrantID = _GrantText.GrantID
// association [1..1] to I_Fund as _FundText on $projection.Fund = _FundText.Fund
// and _AlternativeCostAssgmt.FinancialManagementArea = _FundText.FinancialManagementArea
//
// //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 _AlternativeCostAssgmt.WorkforceAssgmtStartDate as WorkAssignmentStartDate,
// key _AlternativeCostAssgmt.SequenceNumber as SequenceNumber,
// _AlternativeCostAssgmt.WorkforceAssignment as WorkAssignment,
// _AlternativeCostAssgmt.WorkforceAssgmtEndDate as WorkAssignmentEndDate,
// _AlternativeCostAssgmt.CostCenter as CostCenter,
// _AlternativeCostAssgmt.IsDefaultValue,
// _AlternativeCostAssgmt.FunctionalArea,
// _AlternativeCostAssgmt.Fund,
// _AlternativeCostAssgmt.GrantID,
// _AlternativeCostAssgmt.AlternateCostPercent,
// _AlternativeCostAssgmt.IsDefaultValue as OrganizationalAssignment,
// _AlternativeCostAssgmt.ControllingArea,
// _AlternativeCostAssgmt.FinancialManagementArea,
// _WorkforcePersonBP.BusinessPartnerUUID as PersonUUID,
// _CostCenterText,
// _FunctionalAreaText,
// _GrantText,
// _FundText,
// _WorkAssignment,
// _WorkforcePerson
//}
// as select from R_WorkAssgmtAltCostAssgmt as _AlternativeCostAssgmt
// inner join R_WorkAssignmentBP as _BuPaIdentification on _BuPaIdentification.WorkforceAssignment = _AlternativeCostAssgmt.WorkforceAssignment
// //Below association is to get the UUID
// association [1..1] to I_BusinessPartner as _WorkAssignmentBP on _WorkAssignmentBP.BusinessPartner = _BuPaIdentification.WorkAssignmentBusinessPartner
// // association [1..1] to I_WorkAssignmentDetail_1 as _AssignmentDetails on _AlternativeCostAssgmt.IsDefaultValue = 'X'
// // and _AssignmentDetails.WorkforceAssignment = $projection.WorkAssignment
// // and _AssignmentDetails.WorkforceAssgmtStartDate = _AlternativeCostAssgmt.WorkforceAssgmtStartDate
// // and _AssignmentDetails.WorkforceAssgmtEndDate = _AlternativeCostAssgmt.WorkforceAssgmtEndDate
//
// association [0..1] to I_CostCenter as _CostCenterText on $projection.CostCenter = _CostCenterText.CostCenter
// // and _CostCenterText.ControllingArea = _AlternativeCostAssgmt.ControllingArea
// // and _CostCenterText.ValidityStartDate <= _AlternativeCostAssgmt.WorkforceAssgmtStartDate
// // and _CostCenterText.ValidityEndDate >= _AlternativeCostAssgmt.WorkforceAssgmtEndDate
//
// association [1..1] to I_FunctionalArea as _FunctionalAreaText on $projection.FunctionalArea = _FunctionalAreaText.FunctionalArea
// association [1..1] to I_Grant as _GrantText on $projection.GrantID = _GrantText.GrantID
// association [1..1] to I_Fund as _FundText on $projection.Fund = _FundText.Fund
// // and _AlternativeCostAssgmt.FinancialManagementArea = _FundText.FinancialManagementArea
//
// //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 _AlternativeCostAssgmt.WorkforceAssgmtStartDate as WorkAssignmentStartDate,
// key _AlternativeCostAssgmt.SequenceNumber as SequenceNumber,
// _AlternativeCostAssgmt.WorkforceAssignment as WorkAssignment,
// _AlternativeCostAssgmt.WorkforceAssgmtEndDate as WorkAssignmentEndDate,
// _AlternativeCostAssgmt.CostCenter as CostCenter,
// _AlternativeCostAssgmt.IsDefaultValue,
// _AlternativeCostAssgmt.FunctionalArea,
// _AlternativeCostAssgmt.Fund,
// _AlternativeCostAssgmt.GrantID,
// _AlternativeCostAssgmt.AlternateCostPercent,
// _AlternativeCostAssgmt.IsDefaultValue as OrganizationalAssignment,
// _AlternativeCostAssgmt.ControllingArea,
// _AlternativeCostAssgmt.FinancialManagementArea,
// _WorkforcePersonBP.BusinessPartnerUUID as PersonUUID,
// _CostCenterText,
// _FunctionalAreaText,
// _GrantText,
// _FundText,
// _WorkAssignment,
// _WorkforcePerson
//}
//
//union select from I_WorkAssignmentDetail_1 as _AssignmentDetails
// inner join R_WorkAssignmentBP as _BuPaIdentification on _BuPaIdentification.WorkforceAssignment = _AssignmentDetails.WorkforceAssignment
////Below association is to get the UUID
//association [1..1] to I_BusinessPartner as _WorkAssignmentBP on _WorkAssignmentBP.BusinessPartner = _BuPaIdentification.WorkAssignmentBusinessPartner
//
//association [0..1] to I_CostCenter as _CostCenterText on $projection.CostCenter = _CostCenterText.CostCenter
//// and _CostCenterText.ControllingArea = _AlternativeCostAssgmt.ControllingArea
//// and _CostCenterText.ValidityStartDate <= _AlternativeCostAssgmt.WorkforceAssgmtStartDate
//// and _CostCenterText.ValidityEndDate >= _AlternativeCostAssgmt.WorkforceAssgmtEndDate
//
//association [1..1] to I_FunctionalArea as _FunctionalAreaText on $projection.FunctionalArea = _FunctionalAreaText.FunctionalArea
//association [1..1] to I_Grant as _GrantText on $projection.GrantID = _GrantText.GrantID
//association [1..1] to I_Fund as _FundText on $projection.Fund = _FundText.Fund
//// and _AlternativeCostAssgmt.FinancialManagementArea = _FundText.FinancialManagementArea
//
////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 _AssignmentDetails.WorkforceAssgmtStartDate as WorkAssignmentStartDate,
// key cast ( '000' as wfd_seq_no ) as SequenceNumber,
//
// _AssignmentDetails.WorkforceAssignment as WorkAssignment,
// _AssignmentDetails.WorkforceAssgmtEndDate as WorkAssignmentEndDate,
// _AssignmentDetails.CostCenter as CostCenter,
// cast ( 'X' as atstd ) as IsDefaultValue,
// cast ( 'X' as atstd ) as FunctionalArea,
// cast ( 'X' as atstd ) as Fund,
// cast ( 'X' as atstd ) as GrantID,
// cast ( 'X' as atstd ) as AlternateCostPercent,
// cast ( 'X' as atstd ) as OrganizationalAssignment,
// cast ( 'X' as atstd ) as ControllingArea,
// cast ( 'X' as atstd ) as FinancialManagementArea,
// _WorkforcePersonBP.BusinessPartnerUUID as PersonUUID,
// _CostCenterText,
// _FunctionalAreaText,
// _GrantText,
// _FundText,
// _WorkAssignment,
// _WorkforcePerson
//
//}
//
// as select from R_WorkAssgmtAltCostAssgmt as _AlternativeCostAssgmt
// inner join R_WorkAssignmentBP as _BuPaIdentification on _BuPaIdentification.WorkforceAssignment = _AlternativeCostAssgmt.WorkforceAssignment
// //Below association is to get the UUID
// association [1..1] to I_BusinessPartner as _WorkAssignmentBP on _WorkAssignmentBP.BusinessPartner = _BuPaIdentification.WorkAssignmentBusinessPartner
// association [1..1] to I_WorkAssignmentDetail_1 as _AssignmentDetails on _AlternativeCostAssgmt.IsDefaultValue = 'X'
// and _AssignmentDetails.WorkforceAssignment = $projection.WorkAssignment
// and _AssignmentDetails.WorkforceAssgmtStartDate = _AlternativeCostAssgmt.WorkforceAssgmtStartDate
// and _AssignmentDetails.WorkforceAssgmtEndDate = _AlternativeCostAssgmt.WorkforceAssgmtEndDate
//
// association [0..1] to I_CostCenter as _CostCenterText on $projection.CostCenter = _CostCenterText.CostCenter
// and _CostCenterText.ControllingArea = _AlternativeCostAssgmt.ControllingArea
// and _CostCenterText.ValidityStartDate <= _AlternativeCostAssgmt.WorkforceAssgmtStartDate
// and _CostCenterText.ValidityEndDate >= _AlternativeCostAssgmt.WorkforceAssgmtEndDate
//
// association [1..1] to I_FunctionalArea as _FunctionalAreaText on $projection.FunctionalArea = _FunctionalAreaText.FunctionalArea
// association [1..1] to I_Grant as _GrantText on $projection.GrantID = _GrantText.GrantID
// association [1..1] to I_Fund as _FundText on $projection.Fund = _FundText.Fund
// and _AlternativeCostAssgmt.FinancialManagementArea = _FundText.FinancialManagementArea
//
// //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 _AlternativeCostAssgmt.WorkforceAssgmtStartDate as WorkAssignmentStartDate,
// key _AlternativeCostAssgmt.SequenceNumber as SequenceNumber,
// _AlternativeCostAssgmt.WorkforceAssignment as WorkAssignment,
// _AlternativeCostAssgmt.WorkforceAssgmtEndDate as WorkAssignmentEndDate,
// _AlternativeCostAssgmt.CostCenter as CostCenter,
// _AlternativeCostAssgmt.IsDefaultValue,
// _AlternativeCostAssgmt.FunctionalArea,
// _AlternativeCostAssgmt.Fund,
// _AlternativeCostAssgmt.GrantID,
// _AlternativeCostAssgmt.AlternateCostPercent,
// _AlternativeCostAssgmt.IsDefaultValue as OrganizationalAssignment,
// _AlternativeCostAssgmt.ControllingArea,
// _AlternativeCostAssgmt.FinancialManagementArea,
// _WorkforcePersonBP.BusinessPartnerUUID as PersonUUID,
// _CostCenterText,
// _FunctionalAreaText,
// _GrantText,
// _FundText,
// _WorkAssignment,
// _WorkforcePerson
//}
//
//=========================
// as select from I_WorkAssignmentDetail_1 as _AssignmentDetails
// left outer to one join R_WorkAssgmtAltCostAssgmt as _AlternativeCostAssgmt on _AssignmentDetails.WorkforceAssignment = _AlternativeCostAssgmt.WorkforceAssignment
// and _AssignmentDetails.WorkforceAssgmtStartDate = _AlternativeCostAssgmt.WorkforceAssgmtStartDate
// and _AssignmentDetails.WorkforceAssgmtEndDate = _AlternativeCostAssgmt.WorkforceAssgmtEndDate
//
// inner join R_WorkAssignmentBP as _BuPaIdentification on _BuPaIdentification.WorkforceAssignment = _AlternativeCostAssgmt.WorkforceAssignment
// //Below association is to get the UUID
// association [1..1] to I_BusinessPartner as _WorkAssignmentBP on _WorkAssignmentBP.BusinessPartner = _BuPaIdentification.WorkAssignmentBusinessPartner
// // association [1..1] to I_WorkAssignmentDetail_1 as _AssignmentDetails on _AlternativeCostAssgmt.IsDefaultValue = 'X'
// // and _AssignmentDetails.WorkforceAssignment = $projection.WorkAssignment
// // and _AssignmentDetails.WorkforceAssgmtStartDate = _AlternativeCostAssgmt.WorkforceAssgmtStartDate
// // and _AssignmentDetails.WorkforceAssgmtEndDate = _AlternativeCostAssgmt.WorkforceAssgmtEndDate
//
// association [0..1] to I_CostCenter as _CostCenterText on $projection.CostCenter = _CostCenterText.CostCenter
// and _CostCenterText.ControllingArea = _AlternativeCostAssgmt.ControllingArea
// and _CostCenterText.ValidityStartDate <= _AlternativeCostAssgmt.WorkforceAssgmtStartDate
// and _CostCenterText.ValidityEndDate >= _AlternativeCostAssgmt.WorkforceAssgmtEndDate
//
// association [1..1] to I_FunctionalArea as _FunctionalAreaText on $projection.FunctionalArea = _FunctionalAreaText.FunctionalArea
// association [1..1] to I_Grant as _GrantText on $projection.GrantID = _GrantText.GrantID
// association [1..1] to I_Fund as _FundText on $projection.Fund = _FundText.Fund
// and _AlternativeCostAssgmt.FinancialManagementArea = _FundText.FinancialManagementArea
//
// //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 _AlternativeCostAssgmt.WorkforceAssgmtStartDate as WorkAssignmentStartDate,
// key _AlternativeCostAssgmt.SequenceNumber as SequenceNumber,
// _AlternativeCostAssgmt.WorkforceAssignment as WorkAssignment,
// _AlternativeCostAssgmt.WorkforceAssgmtEndDate as WorkAssignmentEndDate,
// _AlternativeCostAssgmt.CostCenter as CostCenter,
// // case when _AlternativeCostAssgmt.IsDefaultValue is not initial
// // then _AssignmentDetails.CostCenter
// // else _AlternativeCostAssgmt.CostCenter
// // end as CostCenter,
// _AlternativeCostAssgmt.IsDefaultValue,
// _AlternativeCostAssgmt.FunctionalArea,
// _AlternativeCostAssgmt.Fund,
// _AlternativeCostAssgmt.GrantID,
// _AlternativeCostAssgmt.AlternateCostPercent,
// _AlternativeCostAssgmt.IsDefaultValue as OrganizationalAssignment,
// _AlternativeCostAssgmt.ControllingArea,
// _AlternativeCostAssgmt.FinancialManagementArea,
// _WorkforcePersonBP.BusinessPartnerUUID as PersonUUID,
// _CostCenterText,
// _FunctionalAreaText,
// _GrantText,
// _FundText,
// _WorkAssignment,
// _WorkforcePerson
//}
//===================================================
// as select from R_WorkAssgmtAltCostAssgmt as _AlternativeCostAssgmt
// inner join R_WorkAssignmentBP as _BuPaIdentification on _BuPaIdentification.WorkforceAssignment = _AlternativeCostAssgmt.WorkforceAssignment
// //Below association is to get the UUID
// association [1..1] to I_BusinessPartner as _WorkAssignmentBP on _WorkAssignmentBP.BusinessPartner = _BuPaIdentification.WorkAssignmentBusinessPartner
// association [1..1] to I_WorkAssignmentDetail_1 as _AssignmentDetails on _AlternativeCostAssgmt.IsDefaultValue = 'X'
// and _AssignmentDetails.WorkforceAssignment = $projection.WorkAssignment
// and _AssignmentDetails.WorkforceAssgmtStartDate = _AlternativeCostAssgmt.WorkforceAssgmtStartDate
// and _AssignmentDetails.WorkforceAssgmtEndDate = _AlternativeCostAssgmt.WorkforceAssgmtEndDate
//
// association [0..1] to I_CostCenter as _CostCenterText on $projection.CostCenter = _CostCenterText.CostCenter
// and _CostCenterText.ControllingArea = _AlternativeCostAssgmt.ControllingArea
// and _CostCenterText.ValidityStartDate <= _AlternativeCostAssgmt.WorkforceAssgmtStartDate
// and _CostCenterText.ValidityEndDate >= _AlternativeCostAssgmt.WorkforceAssgmtEndDate
//
// association [1..1] to I_FunctionalArea as _FunctionalAreaText on $projection.FunctionalArea = _FunctionalAreaText.FunctionalArea
// association [1..1] to I_Grant as _GrantText on $projection.GrantID = _GrantText.GrantID
// association [1..1] to I_Fund as _FundText on $projection.Fund = _FundText.Fund
// and _AlternativeCostAssgmt.FinancialManagementArea = _FundText.FinancialManagementArea
//
// //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 _AlternativeCostAssgmt.WorkforceAssgmtStartDate as WorkAssignmentStartDate,
// key _AlternativeCostAssgmt.SequenceNumber as SequenceNumber,
// _AlternativeCostAssgmt.WorkforceAssignment as WorkAssignment,
// _AlternativeCostAssgmt.WorkforceAssgmtEndDate as WorkAssignmentEndDate,
// case when _AlternativeCostAssgmt.IsDefaultValue is not initial
// then _AssignmentDetails.CostCenter
// else _AlternativeCostAssgmt.CostCenter
// end as CostCenter,
// _AlternativeCostAssgmt.IsDefaultValue,
// _AlternativeCostAssgmt.FunctionalArea,
// _AlternativeCostAssgmt.Fund,
// _AlternativeCostAssgmt.GrantID,
// _AlternativeCostAssgmt.AlternateCostPercent,
// _AlternativeCostAssgmt.IsDefaultValue as OrganizationalAssignment,
// _AlternativeCostAssgmt.ControllingArea,
// _AlternativeCostAssgmt.FinancialManagementArea,
// _WorkforcePersonBP.BusinessPartnerUUID as PersonUUID,
// _CostCenterText,
// _FunctionalAreaText,
// _GrantText,
// _FundText,
// _WorkAssignment,
// _WorkforcePerson
//}