I_CostRevenueReassignment

DDL: I_COSTREVENUEREASSIGNMENT SQL: ICOSREVREASSGMT Type: view COMPOSITE Package: ODATA_REASSIGN_COSTS_REVENUES

Cost Revenue Reassignment - basic view

I_CostRevenueReassignment is a Composite CDS View that provides data about "Cost Revenue Reassignment - basic view" in SAP S/4HANA. It has 2 associations to related views. Part of development package ODATA_REASSIGN_COSTS_REVENUES.

Associations (2)

CardinalityTargetAliasCondition
[0..1] I_CompanyCode _CompanyCodeText $projection.CompanyCode = _CompanyCodeText.CompanyCode
[0..1] I_CompanyCode _SenderCompanyCodeText $projection.SenderCompanyCode = _SenderCompanyCodeText.CompanyCode

Annotations (12)

NameValueLevelField
AbapCatalog.sqlViewName ICOSREVREASSGMT view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #NOT_REQUIRED view
EndUserText.label Cost Revenue Reassignment - basic view view
ClientHandling.algorithm #SESSION_VARIABLE view
AccessControl.personalData.blocking #NOT_REQUIRED view
Metadata.ignorePropagatedAnnotations true view
VDM.viewType #COMPOSITE view
ObjectModel.usageType.sizeCategory #XXL view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.serviceQuality #D view

Fields (73)

KeyFieldSource TableSource FieldDescription
KEY FiscalYear FiscalYear
KEY ReferenceDocument ReferenceDocument
KEY ControllingArea ControllingArea
CompanyCode
SenderCompanyCode
AccountingDocument
AccountingDocumentHeaderText AccountingDocumentHeaderText
DocumentDate DocumentDate
PostingDate PostingDate
FiscalPeriod FiscalPeriod
AccountingDocumentCreationDate AccountingDocumentCreationDate
AccountingDocCreatedByUser AccountingDocCreatedByUser
IsReversal IsReversal
IsReversed IsReversed
ReferenceDocumentType ReferenceDocumentType
ReferenceDocumentContext ReferenceDocumentContext
CostRevenueReassignmentAction
PostingFiscalYear
ExchangeRateDate ExchangeRateDate
PredecessorReferenceDocument PredecessorReferenceDocument
ReversalReferenceDocument ReversalReferenceDocument
GLAccount
CostCtrActivityType
OriginCostCenter
PartnerCostCenter
PartnerCostCtrActivityType
PartnerWBSElement
WBSElement
PartnerServiceDocumentType
PartnerServiceDocument
PartnerServiceDocumentItem
ServiceDocumentType
ServiceDocument
ServiceDocumentItem
PartnerProjectNetwork
PartnerProjectNetworkActivity
ProjectNetwork
RelatedNetworkActivity
PartnerOrder
OrderID
OrderOperation
PartnerOrderOperation
PartnerCostObject
CostObject
PartnerSalesDocument
PartnerSalesDocumentItem
SalesDocument
SalesDocumentItem
PersonnelNumber
PartnerBusinessProcess
BusinessProcess
JointVentureCostRecoveryCode
SenderCostRecoveryCode
Fund
FunctionalArea
GrantID
BudgetPeriod
PartnerFund
PartnerFunctionalArea
PartnerGrant
PartnerBudgetPeriod
RcvrAcctgIndCode
BillableControl
GlobalCurrency GlobalCurrency
TotalAmountInGlobalCurrency
ControllingBusTransacType ControllingBusTransacType
NumberOfDocumentItems
IsSettled
ReversedReferenceDocument ReversedReferenceDocument
AllocationPostingType AllocationPostingType
_ReferenceDocumentType _ReferenceDocumentType
_CompanyCodeText _CompanyCodeText
_SenderCompanyCodeText _SenderCompanyCodeText
@AbapCatalog.sqlViewName: 'ICOSREVREASSGMT'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'Cost Revenue Reassignment - basic view'


@ClientHandling.algorithm: #SESSION_VARIABLE
@AccessControl.personalData.blocking: #NOT_REQUIRED
@Metadata.ignorePropagatedAnnotations: true
@VDM.viewType: #COMPOSITE

@ObjectModel.usageType.sizeCategory: #XXL
@ObjectModel.usageType.dataClass:  #MIXED
@ObjectModel.usageType.serviceQuality: #D
define view I_CostRevenueReassignment 
  as select distinct from P_CostRevenueReassignment as _Header 
  
   association [0..1] to I_CompanyCode as _CompanyCodeText
    on  $projection.CompanyCode = _CompanyCodeText.CompanyCode 
    
   association [0..1] to I_CompanyCode as _SenderCompanyCodeText        
    on  $projection.SenderCompanyCode = _SenderCompanyCodeText.CompanyCode 
{
  key FiscalYear,      
      
  key ReferenceDocument,
  
  key ControllingArea,
  
//  key LedgerGLLineItem,

      
      max( CompanyCode ) as CompanyCode,
      max( SenderCompanyCode ) as SenderCompanyCode,
      max( AccountingDocument ) as AccountingDocument,
                   
      AccountingDocumentHeaderText,
      
      DocumentDate,

      PostingDate,

      FiscalPeriod,
      
      AccountingDocumentCreationDate,
      
      AccountingDocCreatedByUser,
            
      IsReversal,
      IsReversed,      

      ReferenceDocumentType,   
      ReferenceDocumentContext,
      
      cast('' as costrevenuereassignmentaction)    as CostRevenueReassignmentAction,
      cast('' as gjahr) as PostingFiscalYear,       
      
      ExchangeRateDate,
      
      PredecessorReferenceDocument,
      ReversalReferenceDocument,
      
      //Sender and Receiver dummy fields

     
      cast('' as fco_allocation_account) as GLAccount,      
      cast('' as lstar) as CostCtrActivityType,     
      cast('' as sendercostcenter) as OriginCostCenter,
      cast('' as fis_skost) as PartnerCostCenter,
      cast('' as fis_par_lstar) as PartnerCostCtrActivityType,
      cast('' as fis_partner_wbs) as PartnerWBSElement,
      cast('' as fis_wbs) as WBSElement,     
      cast('' as fco_psrvdoc_type) as PartnerServiceDocumentType,
      cast('' as fco_psrvdoc_id) as PartnerServiceDocument,
      cast('' as fco_psrvdoc_item_id) as PartnerServiceDocumentItem,
      cast('' as fco_srvdoc_type) as ServiceDocumentType,      
      cast('' as fco_srvdoc_id) as ServiceDocument,      
      cast('' as fco_srvdoc_item_id) as ServiceDocumentItem,      
      cast('' as par_npln) as PartnerProjectNetwork,
      cast('' as par_vornr_auf) as PartnerProjectNetworkActivity,
      cast('' as nplnr) as ProjectNetwork,      
      cast('' as npvrg) as RelatedNetworkActivity,      
      cast('' as fis_par_aufnr) as PartnerOrder,
      cast('' as fis_aufnr) as OrderID,      
      cast('' as vdm_vornr) as OrderOperation,  
      cast('' as vdm_vornr) as PartnerOrderOperation,   
      cast('' as par_kstrg) as PartnerCostObject,
      cast('' as kstrg) as CostObject, 
      cast('' as fis_par_kdauf) as PartnerSalesDocument,
      cast('' as fis_par_kdpos) as PartnerSalesDocumentItem,
      cast('' as vbeln_va) as SalesDocument,      
      cast('' as posnr_va) as SalesDocumentItem,  
      cast('' as pernr_d) as PersonnelNumber,
      cast('' as par_prznr) as PartnerBusinessProcess,
      cast('' as sprznr) as BusinessProcess,
      cast('' as jv_recind_cds) as JointVentureCostRecoveryCode,
      cast('' as jv_srecind_cds) as SenderCostRecoveryCode,   
      cast('' as fm_sfonds) as Fund,
      cast('' as fm_sfarea) as FunctionalArea,
      cast('' as gm_grant_sender) as GrantID,
      cast('' as fm_budget_period) as BudgetPeriod,
      cast('' as fm_efonds) as PartnerFund,
      cast('' as fm_efarea) as PartnerFunctionalArea,
      cast('' as gm_grant_receiver) as PartnerGrant,
      cast('' as fm_pbudget_period) as PartnerBudgetPeriod,
      cast('' as ebemot) as RcvrAcctgIndCode,
      cast('' as bemot) as BillableControl,
            
      @Semantics.currencyCode:true
      GlobalCurrency,
      @Semantics: { amount : {currencyCode: 'GlobalCurrency'} }
      cast(sum(AmountInGlobalCurrency) as fis_hsl) as TotalAmountInGlobalCurrency,
      
      ControllingBusTransacType,
      
      count( distinct IsSettled ) as NumberOfDocumentItems,
      cast( max( IsSettled ) as fins_xsettled) as IsSettled,
      
      ReversedReferenceDocument,
      AllocationPostingType,
       
      _ReferenceDocumentType,
      _CompanyCodeText,
      _SenderCompanyCodeText

}

group by
FiscalYear,    
ReferenceDocument,
ControllingArea,    
//CompanyCode,      

//CompanyCodeName,                  

//AccountingDocument,             

AccountingDocumentHeaderText,
DocumentDate,
PostingDate,
FiscalPeriod,
AccountingDocumentCreationDate,
AccountingDocCreatedByUser,      
IsReversal,
IsReversed,      
ReferenceDocumentType,
ReferenceDocumentContext,
ExchangeRateDate,
PredecessorReferenceDocument,
ReversalReferenceDocument,
GlobalCurrency,
ControllingBusTransacType,
ReversedReferenceDocument,
AllocationPostingType