@AbapCatalog.sqlViewName : 'PSRPLRPGGRPCR'
@AbapCatalog.compiler.compareFilter: true
@VDM.viewType: #CONSUMPTION
@VDM.private: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label : 'Reporting Groups - Correction Run'
@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel.usageType.sizeCategory: #L
@ObjectModel.usageType.serviceQuality: #D
@ObjectModel.usageType.dataClass: #MIXED
@AccessControl.personalData.blocking: #BLOCKED_DATA_INCLUDED
define view P_PL_StRpReportingGroupsCr
as select distinct from I_StRpTaxItmWithEUTaxClass
left outer join I_StRpRepRun as CurrRun on I_StRpTaxItmWithEUTaxClass.StatryRptgEntity = CurrRun.StatryRptgEntity
and I_StRpTaxItmWithEUTaxClass.StatryRptCategory = CurrRun.StatryRptCategory
and I_StRpTaxItmWithEUTaxClass.StatryRptRunID = CurrRun.StatryRptRunID
left outer join I_StRpRepRun as LastAccRun on I_StRpTaxItmWithEUTaxClass.StatryRptgEntity = LastAccRun.StatryRptgEntity
and I_StRpTaxItmWithEUTaxClass.StatryRptCategory = LastAccRun.StatryRptCategory
and LastAccRun.StatryRptTaskUUID = CurrRun.StatryRptTaskUUID
and LastAccRun.StatryRptRunType = 'STAND'
and LastAccRun.StatryRptRunStatus = 'SOK'
left outer join I_StRpTaskDetails on I_StRpTaskDetails.StatryRptTaskUUID = CurrRun.StatryRptTaskUUID
left outer join I_StRpJournalEntryLog on LastAccRun.StatryRptgEntity = I_StRpJournalEntryLog.StatryRptgEntity
and LastAccRun.StatryRptCategory = I_StRpJournalEntryLog.StatryRptCategory
and LastAccRun.StatryRptRunID = I_StRpJournalEntryLog.StatryRptRunID
and I_StRpJournalEntryLog.CompanyCode = I_StRpTaxItmWithEUTaxClass.CompanyCode
and I_StRpJournalEntryLog.AccountingDocument = I_StRpTaxItmWithEUTaxClass.AccountingDocument
and I_StRpJournalEntryLog.FiscalYear = I_StRpTaxItmWithEUTaxClass.FiscalYear
{
key I_StRpTaxItmWithEUTaxClass.StatryRptCategory,
key I_StRpTaxItmWithEUTaxClass.StatryRptRunID,
key I_StRpTaxItmWithEUTaxClass.StatryRptgEntity,
key I_StRpTaxItmWithEUTaxClass.CompanyCode,
key VATRegistration,
key cast ((case
when EUTaxClassification = '1' or EUTaxClassification = '3' or EUTaxClassification = '9' then 'G'
when EUTaxClassification = '4' then 'S'
end ) as fipl_ecsl_operation_key) as OfficialTaxOperationKey,
key TaxType,
key IsEUTriangularDeal
}
where
(EUTaxClassification = '1' or EUTaxClassification = '3' or EUTaxClassification = '9' or EUTaxClassification = '4') and
ReportingCountry = 'PL' and
I_StRpJournalEntryLog.AccountingDocument is null and
ReportingDate >= I_StRpTaskDetails.StatryRptTaskPeriodStartDate and
ReportingDate <= I_StRpTaskDetails.StatryRptTaskPeriodEndDate
/*+[internal] {
"BASEINFO":
{
"FROM ":
[
"I_STRPJOURNALENTRYLOG",
"I_STRPREPRUN",
"I_STRPTASKDETAILS",
"I_STRPTAXITMWITHEUTAXCLASS"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/
Depth:
1
2
3
4
5
All
Reload
P_PL_StRpReportingGroupsCr view