P_CZ_StRpEUTaxClassification

DDL: P_CZ_STRPEUTAXCLASSIFICATION SQL: PCZSRECSLITMCLFN Type: view CONSUMPTION

Rptd and NonRptd items for ECSL - Corr.

P_CZ_StRpEUTaxClassification is a Consumption CDS View that provides data about "Rptd and NonRptd items for ECSL - Corr." in SAP S/4HANA. It reads from 1 data source (I_JournalEntry) and exposes 22 fields with key fields CompanyCode, AccountingDocument, FiscalYear, TaxCode, TransactionTypeDetermination.

Data Sources (1)

SourceAliasJoin Type
I_JournalEntry I_JournalEntry left_outer

Parameters (4)

NameTypeDefault
P_StatryRptgEntity srf_reporting_entity
P_StatryRptCategory srf_rep_cat_id
P_StatryRptRunID srf_report_run_id
P_RelocationDocumentType farp_blart

Annotations (12)

NameValueLevelField
AbapCatalog.sqlViewName PCZSRECSLITMCLFN view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
VDM.viewType #CONSUMPTION view
VDM.private true view
AccessControl.authorizationCheck #CHECK view
EndUserText.label Rptd and NonRptd items for ECSL - Corr. view
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.dataClass #MIXED view
AccessControl.personalData.blocking #BLOCKED_DATA_INCLUDED view

Fields (22)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode I_StRpTaxItmWithEUTaxClass CompanyCode
KEY AccountingDocument I_StRpTaxItmWithEUTaxClass AccountingDocument
KEY FiscalYear I_StRpTaxItmWithEUTaxClass FiscalYear
KEY TaxCode TaxCode
KEY TransactionTypeDetermination TransactionTypeDetermination
Creditor Creditor
Debtor Debtor
VATRegistration VATRegistration
TaxableEntity TaxableEntity
ReportingDate ReportingDate
PostingDate I_StRpTaxItmWithEUTaxClass PostingDate
DocumentDate I_StRpTaxItmWithEUTaxClass DocumentDate
TaxReportingDate I_StRpTaxItmWithEUTaxClass TaxReportingDate
ReportingCountry ReportingCountry
IsEUTriangularDeal IsEUTriangularDeal
DelivOfGoodsDestCountry DelivOfGoodsDestCountry
DelivOfGoodsOriginCountry DelivOfGoodsOriginCountry
EUTaxClassification EUTaxClassification
TaxType TaxType
StatryRptgEntity
StatryRptCategory
StatryRptRunID
@AbapCatalog.sqlViewName:'PCZSRECSLITMCLFN'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey:true
@VDM.viewType: #CONSUMPTION
@VDM.private: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'Rptd and NonRptd items for ECSL - Corr.'
@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel.usageType.sizeCategory: #L
@ObjectModel.usageType.serviceQuality: #D
@ObjectModel.usageType.dataClass: #MIXED
@AccessControl.personalData.blocking: #BLOCKED_DATA_INCLUDED

////////////////////////////////////////////////////////////////////

// This view is intended to derive all documents including reported and

// non reported for Statutory Reporting - with columns for CZ ECSL //

////////////////////////////////////////////////////////////////////


define view P_CZ_StRpEUTaxClassification
  with parameters

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

  as select distinct 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 

{
  key I_StRpTaxItmWithEUTaxClass.CompanyCode,
  key I_StRpTaxItmWithEUTaxClass.AccountingDocument,
  key I_StRpTaxItmWithEUTaxClass.FiscalYear,
  key TaxCode,
  key TransactionTypeDetermination,
      Creditor,
      Debtor,
      VATRegistration,
      TaxableEntity,
      ReportingDate,
      I_StRpTaxItmWithEUTaxClass.PostingDate,
      I_StRpTaxItmWithEUTaxClass.DocumentDate,
      I_StRpTaxItmWithEUTaxClass.TaxReportingDate,
      ReportingCountry,
      IsEUTriangularDeal,
      DelivOfGoodsDestCountry,
      DelivOfGoodsOriginCountry,
      EUTaxClassification,
      TaxType,
      cast((case 
        when EUTaxClassification = '4' then '3' //Services 

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

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

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

        else '9'
      end) as ficz_ecsl_operation_key) as OfficialTaxOperationKey, 
      $parameters.P_StatryRptgEntity     as StatryRptgEntity,
      $parameters.P_StatryRptCategory    as StatryRptCategory,
      $parameters.P_StatryRptRunID       as StatryRptRunID

}