R_WorkAssgmtAltCostAssgmtUnion

DDL: R_WORKASSGMTALTCOSTASSGMTUNION Type: view_entity COMPOSITE Package: ODATA_CA_BUM_WF

Alt Cost Assgmnts at Wrk Assignmnt

R_WorkAssgmtAltCostAssgmtUnion is a Composite CDS View that provides data about "Alt Cost Assgmnts at Wrk Assignmnt" in SAP S/4HANA. It reads from 2 data sources (R_WorkAssgmtAltCostAssgmt, R_WorkAssignmentBP) and exposes 17 fields with key fields WorkAssignmentUUID, WorkAssignmentStartDate, SequenceNumber. It has 1 association to related views. Part of development package ODATA_CA_BUM_WF.

Data Sources (2)

SourceAliasJoin Type
R_WorkAssgmtAltCostAssgmt _AlternativeCostAssgmt from
R_WorkAssignmentBP _BuPaIdentification inner

Associations (1)

CardinalityTargetAliasCondition
[1..1] I_BusinessPartner _WorkAssignmentBP _WorkAssignmentBP.BusinessPartner = _BuPaIdentification.WorkAssignmentBusinessPartner

Annotations (8)

NameValueLevelField
AccessControl.authorizationCheck #NOT_REQUIRED view
EndUserText.label Alt Cost Assgmnts at Wrk Assignmnt view
Metadata.ignorePropagatedAnnotations true view
VDM.viewType #COMPOSITE 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 (17)

KeyFieldSource TableSource FieldDescription
KEY WorkAssignmentUUID _WorkAssignmentBP BusinessPartnerUUID
KEY WorkAssignmentStartDate R_WorkAssgmtAltCostAssgmt WorkforceAssgmtStartDate
KEY SequenceNumber R_WorkAssgmtAltCostAssgmt SequenceNumber
WorkAssignment R_WorkAssgmtAltCostAssgmt WorkforceAssignment
WorkAssignmentEndDate R_WorkAssgmtAltCostAssgmt WorkforceAssgmtEndDate
CostCenter R_WorkAssgmtAltCostAssgmt CostCenter
IsDefaultValue R_WorkAssgmtAltCostAssgmt IsDefaultValue
FunctionalArea R_WorkAssgmtAltCostAssgmt FunctionalArea
Fund R_WorkAssgmtAltCostAssgmt Fund
GrantID R_WorkAssgmtAltCostAssgmt GrantID
AlternateCostPercent R_WorkAssgmtAltCostAssgmt AlternateCostPercent
ControllingArea R_WorkAssgmtAltCostAssgmt ControllingArea
FinancialManagementArea R_WorkAssgmtAltCostAssgmt FinancialManagementArea
CompanyCode R_WorkAssgmtAltCostAssgmt CompanyCode
WorkAssignmentBusinessPartner R_WorkAssignmentBP WorkAssignmentBusinessPartner
BusinessPartner R_WorkAssignmentBP BusinessPartner
WBSElementExternalID R_WorkAssgmtAltCostAssgmt WBSElementExternalID
@AbapCatalog.viewEnhancementCategory: [#NONE]
@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'Alt Cost Assgmnts at Wrk Assignmnt'
@Metadata.ignorePropagatedAnnotations: true
@VDM: {
  viewType: #COMPOSITE,
  lifecycle.contract.type: #SAP_INTERNAL_API
}
@ObjectModel.usageType:{
  serviceQuality: #X,
  sizeCategory: #S,
  dataClass: #MIXED
}
@Consumption.dbHints: [ 'USE_HEX_PLAN' ]
define view entity R_WorkAssgmtAltCostAssgmtUnion
  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
{
  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.ControllingArea,
        _AlternativeCostAssgmt.FinancialManagementArea,
        _AlternativeCostAssgmt.CompanyCode,
        _BuPaIdentification.WorkAssignmentBusinessPartner,
        _BuPaIdentification.BusinessPartner,
        _AlternativeCostAssgmt.WBSElementExternalID
}
//  as select from           I_WorkAssignmentDetail_1  as _AssignmentDetails

//    left outer to one join R_WorkAssgmtAltCostAssgmt as _AlternativeCostAssgmt on  _AlternativeCostAssgmt.WorkforceAssignment      = _AssignmentDetails.WorkforceAssignment

//                                                                               and _AlternativeCostAssgmt.WorkforceAssgmtStartDate = _AssignmentDetails.WorkforceAssgmtStartDate

//                                                                               and _AlternativeCostAssgmt.IsDefaultValue           = 'X'

//    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

//{

//  key    _WorkAssignmentBP.BusinessPartnerUUID                                                as WorkAssignmentUUID,

//  key    _AssignmentDetails.WorkforceAssgmtStartDate                                          as WorkAssignmentStartDate,

//  key    case when _AlternativeCostAssgmt.IsDefaultValue = 'X'

//              then _AlternativeCostAssgmt.SequenceNumber

//              else

//              cast ( '000'  as wfd_seq_no )                                               end as SequenceNumber,

//         _AssignmentDetails.WorkforceAssignment                                               as WorkAssignment,

//         _AssignmentDetails.WorkforceAssgmtEndDate                                            as WorkAssignmentEndDate,

//         _AssignmentDetails.CostCenter                                                        as CostCenter,

//         cast ( 'X'  as atstd )                                                               as IsDefaultValue, //IsDefaultValue is X in both the case

//         case when _AlternativeCostAssgmt.IsDefaultValue = 'X'

//              then _AlternativeCostAssgmt.FunctionalArea

//              else

//              cast ( ''  as fm_farea )                                               end      as FunctionalArea,

//         case when _AlternativeCostAssgmt.IsDefaultValue = 'X'

//              then _AlternativeCostAssgmt.Fund

//              else cast ( ''  as bp_geber )                                          end      as Fund,

//         case when _AlternativeCostAssgmt.IsDefaultValue = 'X'

//              then    _AlternativeCostAssgmt.GrantID

//              else cast ( ''  as gm_grant_nbr )                                      end      as GrantID,

//         case when _AlternativeCostAssgmt.IsDefaultValue = 'X'

//              then _AlternativeCostAssgmt.AlternateCostPercent

//              else cast ( '0'  as wfd_percent )                                    end        as AlternateCostPercent, //calculated by virtual field

//         _AssignmentDetails.ControllingArea,

//         _AssignmentDetails._CompanyCode.FinancialManagementArea,

//         _AssignmentDetails.CompanyCode,

//         _BuPaIdentification.WorkAssignmentBusinessPartner,

//         _BuPaIdentification.BusinessPartner,

//         _AlternativeCostAssgmt.WBSElementExternalID

//

//}

//where

//      _AssignmentDetails.CostCenter                is not initial

//  and _AssignmentDetails.WorkforceAssignmentStatus = '1'

//

//union 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

//{

//  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.ControllingArea,

//        _AlternativeCostAssgmt.FinancialManagementArea,

//        _AlternativeCostAssgmt.CompanyCode,

//        _BuPaIdentification.WorkAssignmentBusinessPartner,

//        _BuPaIdentification.BusinessPartner,

//        _AlternativeCostAssgmt.WBSElementExternalID

//}

//where

//  _AlternativeCostAssgmt.IsDefaultValue is initial