@AbapCatalog.sqlViewName : 'CCOSREVREASSC'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #CHECK
@VDM.viewType: #CONSUMPTION
@ClientHandling.algorithm: #SESSION_VARIABLE
@AccessControl.personalData.blocking: #NOT_REQUIRED
@Metadata.ignorePropagatedAnnotations: true
@ObjectModel.usageType.sizeCategory: #XXL
@ObjectModel.usageType.dataClass: #MIXED
@ObjectModel.usageType.serviceQuality: #C
@EndUserText.label : 'Cost, Revenue Reassignment Sender Count'
define view C_CostRevnReassgmtSenderCount
as select from I_GLAccountLineItemRawData as _Item
inner join I_AccountAssignmentType as _AccountAssignmentType
on _AccountAssignmentType.AccountAssignmentType = _Item.AccountAssignmentType
{
key _Item.FiscalYear,
key _Item.ControllingArea,
key _Item.ReferenceDocument,
_Item.ControllingBusTransacType,
_Item.BusinessTransactionCategory,
count ( distinct _Item.CompanyCode ) as NumberOfSenderCompanyCodes
}where
(
( _Item.ControllingBusTransacType = 'KAMV' and _Item.BusinessTransactionCategory = 'KAMV' )
or ( _Item.ControllingBusTransacType = 'RKU1' and _Item.BusinessTransactionCategory = 'RKU1' )
)
and
_Item.ReferenceDocumentType = 'COBK'
and
_Item.OriginCtrlgDebitCreditCode = 'H'
and
_Item._Ledger.IsLeadingLedger = 'X'
and _Item.LogicalSystem = ''
and _Item._JournalEntry.SenderLogicalSystem = ''
and (_Item.SourceLedger = _Item._JournalEntry.LedgerGroup or _Item._JournalEntry.LedgerGroup = '' )
group by
_Item.FiscalYear,
_Item.ControllingArea,
_Item.ReferenceDocument,
_Item.ControllingBusTransacType,
_Item.BusinessTransactionCategory
union all select from I_GLAccountLineItemRawData as _Item
inner join I_AccountAssignmentType as _AccountAssignmentType
on _AccountAssignmentType.AccountAssignmentType = _Item.AccountAssignmentType
{
key _Item.FiscalYear,
key _Item.ControllingArea,
key _Item.ReferenceDocument,
_Item.ControllingBusTransacType,
_Item.BusinessTransactionCategory,
count ( distinct _Item.CompanyCode ) as NumberOfSenderCompanyCodes
}where
(
_Item.ControllingBusTransacType = 'RKU2'
and _Item.BusinessTransactionCategory = 'RKU2'
)
and
_Item.ReferenceDocumentType = 'COBK'
and
_Item.OriginCtrlgDebitCreditCode = 'S'
and
_Item._Ledger.IsLeadingLedger = 'X'
and _Item.LogicalSystem = ''
and _Item._JournalEntry.SenderLogicalSystem = ''
and (_Item.SourceLedger = _Item._JournalEntry.LedgerGroup or _Item._JournalEntry.LedgerGroup = '' )
group by
_Item.FiscalYear,
_Item.ControllingArea,
_Item.ReferenceDocument,
_Item.ControllingBusTransacType,
_Item.BusinessTransactionCategory
/*+[internal] {
"BASEINFO":
{
"FROM ":
[
"I_ACCOUNTASSIGNMENTTYPE",
"I_GLACCOUNTLINEITEMRAWDATA",
"I_JOURNALENTRY",
"I_LEDGER"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/
Depth:
1
2
3
4
5
All
Reload
C_CostRevnReassgmtSenderCount view