P_CO_DIANStRpWhldgTaxItem
Withholding Tax Item for Colombia DIAN
P_CO_DIANStRpWhldgTaxItem is a Consumption CDS View that provides data about "Withholding Tax Item for Colombia DIAN" in SAP S/4HANA. It reads from 3 data sources (I_CO_DIANItemType, I_CO_DIANWithholdingTaxCode, P_StRpWhldgTaxItem) and exposes 44 fields with key fields CompanyCode, AccountingDocument, FiscalYear, TaxItem, CO_DIANReportFormat. It has 1 association to related views.
Data Sources (3)
| Source | Alias | Join Type |
|---|---|---|
| I_CO_DIANItemType | DIANItemType | inner |
| I_CO_DIANWithholdingTaxCode | DIANWhtTaxCode | inner |
| P_StRpWhldgTaxItem | WhldgTaxItem | from |
Associations (1)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | P_CO_DIANOneTimeAccountBP | _Onetime | $projection.CompanyCode = _Onetime.CompanyCode and $projection.AccountingDocument = _Onetime.AccountingDocument and $projection.FiscalYear = _Onetime.FiscalYear |
Annotations (10)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PSRCOWHLDGTXITMC | view | |
| EndUserText.label | Withholding Tax Item for Colombia DIAN | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| ObjectModel.usageType.sizeCategory | #XL | view | |
| ObjectModel.usageType.serviceQuality | #C | view | |
| ObjectModel.usageType.dataClass | #MIXED | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| VDM.viewType | #CONSUMPTION | view | |
| VDM.private | true | view |
Fields (44)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | CompanyCode | P_StRpWhldgTaxItem | CompanyCode | Receiver Company Code |
| KEY | AccountingDocument | P_StRpWhldgTaxItem | AccountingDocument | Journal Entry |
| KEY | FiscalYear | |||
| KEY | TaxItem | |||
| KEY | CO_DIANReportFormat | I_CO_DIANItemType | CO_DIANReportFormat | Report Format |
| KEY | CO_DIANReportItemType | I_CO_DIANItemType | CO_DIANReportItemType | Item Type |
| KEY | WithholdingTaxType | P_StRpWhldgTaxItem | WithholdingTaxType | WTax Type |
| CO_DIANAmountClassification | I_CO_DIANWithholdingTaxCode | CO_DIANAmountClassification | Amount Classif. | |
| WithholdingTaxCode | P_StRpWhldgTaxItem | WithholdingTaxCode | WTax Code | |
| FinancialAccountType | P_StRpWhldgTaxItem | FinancialAccountType | Fin. Account Type | |
| PostingDate | P_StRpWhldgTaxItem | PostingDate | Posting Date for GR | |
| DocumentDate | P_StRpWhldgTaxItem | DocumentDate | Journal Entry Date | |
| ReportingDate | P_StRpWhldgTaxItem | ReportingDate | ||
| GLAccount | P_StRpWhldgTaxItem | GLAccount | General Ledger | |
| BusinessPlace | ||||
| AccountingDocumentType | P_StRpWhldgTaxItem | AccountingDocumentType | Journal Entry Type | |
| Customer | ||||
| Supplier | ||||
| TaxNumberType | P_StRpWhldgTaxItem | TaxNumberType | Tax number type | |
| TaxNumber1 | ||||
| TaxNumber2 | ||||
| TaxNumber3 | ||||
| TaxNumber4 | ||||
| TaxNumber5 | ||||
| VATRegistration | ||||
| BusinessPartnerCountry | ||||
| Region | ||||
| CityName | ||||
| StreetName | ||||
| CompanyCodeCurrency | P_StRpWhldgTaxItem | ReportingCurrency | Currency | |
| TransactionCurrency | P_StRpWhldgTaxItem | TransactionCurrency | Transaction Currency | |
| ReportingCurrency | ||||
| WhldgTaxBaseAmtInCoCodeCrcy | ||||
| WhldgTaxAmtInCoCodeCrcy | ||||
| WhldgTaxBaseAmtInTransacCrcy | ||||
| WhldgTaxAmtInTransacCrcy | ||||
| WhldgTaxExmptAmtInCoCodeCrcy | P_StRpWhldgTaxItem | WhldgTaxExmptAmtInCoCodeCrcy | ||
| WhldgTaxExmptAmtInTransacCrcy | P_StRpWhldgTaxItem | WhldgTaxExmptAmtInTransacCrcy | ||
| _CompanyCode | P_StRpWhldgTaxItem | _CompanyCode | ||
| Country | P_StRpWhldgTaxItem | Country | Venue: Ctry/Reg | |
| _WithholdingTaxCode | P_StRpWhldgTaxItem | _WithholdingTaxCode | ||
| _Customer | P_StRpWhldgTaxItem | _Customer | ||
| _Supplier | P_StRpWhldgTaxItem | _Supplier | ||
| _Onetime | _Onetime |
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_CO_DIANStRpWhldgTaxItem.
-- 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.
-- SQL view name: PSRCOWHLDGTXITMC
CREATE VIEW P_CO_DIANStRpWhldgTaxItem AS
SELECT
WhldgTaxItem.CompanyCode AS CompanyCode,
WhldgTaxItem.AccountingDocument AS AccountingDocument,
cast( WhldgTaxItem.FiscalYear as fis_gjahr_no_conv preserving type ) AS FiscalYear,
cast( WhldgTaxItem.AccountingDocumentItem as taxitem preserving type ) AS TaxItem,
DIANItemType.CO_DIANReportFormat AS CO_DIANReportFormat,
DIANItemType.CO_DIANReportItemType AS CO_DIANReportItemType,
WhldgTaxItem.WithholdingTaxType AS WithholdingTaxType,
DIANWhtTaxCode.CO_DIANAmountClassification AS CO_DIANAmountClassification,
WhldgTaxItem.WithholdingTaxCode AS WithholdingTaxCode,
WhldgTaxItem.FinancialAccountType AS FinancialAccountType,
WhldgTaxItem.PostingDate AS PostingDate,
WhldgTaxItem.DocumentDate AS DocumentDate,
WhldgTaxItem.ReportingDate AS ReportingDate,
WhldgTaxItem.GLAccount AS GLAccount,
cast(WhldgTaxItem.BusinessPlace as farp_bupla preserving type) AS BusinessPlace,
WhldgTaxItem.AccountingDocumentType AS AccountingDocumentType,
cast(WhldgTaxItem.Debtor as kunnr preserving type) AS Customer,
cast(WhldgTaxItem.Creditor as lifnr preserving type) AS Supplier,
WhldgTaxItem.TaxNumberType AS TaxNumberType,
cast( WhldgTaxItem.TaxNumber1 as stcd1 preserving type) AS TaxNumber1,
cast( WhldgTaxItem.TaxNumber2 as stcd2 preserving type) AS TaxNumber2,
cast( WhldgTaxItem.TaxNumber3 as stcd3 preserving type) AS TaxNumber3,
cast( WhldgTaxItem.TaxNumber4 as stcd4 preserving type) AS TaxNumber4,
cast( WhldgTaxItem.TaxNumber5 as stcd5 preserving type) AS TaxNumber5,
cast( WhldgTaxItem.VATRegistration as stceg preserving type) AS VATRegistration,
cast(WhldgTaxItem.BusinessPartnerCountry as land1 preserving type) AS BusinessPartnerCountry,
cast(WhldgTaxItem.Region as regio preserving type) AS Region,
cast(WhldgTaxItem.CityName as ad_city1 preserving type) AS CityName,
cast(WhldgTaxItem.StreetName as ad_street preserving type) AS StreetName,
WhldgTaxItem.ReportingCurrency AS CompanyCodeCurrency,
WhldgTaxItem.TransactionCurrency AS TransactionCurrency,
cast( 'COP' as ficodian_reporting_currency ) AS ReportingCurrency,
cast( WhldgTaxItem.WhldgTaxBaseAmtInCoCodeCrcy as fis_qsshh ) AS WhldgTaxBaseAmtInCoCodeCrcy,
cast( WhldgTaxItem.WhldgTaxAmtInCoCodeCrcy as fis_qbshh ) AS WhldgTaxAmtInCoCodeCrcy,
cast( WhldgTaxItem.WhldgTaxBaseAmtInTransacCrcy as fis_qsshb ) AS WhldgTaxBaseAmtInTransacCrcy,
cast( WhldgTaxItem.WhldgTaxAmtInTransacCrcy as fis_qbshb ) AS WhldgTaxAmtInTransacCrcy,
WhldgTaxItem.WhldgTaxExmptAmtInCoCodeCrcy AS WhldgTaxExmptAmtInCoCodeCrcy,
WhldgTaxItem.WhldgTaxExmptAmtInTransacCrcy AS WhldgTaxExmptAmtInTransacCrcy,
WhldgTaxItem._CompanyCode AS _CompanyCode,
WhldgTaxItem.Country AS Country,
WhldgTaxItem._WithholdingTaxCode AS _WithholdingTaxCode,
WhldgTaxItem._Customer AS _Customer,
WhldgTaxItem._Supplier AS _Supplier
FROM P_StRpWhldgTaxItem AS WhldgTaxItem
INNER JOIN I_CO_DIANItemType AS DIANItemType ON /* join condition not captured in parsed metadata */
INNER JOIN I_CO_DIANWithholdingTaxCode AS DIANWhtTaxCode ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN P_CO_DIANOneTimeAccountBP AS _Onetime ON CompanyCode = _Onetime.CompanyCode AND AccountingDocument = _Onetime.AccountingDocument AND FiscalYear = _Onetime.FiscalYear -- association [0..1]
;
Learn More
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- CDS View Annotations — A Complete Guide
- What Is a CDS View in SAP S/4HANA?
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- CDS View Field Mapping and Associations
- Understanding the SAP S/4HANA Data Model
- CDS View Extensions and Custom Fields in SAP S/4HANA
- Released APIs and Stability Contracts in SAP S/4HANA
- BSEG to ACDOCA: The Universal Journal Migration
- Business Partner Migration: KNA1/LFA1 to BUT000
- Material Document Migration: MSEG/MKPF to MATDOC
- How to Find the Right CDS View for an SAP Table
- BW Extractor to CDS View Migration Guide
- S/4HANA CDS View Deprecation: What You Need to Know
- ABAP CDS View Tutorial — From Basics to Real-World Examples
- RAP and CDS Views — Building Transactional Apps in SAP S/4HANA
- Sales Document Status Migration: VBUP/VBUK Removal in S/4HANA
- CO Tables in S/4HANA: COEP, COBK, COSS, COSP to ACDOCA