C_CZ_StRpTxItmWithEUTxClCrrtnC

DDL: C_CZ_STRPTXITMWITHEUTXCLCRRTNC SQL: CSRCZEUTXCLFNCC Type: view CONSUMPTION

EU Sales Tax Item View - Correction Run

C_CZ_StRpTxItmWithEUTxClCrrtnC is a Consumption CDS View (Cube) that provides data about "EU Sales Tax Item View - Correction Run" in SAP S/4HANA. It reads from 3 data sources (I_JournalEntry, I_StRpTaxItmWithEUTaxClass, P_CZ_StRpRptdTxItmWithEUTxClfn) and exposes 32 fields with key fields CompanyCode, AccountingDocument, FiscalYear, TaxCode, TransactionTypeDetermination.

Data Sources (3)

SourceAliasJoin Type
I_JournalEntry I_JournalEntry left_outer
I_StRpTaxItmWithEUTaxClass I_StRpTaxItmWithEUTaxClass from
P_CZ_StRpRptdTxItmWithEUTxClfn P_CZ_StRpRptdTxItmWithEUTxClfn left_outer

Parameters (4)

NameTypeDefault
P_StatryRptgEntity srf_reporting_entity
P_StatryRptCategory srf_rep_cat_id
P_StatryRptRunID srf_report_run_id
P_DocumentType farp_blart

Annotations (13)

NameValueLevelField
AbapCatalog.sqlViewName CSRCZEUTXCLFNCC view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #CHECK view
AccessControl.personalData.blocking #BLOCKED_DATA_INCLUDED view
Analytics.dataCategory #CUBE view
ClientHandling.algorithm #SESSION_VARIABLE view
EndUserText.label EU Sales Tax Item View - Correction Run view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #XL view
VDM.viewType #CONSUMPTION view
Metadata.allowExtensions true view

Fields (32)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode I_StRpTaxItmWithEUTaxClass CompanyCode
KEY AccountingDocument I_StRpTaxItmWithEUTaxClass AccountingDocument
KEY FiscalYear I_StRpTaxItmWithEUTaxClass FiscalYear
KEY TaxCode TaxCode
KEY TransactionTypeDetermination TransactionTypeDetermination
KEY TaxItem TaxItem
KEY StatryRptCategory I_StRpTaxItmWithEUTaxClass StatryRptCategory
KEY StatryRptRunID I_StRpTaxItmWithEUTaxClass StatryRptRunID
KEY StatryRptgEntity I_StRpTaxItmWithEUTaxClass StatryRptgEntity
Debtor Debtor
VATRegistration I_StRpTaxItmWithEUTaxClass VATRegistration
TaxItemGroup TaxItemGroup
TaxJurisdiction TaxJurisdiction
Country I_StRpTaxItmWithEUTaxClass Country
ReportingCurrency ReportingCurrency
AmountInReportingCurrency
ReportingCountry ReportingCountry
IsReversal I_StRpTaxItmWithEUTaxClass IsReversal
IsReversed I_StRpTaxItmWithEUTaxClass IsReversed
TaxableEntity TaxableEntity
ReportingDate ReportingDate
PostingDate I_StRpTaxItmWithEUTaxClass PostingDate
DocumentDate I_StRpTaxItmWithEUTaxClass DocumentDate
TaxReportingDate I_StRpTaxItmWithEUTaxClass TaxReportingDate
IsEUTriangularDeal I_StRpTaxItmWithEUTaxClass IsEUTriangularDeal
DelivOfGoodsDestCountry DelivOfGoodsDestCountry
DelivOfGoodsOriginCountry DelivOfGoodsOriginCountry
EUTaxClassification EUTaxClassification
TaxType I_StRpTaxItmWithEUTaxClass TaxType
ReverseDocument I_JournalEntry ReverseDocument
BusinessPartner BusinessPartner
BusinessPartnerName BusinessPartnerName
@AbapCatalog.sqlViewName: 'CSRCZEUTXCLFNCC'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey:true
@AccessControl.authorizationCheck: #CHECK
@AccessControl.personalData.blocking: #BLOCKED_DATA_INCLUDED
@Analytics.dataCategory: #CUBE
@ClientHandling.algorithm: #SESSION_VARIABLE
@EndUserText.label: 'EU Sales Tax Item View - Correction Run'
@ObjectModel.usageType.dataClass: #MIXED
@ObjectModel.usageType.serviceQuality: #D
@ObjectModel.usageType.sizeCategory: #XL
@VDM.viewType: #CONSUMPTION
@Metadata.allowExtensions:true


define view C_CZ_StRpTxItmWithEUTxClCrrtnC
  with parameters

    P_StatryRptgEntity  : srf_reporting_entity,
    P_StatryRptCategory : srf_rep_cat_id,
    P_StatryRptRunID    : srf_report_run_id,
    P_DocumentType  : farp_blart

  as select from I_StRpTaxItmWithEUTaxClass

        left outer join I_JournalEntry on
          I_StRpTaxItmWithEUTaxClass.CompanyCode = I_JournalEntry.CompanyCode and
          I_StRpTaxItmWithEUTaxClass.FiscalYear = I_JournalEntry.FiscalYear and
          I_StRpTaxItmWithEUTaxClass.AccountingDocument = I_JournalEntry.AccountingDocument

        left outer join P_CZ_StRpRptdTxItmWithEUTxClfn
              ( P_StatryRptgEntity  :$parameters.P_StatryRptgEntity ,
                P_StatryRptCategory :$parameters.P_StatryRptCategory,
                P_StatryRptRunID    :$parameters.P_StatryRptRunID ) as ReportedTaxItems
              on I_StRpTaxItmWithEUTaxClass.CompanyCode = ReportedTaxItems.CompanyCode
              and I_StRpTaxItmWithEUTaxClass.AccountingDocument = ReportedTaxItems.AccountingDocument
              and I_StRpTaxItmWithEUTaxClass.FiscalYear = ReportedTaxItems.FiscalYear

{
  key I_StRpTaxItmWithEUTaxClass.CompanyCode,
  key I_StRpTaxItmWithEUTaxClass.AccountingDocument,
  key I_StRpTaxItmWithEUTaxClass.FiscalYear,
  key TaxCode,
  key TransactionTypeDetermination,
  key TaxItem,
  key I_StRpTaxItmWithEUTaxClass.StatryRptCategory,
  key I_StRpTaxItmWithEUTaxClass.StatryRptRunID,
  key I_StRpTaxItmWithEUTaxClass.StatryRptgEntity,
      Debtor,
      case IsOneTimeAccount
        when 'X' then _OneTimeAccount.BusinessPartnerName1
        else CustomerName
      end as CustomerName,
      I_StRpTaxItmWithEUTaxClass.VATRegistration,
      TaxItemGroup,
      TaxJurisdiction,
      I_StRpTaxItmWithEUTaxClass.Country,
      @Semantics.currencyCode:true
      ReportingCurrency,
      @DefaultAggregation:#SUM
      @Semantics.amount.currencyCode: 'ReportingCurrency'
      cast((AmountInReportingCurrency * -1) as glo_amount_rptg_crcy) as AmountInReportingCurrency,
      ReportingCountry,
      I_StRpTaxItmWithEUTaxClass.IsReversal,
      I_StRpTaxItmWithEUTaxClass.IsReversed,
      TaxableEntity,
      ReportingDate,
      I_StRpTaxItmWithEUTaxClass.PostingDate,
      I_StRpTaxItmWithEUTaxClass.DocumentDate,
      I_StRpTaxItmWithEUTaxClass.TaxReportingDate,
      I_StRpTaxItmWithEUTaxClass.IsEUTriangularDeal,
      DelivOfGoodsDestCountry,
      DelivOfGoodsOriginCountry,
      EUTaxClassification,
      I_StRpTaxItmWithEUTaxClass.TaxType,
      I_JournalEntry.ReverseDocument,

      cast((case
        when EUTaxClassification = '3' or EUTaxClassification = '4' then '3' //Services

        when EUTaxClassification = '1' and AccountingDocumentType = :P_DocumentType then '1' //Relocation of asset

        when EUTaxClassification = '1' and IsEUTriangularDeal = 'X' then '2' //Triangular deal

        when EUTaxClassification = '1' then '0' //Goods

      end) as ficz_ecsl_operation_key) as OfficialTaxOperationKey,

      cast((case
        when ReportedTaxItems.AccountingDocument is not null then '1'
        else '0'
      end) as ficz_ecsl_document_status) as InternalDocumentStatus,
      BusinessPartner,
      BusinessPartnerName

}
where
      ReportingCountry = 'CZ'
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_JOURNALENTRY",
"I_ONETIMEACCOUNTBP",
"I_STRPTAXITMWITHEUTAXCLASS",
"P_CZ_STRPRPTDTXITMWITHEUTXCLFN"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/