I_ZA_StRpTaxReturnBoxCube

DDL: I_ZA_STRPTAXRETURNBOXCUBE SQL: IZASRTAXRETBOXC Type: view COMPOSITE

South Africa VAT Report

I_ZA_StRpTaxReturnBoxCube is a Composite CDS View (Cube) that provides data about "South Africa VAT Report" in SAP S/4HANA. It reads from 1 data source (I_StRpTaxReturnBoxCube) and exposes 51 fields with key fields CompanyCode, AccountingDocument, FiscalYear, TaxItem, TaxCode.

Data Sources (1)

SourceAliasJoin Type
I_StRpTaxReturnBoxCube I_StRpTaxReturnBoxCube from

Parameters (4)

NameTypeDefault
P_StatryRptgEntity srf_reporting_entity
P_StatryRptCategory srf_rep_cat_id
P_StatryRptRunID srf_report_run_id
P_ReportingCountry land1

Annotations (15)

NameValueLevelField
AbapCatalog.sqlViewName IZASRTAXRETBOXC view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #CHECK view
EndUserText.label South Africa VAT Report view
VDM.viewType #COMPOSITE view
Analytics.dataCategory #CUBE view
ClientHandling.algorithm #SESSION_VARIABLE view
Metadata.ignorePropagatedAnnotations true view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.dataClass #MIXED view
AccessControl.personalData.blocking #NOT_REQUIRED view
Metadata.allowExtensions true view
Analytics.internalName #LOCAL view
AbapCatalog.preserveKey true view

Fields (51)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode CompanyCode
KEY AccountingDocument AccountingDocument
KEY FiscalYear FiscalYear
KEY TaxItem TaxItem
KEY TaxCode TaxCode
KEY TransactionTypeDetermination TransactionTypeDetermination
KEY TaxBox TaxBox
KEY Country Country
KEY TaxDeclnAmountType TaxDeclnAmountType
KEY TaxItemGroupingVersion TaxItemGroupingVersion
KEY ValidFrom ValidFrom
KEY TaxBoxStructureType TaxBoxStructureType
KEY StatryRptgEntity StatryRptgEntity
KEY StatryRptCategory StatryRptCategory
KEY StatryRptRunID StatryRptRunID
KEY TaxGroup TaxGroup
KEY TaxBoxStructure TaxBoxStructure
ValidTo ValidTo
DebitCreditCode DebitCreditCode
TaxCalculationProcedure TaxCalculationProcedure
IPITaxRate IPITaxRate
TaxRate
TaxType TaxType
TaxRateValidityStartDate TaxRateValidityStartDate
ImportTaxAmount TaxAmountInRptgCrcy
TotalGrossAmountInRptgCrcy
AmountInReportingCurrency AmountInReportingCurrency
DocumentCurrency DocumentCurrency
ReportingCurrency ReportingCurrency
AccountingDocumentType AccountingDocumentType
ReferenceDocumentType ReferenceDocumentType
AlternativeReferenceDocument AlternativeReferenceDocument
DocumentReferenceID DocumentReferenceID
AccountingDocumentHeaderText AccountingDocumentHeaderText
Ledger Ledger
PostingDate PostingDate
DocumentDate DocumentDate
TaxReportingDate TaxReportingDate
ReportingDate ReportingDate
FiscalPeriod FiscalPeriod
CompanyCodeCountry CompanyCodeCountry
ReportingCountry ReportingCountry
TaxReturnCountry TaxReturnCountry
BusinessPartner BusinessPartner
BusinessPartnerName BusinessPartnerName
TaxNumber1 TaxNumber1
TaxNumber2 TaxNumber2
TaxBoxStructureName TaxBoxStructureName
TaxBoxName TaxBoxName
TaxBoxCondition TaxBoxCondition
TaxCodeName
@AbapCatalog.sqlViewName: 'IZASRTAXRETBOXC'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'South Africa VAT Report'
@VDM.viewType: #COMPOSITE
@Analytics: { dataCategory: #CUBE }
@ClientHandling.algorithm: #SESSION_VARIABLE
@Metadata.ignorePropagatedAnnotations:true
@ObjectModel.usageType.sizeCategory: #XL
@ObjectModel.usageType.serviceQuality: #D
@ObjectModel.usageType.dataClass: #MIXED
@AccessControl.personalData.blocking: #NOT_REQUIRED
@Metadata.allowExtensions: true
@Analytics.internalName:#LOCAL
@AbapCatalog.preserveKey:true

define view I_ZA_StRpTaxReturnBoxCube

with parameters

    P_StatryRptgEntity      : srf_reporting_entity,
    P_StatryRptCategory     : srf_rep_cat_id,
    P_StatryRptRunID        : srf_report_run_id,
    P_ReportingCountry      : land1


as select from I_StRpTaxReturnBoxCube          (
                                                   P_TaxIsDeferredRelevant : 'N',
                                                   P_TaxIsMossRelevant     : 'N',
                                                   P_StatryRptgEntity      : :P_StatryRptgEntity ,
                                                   P_StatryRptCategory     : :P_StatryRptCategory,
                                                   P_StatryRptRunID        : :P_StatryRptRunID,
                                                   P_ReportingCountry      : :P_ReportingCountry,
                                                   P_TaxBoxConfiguration   : '3'
                                                )

{
    //key fields

    key CompanyCode,
    key AccountingDocument,
    key FiscalYear,
    key TaxItem,
    key TaxCode,
    key TransactionTypeDetermination,
    key TaxBox,
    key Country,
    key TaxDeclnAmountType,
    key TaxItemGroupingVersion,
    key ValidFrom,
    key TaxBoxStructureType,
    key StatryRptgEntity,
    key StatryRptCategory,
    key StatryRptRunID,
    key TaxGroup,
    key TaxBoxStructure,

    ValidTo,
    DebitCreditCode,
    TaxCalculationProcedure,

    IPITaxRate,

    cast(TaxRate as fiza_tax_rate) as TaxRate,

    TaxType,
    TaxRateValidityStartDate,

    @DefaultAggregation:#SUM
    @Semantics.amount.currencyCode: 'ReportingCurrency'
    case
    when ( ( DebitCreditCode = 'S' and TaxType = 'A' ) or ( DebitCreditCode = 'H' and TaxType = 'A' ) )
    then
      - TaxBaseAmountInRptgCrcy
    else
      TaxBaseAmountInRptgCrcy
    end as TaxBaseAmountInRptgCrcy,

    @DefaultAggregation:#SUM
    @Semantics.amount.currencyCode: 'ReportingCurrency'
    case
    when ( ( DebitCreditCode = 'S' and TaxType = 'A' ) or ( DebitCreditCode = 'H' and TaxType = 'A' ) )
    then
      -  TaxAmountInRptgCrcy
    else
      TaxAmountInRptgCrcy
    end as TaxAmountInRptgCrcy,

    case
    when  ( TaxDeclnAmountType = 'T' )
    then
    TaxBox
    else ''
    end as TaxAmountTaxBox,

    case
    when ( TaxDeclnAmountType = 'B' )
    then
    TaxBox
    else ''
    end as TaxBaseAmountTaxBox,


    @DefaultAggregation:#SUM
    @Semantics.amount.currencyCode: 'ReportingCurrency'
    TaxAmountInRptgCrcy as ImportTaxAmount,

    @DefaultAggregation:#SUM
    @Semantics.amount.currencyCode: 'ReportingCurrency'
    TaxBaseAmountInRptgCrcy + TaxAmountInRptgCrcy as TotalGrossAmountInRptgCrcy,

    @DefaultAggregation:#SUM
    @Semantics.amount.currencyCode: 'ReportingCurrency'
    AmountInReportingCurrency,

    @DefaultAggregation:#SUM
    @Semantics.amount.currencyCode: 'DocumentCurrency'
    case
      when ( ( DebitCreditCode = 'S' and TaxType = 'A' ) or ( DebitCreditCode = 'H' and TaxType = 'A' ) )
      then
      - CalculatedTxBaseAmtInTransCrcy
      else
      CalculatedTxBaseAmtInTransCrcy
      end as CalculatedTxBaseAmtInTransCrcy,

    @DefaultAggregation:#SUM
    @Semantics.amount.currencyCode: 'DocumentCurrency'
    case
      when ( ( DebitCreditCode = 'S' and TaxType = 'A' ) or ( DebitCreditCode = 'H' and TaxType = 'A' ) )
      then
      - CalculatedTaxAmountInTransCrcy
      else
      CalculatedTaxAmountInTransCrcy
      end as CalculatedTaxAmountInTransCrcy,

    @Semantics.currencyCode:true
    DocumentCurrency,
    @Semantics.currencyCode:true
    ReportingCurrency,

    AccountingDocumentType,
    ReferenceDocumentType,
    AlternativeReferenceDocument,
    DocumentReferenceID,

    AccountingDocumentHeaderText,
    Ledger,

    PostingDate,
    DocumentDate,
    TaxReportingDate,
    ReportingDate,
    FiscalPeriod,

    CompanyCodeCountry,
    ReportingCountry,
    TaxReturnCountry,

    BusinessPartner,
    BusinessPartnerName,
    TaxNumber1,
    TaxNumber2,

    TaxBoxStructureName,
    TaxBoxName,
    TaxBoxCondition,

    _TaxCodeText[1:Language = $session.system_language ].TaxCodeName
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_STRPTAXRETURNBOXCUBE",
"I_TAXCODETEXT"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/