R_WORKASSGMTALTCOSTASSGMTUNION

CDS View

Alt Cost Assgmnts at Wrk Assignmnt

R_WORKASSGMTALTCOSTASSGMTUNION is a CDS View in S/4HANA. Alt Cost Assgmnts at Wrk Assignmnt. It contains 14 fields. 1 CDS views read from this table.

CDS Views using this table (1)

ViewTypeJoinVDMDescription
R_WorkAssgmtAltCostAssgmtTP view_entity from TRANSACTIONAL TP View for Alternative Cost Assignment

Fields (14)

KeyField CDS FieldsUsed in Views
KEY SequenceNumber SequenceNumber 1
KEY WorkAssignmentStartDate WorkAssignmentStartDate 1
KEY WorkAssignmentUUID WorkAssignmentUUID 1
AlternateCostPercent AlternateCostPercent 1
ControllingArea ControllingArea 1
CostCenter CostCenter 1
FinancialManagementArea FinancialManagementArea 1
FunctionalArea FunctionalArea 1
Fund Fund 1
GrantID GrantID 1
IsDefaultValue OrganizationalAssignment 1
WBSElementExternalID WBSElementExternalID 1
WorkAssignment WorkAssignment 1
WorkAssignmentEndDate WorkAssignmentEndDate 1
@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