P_MX_DIOTTaxItemTaxBox

DDL: P_MX_DIOTTAXITEMTAXBOX Type: view_entity CONSUMPTION Package: GLO_FIN_IS_VAT_MX

Mexico DIOT Tax Items with Tax Boxes

P_MX_DIOTTaxItemTaxBox is a Consumption CDS View that provides data about "Mexico DIOT Tax Items with Tax Boxes" in SAP S/4HANA. It reads from 1 data source (I_MX_DIOTTxItmBusinessPartner) and exposes 50 fields with key fields CompanyCode, AccountingDocument, AccountingDocumentItem, FiscalYear, StatryRptCategory. Part of development package GLO_FIN_IS_VAT_MX.

Data Sources (1)

SourceAliasJoin Type
I_MX_DIOTTxItmBusinessPartner I_MX_DIOTTxItmBusinessPartner from

Parameters (6)

NameTypeDefault
P_CompanyCode fis_bukrs
P_FiscalYear fis_gjahr
P_StatryRptgEntity srf_reporting_entity
P_StatryRptCategory srf_rep_cat_id
P_StatryRptRunID srf_report_run_id
P_Ledger fins_ledger

Annotations (8)

NameValueLevelField
AccessControl.authorizationCheck #MANDATORY view
AccessControl.personalData.blocking #BLOCKED_DATA_EXCLUDED view
Metadata.ignorePropagatedAnnotations true view
VDM.viewType #CONSUMPTION view
VDM.private true view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.dataClass #MIXED view

Fields (50)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode TaxItem CompanyCode Receiver Company Code
KEY AccountingDocument TaxItem AccountingDocument Journal Entry
KEY AccountingDocumentItem TaxItem AccountingDocumentItem Posting View Item
KEY FiscalYear TaxItem FiscalYear G/L Fiscal Year
KEY StatryRptCategory TaxItem StatryRptCategory Report ID
KEY StatryRptgEntity TaxItem StatryRptgEntity Reporting Entity
KEY StatryRptRunID TaxItem StatryRptRunID Report Run ID
KEY TaxTransferDocument TaxItem TaxTransferDocument Document Number
KEY TaxTransferDocumentYear TaxItem TaxTransferDocumentYear
KEY TaxCode TaxItem TaxCode Tax Code
KEY TaxBox TaxItem TaxBox Tax.Bs.Gp.No.
KEY TaxDeclnAmountType TaxItem TaxDeclnAmountType
KEY MX_DIOTOperationType TaxItem MX_DIOTOperationType
KEY MX_SupplierType TaxItem MX_SupplierType
KEY Supplier TaxItem Supplier Supplier
ReportingCurrency TaxItem ReportingCurrency Currency
TaxNumber1 TaxItem TaxNumber1 VAT Reg. No.
TaxNumberResponsible TaxItem TaxNumberResponsible
BusinessPartnerName TaxItem BusinessPartnerName Extracted Customer Name
Country TaxItem Country Venue: Ctry/Reg
CountryThreeLetterISOCode TaxItem CountryThreeLetterISOCode
NationalityName TaxItem NationalityName
MX_FullAddressText TaxItem MX_FullAddressText
MX_FiscalEffectManifest TaxItem MX_FiscalEffectManifest
MX_BorderClassification TaxItem MX_BorderClassification
00endasTaxBox08AmtInReportingCurrency
00endasTaxBox09AmtInReportingCurrency
00endasTaxBox10AmtInReportingCurrency
00endasTaxBox11AmtInReportingCurrency
00endasTaxBox12AmtInReportingCurrency
00endasTaxBox13AmtInReportingCurrency
00endasTaxBox14AmtInReportingCurrency
00endasTaxBox15AmtInReportingCurrency
00endasTaxBox16AmtInReportingCurrency
00endasTaxBox17AmtInReportingCurrency
00endasTaxBox18AmtInReportingCurrency
00endasTaxBox19AmtInReportingCurrency
00endasTaxBox20AmtInReportingCurrency
00endasTaxBox21AmtInReportingCurrency
00endasTaxBox22AmtInReportingCurrency
00endasTaxBox23AmtInReportingCurrency
00endasTaxBox24AmtInReportingCurrency
00endasTaxBox25AmtInReportingCurrency
00endasTaxBox26AmtInReportingCurrency
00endasTaxBox27AmtInReportingCurrency
00endasTaxBox29AmtInReportingCurrency
00endasTaxBox30AmtInReportingCurrency
00endasTaxBox31AmtInReportingCurrency
00endasTaxBox32AmtInReportingCurrency
00endasTaxBox33AmtInReportingCurrency

Derived SQL interpretation, reconstructed from the parsed view metadata (data sources, associations, and field mappings). SAP annotations are omitted and the structure is reformulated as SQL — this is a functional approximation, not the verbatim SAP source.

-- Derived SQL interpretation of CDS view P_MX_DIOTTaxItemTaxBox.
-- Reconstructed from parsed metadata (data sources, associations, fields).
-- SAP annotations are omitted and the structure is reformulated as SQL;
-- this is a functional approximation, not the verbatim SAP source. Some join
-- conditions may be unavailable and a few CDS constructs are kept as-is.
-- Parameters: P_CompanyCode : fis_bukrs, P_FiscalYear : fis_gjahr, P_StatryRptgEntity : srf_reporting_entity, P_StatryRptCategory : srf_rep_cat_id, P_StatryRptRunID : srf_report_run_id, P_Ledger : fins_ledger

CREATE VIEW P_MX_DIOTTaxItemTaxBox AS
SELECT
  TaxItem.CompanyCode AS CompanyCode,
  TaxItem.AccountingDocument AS AccountingDocument,
  TaxItem.AccountingDocumentItem AS AccountingDocumentItem,
  TaxItem.FiscalYear AS FiscalYear,
  TaxItem.StatryRptCategory AS StatryRptCategory,
  TaxItem.StatryRptgEntity AS StatryRptgEntity,
  TaxItem.StatryRptRunID AS StatryRptRunID,
  TaxItem.TaxTransferDocument AS TaxTransferDocument,
  TaxItem.TaxTransferDocumentYear AS TaxTransferDocumentYear,
  TaxItem.TaxCode AS TaxCode,
  TaxItem.TaxBox AS TaxBox,
  TaxItem.TaxDeclnAmountType AS TaxDeclnAmountType,
  TaxItem.MX_DIOTOperationType AS MX_DIOTOperationType,
  TaxItem.MX_SupplierType AS MX_SupplierType,
  TaxItem.Supplier AS Supplier,
  TaxItem.ReportingCurrency AS ReportingCurrency,
  TaxItem.TaxNumber1 AS TaxNumber1,
  TaxItem.TaxNumberResponsible AS TaxNumberResponsible,
  TaxItem.BusinessPartnerName AS BusinessPartnerName,
  TaxItem.Country AS Country,
  TaxItem.CountryThreeLetterISOCode AS CountryThreeLetterISOCode,
  TaxItem.NationalityName AS NationalityName,
  TaxItem.MX_FullAddressText AS MX_FullAddressText,
  TaxItem.MX_FiscalEffectManifest AS MX_FiscalEffectManifest,
  TaxItem.MX_BorderClassification AS MX_BorderClassification,
  case when TaxItem.TaxDeclnAmountType = 'B' and TaxItem.TaxBox = '08' and TaxItem.MX_BorderClassification = 1 then TaxItem.TaxBaseAmountInRptgCrcy else abap.curr'0.00' end as TaxBox08AmtInReportingCurrency AS 00endasTaxBox08AmtInReportingCurrency,
  case when TaxItem.TaxDeclnAmountType = 'B' and TaxItem.TaxBox = '09' and TaxItem.MX_BorderClassification = 1 then TaxItem.TaxBaseAmountInRptgCrcy else abap.curr'0.00' end as TaxBox09AmtInReportingCurrency AS 00endasTaxBox09AmtInReportingCurrency,
  case when TaxItem.TaxDeclnAmountType = 'B' and TaxItem.TaxBox = '10' and TaxItem.MX_BorderClassification = 2 then TaxItem.TaxBaseAmountInRptgCrcy else abap.curr'0.00' end as TaxBox10AmtInReportingCurrency AS 00endasTaxBox10AmtInReportingCurrency,
  case when TaxItem.TaxDeclnAmountType = 'B' and TaxItem.TaxBox = '11' and TaxItem.MX_BorderClassification = 2 then TaxItem.TaxBaseAmountInRptgCrcy else abap.curr'0.00' end as TaxBox11AmtInReportingCurrency AS 00endasTaxBox11AmtInReportingCurrency,
  case when TaxItem.TaxDeclnAmountType = 'B' and TaxItem.TaxBox = '12' then TaxItem.TaxBaseAmountInRptgCrcy else abap.curr'0.00' end as TaxBox12AmtInReportingCurrency AS 00endasTaxBox12AmtInReportingCurrency,
  case when TaxItem.TaxDeclnAmountType = 'B' and TaxItem.TaxBox = '13' then TaxItem.TaxBaseAmountInRptgCrcy else abap.curr'0.00' end as TaxBox13AmtInReportingCurrency AS 00endasTaxBox13AmtInReportingCurrency,
  case when TaxItem.TaxDeclnAmountType = 'B' and TaxItem.TaxBox = '14' then TaxItem.TaxBaseAmountInRptgCrcy else abap.curr'0.00' end as TaxBox14AmtInReportingCurrency AS 00endasTaxBox14AmtInReportingCurrency,
  case when TaxItem.TaxDeclnAmountType = 'B' and TaxItem.TaxBox = '15' then TaxItem.TaxBaseAmountInRptgCrcy else abap.curr'0.00' end as TaxBox15AmtInReportingCurrency AS 00endasTaxBox15AmtInReportingCurrency,
  case when TaxItem.TaxDeclnAmountType = 'B' and TaxItem.TaxBox = '16' then TaxItem.TaxBaseAmountInRptgCrcy else abap.curr'0.00' end as TaxBox16AmtInReportingCurrency AS 00endasTaxBox16AmtInReportingCurrency,
  case when TaxItem.TaxDeclnAmountType = 'B' and TaxItem.TaxBox = '17' then TaxItem.TaxBaseAmountInRptgCrcy else abap.curr'0.00' end as TaxBox17AmtInReportingCurrency AS 00endasTaxBox17AmtInReportingCurrency,
  case when TaxItem.TaxDeclnAmountType = 'T' and TaxItem.TaxBox = '18' and TaxItem.MX_BorderClassification = 1 then TaxItem.TaxAmountInRptgCrcy else abap.curr'0.00' end as TaxBox18AmtInReportingCurrency AS 00endasTaxBox18AmtInReportingCurrency,
  case when TaxItem.TaxDeclnAmountType = 'T' and TaxItem.TaxBox = '19' and TaxItem.MX_BorderClassification = 1 then TaxItem.TaxAmountInRptgCrcy else abap.curr'0.00' end as TaxBox19AmtInReportingCurrency AS 00endasTaxBox19AmtInReportingCurrency,
  case when TaxItem.TaxDeclnAmountType = 'T' and TaxItem.TaxBox = '20' and TaxItem.MX_BorderClassification = 2 then TaxItem.TaxAmountInRptgCrcy else abap.curr'0.00' end as TaxBox20AmtInReportingCurrency AS 00endasTaxBox20AmtInReportingCurrency,
  case when TaxItem.TaxDeclnAmountType = 'T' and TaxItem.TaxBox = '21' and TaxItem.MX_BorderClassification = 2 then TaxItem.TaxAmountInRptgCrcy else abap.curr'0.00' end as TaxBox21AmtInReportingCurrency AS 00endasTaxBox21AmtInReportingCurrency,
  case when TaxItem.TaxDeclnAmountType = 'T' and TaxItem.TaxBox = '22' then TaxItem.TaxAmountInRptgCrcy else abap.curr'0.00' end as TaxBox22AmtInReportingCurrency AS 00endasTaxBox22AmtInReportingCurrency,
  case when TaxItem.TaxDeclnAmountType = 'T' and TaxItem.TaxBox = '23' then TaxItem.TaxAmountInRptgCrcy else abap.curr'0.00' end as TaxBox23AmtInReportingCurrency AS 00endasTaxBox23AmtInReportingCurrency,
  case when TaxItem.TaxDeclnAmountType = 'T' and TaxItem.TaxBox = '24' then TaxItem.TaxAmountInRptgCrcy else abap.curr'0.00' end as TaxBox24AmtInReportingCurrency AS 00endasTaxBox24AmtInReportingCurrency,
  case when TaxItem.TaxDeclnAmountType = 'T' and TaxItem.TaxBox = '25' then TaxItem.TaxAmountInRptgCrcy else abap.curr'0.00' end as TaxBox25AmtInReportingCurrency AS 00endasTaxBox25AmtInReportingCurrency,
  case when TaxItem.TaxDeclnAmountType = 'T' and TaxItem.TaxBox = '26' then TaxItem.TaxAmountInRptgCrcy else abap.curr'0.00' end as TaxBox26AmtInReportingCurrency AS 00endasTaxBox26AmtInReportingCurrency,
  case when TaxItem.TaxDeclnAmountType = 'T' and TaxItem.TaxBox = '27' then TaxItem.TaxAmountInRptgCrcy else abap.curr'0.00' end as TaxBox27AmtInReportingCurrency AS 00endasTaxBox27AmtInReportingCurrency,
  case when TaxItem.TaxDeclnAmountType = 'B' and TaxItem.TaxBox = '49' then TaxItem.TaxBaseAmountInRptgCrcy else abap.curr'0.00' end as TaxBox29AmtInReportingCurrency AS 00endasTaxBox29AmtInReportingCurrency,
  case when TaxItem.TaxDeclnAmountType = 'B' and TaxItem.TaxBox = '50' then TaxItem.TaxBaseAmountInRptgCrcy else abap.curr'0.00' end as TaxBox30AmtInReportingCurrency AS 00endasTaxBox30AmtInReportingCurrency,
  case when TaxItem.TaxDeclnAmountType = 'B' and TaxItem.TaxBox = '51' then TaxItem.TaxBaseAmountInRptgCrcy else abap.curr'0.00' end as TaxBox31AmtInReportingCurrency AS 00endasTaxBox31AmtInReportingCurrency,
  case when TaxItem.TaxDeclnAmountType = 'B' and TaxItem.TaxBox = '52' then TaxItem.TaxBaseAmountInRptgCrcy else abap.curr'0.00' end as TaxBox32AmtInReportingCurrency AS 00endasTaxBox32AmtInReportingCurrency,
  case when TaxItem.TaxDeclnAmountType = 'B' and TaxItem.TaxBox = '53' then TaxItem.TaxBaseAmountInRptgCrcy else abap.curr'0.00' end as TaxBox33AmtInReportingCurrency AS 00endasTaxBox33AmtInReportingCurrency
FROM I_MX_DIOTTxItmBusinessPartner
;