P_CN_GoldenTaxStlmtDocITUnion

DDL: P_CN_GOLDENTAXSTLMTDOCITUNION Type: view COMPOSITE

P_CN_GoldenTaxStlmtDocITUnion is a Composite CDS View in SAP S/4HANA. It reads from 1 data source (P_CN_GoldenTaxSettlmtDocItem) and exposes 25 fields with key fields CN_GoldenTaxSourceDocument1, CN_GoldenTaxSourceDocument2, CN_GoldenTaxSourceDocument3, CN_GoldenTaxDataSourceType, CN_GoldenTaxDocument. It has 1 association to related views.

Data Sources (1)

SourceAliasJoin Type
P_CN_GoldenTaxSettlmtDocItem P_CN_GoldenTaxSettlmtDocItem from

Associations (1)

CardinalityTargetAliasCondition
[0..1] I_Currency _LocalCurrency $projection.LocalCurrency = _LocalCurrency.Currency

Annotations (11)

NameValueLevelField
ClientHandling.algorithm #SESSION_VARIABLE view
AccessControl.authorizationCheck #NOT_REQUIRED view
Metadata.ignorePropagatedAnnotations true view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
ObjectModel.usageType.serviceQuality #B view
ObjectModel.usageType.sizeCategory #XXL view
VDM.viewType #COMPOSITE view
VDM.private true view
AbapCatalog.sqlViewName PCNGTSETDOCITUN view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view

Fields (25)

KeyFieldSource TableSource FieldDescription
KEY CN_GoldenTaxSourceDocument1 Settlement Doc.
KEY CN_GoldenTaxSourceDocument2
KEY CN_GoldenTaxSourceDocument3
KEY CN_GoldenTaxDataSourceType
KEY CN_GoldenTaxDocument CN_GoldenTaxDocument
KEY CN_GoldenTaxCombinationID CN_GoldenTaxCombinationID
KEY CN_GoldenTaxDocumentItem Item
Product Product Product Sold
ProductName ProductName Description
SizeOrDimensionText SizeOrDimensionText Size/dimensions
ProductGroup ProductGroup Product Sold Group
BilledQuantityUnit SettlmtQuantityUnit Settlement Unit
BilledQuantity SettlmtQuantity SettlmtQuantity
BilledQuantityUnitName BilledQuantityUnitName
LocalCurrency LocalCurrency Local Currency
CN_TaxInvcDiscNetAmtInLoclCrcy
CN_TaxInvcDiscTaxAmtInLoclCrcy
CN_GoldenTaxDdctdAmtInLoclCrcy
CN_GoldenTaxClassfctnNumber CN_GoldenTaxClassfctnNumber
CN_GoldenTaxPrfntlTreatment CN_GoldenTaxPrfntlTreatment
CN_GoldenTaxIdentification CN_GoldenTaxIdentification
CN_GoldenTxPrfntlTrtmtNote CN_GoldenTxPrfntlTrtmtNote
CN_GoldenTaxCommodityCode CN_GoldenTaxCommodityCode
CN_GoldenTaxClassificationDesc CN_GoldenTaxClassificationDesc
_LocalCurrency _LocalCurrency

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_CN_GoldenTaxStlmtDocITUnion.
-- 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.

CREATE VIEW P_CN_GoldenTaxStlmtDocITUnion AS
SELECT
  cast(SettlmtDoc as eiv_doc_key1 ) AS CN_GoldenTaxSourceDocument1,
  cast('' as eiv_doc_key2 ) AS CN_GoldenTaxSourceDocument2,
  cast('' as eiv_doc_key3) AS CN_GoldenTaxSourceDocument3,
  cast('B' as eiv_doc_type) AS CN_GoldenTaxDataSourceType,
  CN_GoldenTaxDocument,
  CN_GoldenTaxCombinationID,
  cast(SettlmtDocItem as gtposnr) AS CN_GoldenTaxDocumentItem,
  Product,
  ProductName,
  SizeOrDimensionText,
  ProductGroup,
  SettlmtQuantityUnit AS BilledQuantityUnit,
  SettlmtQuantity AS BilledQuantity,
  BilledQuantityUnitName,
  LocalCurrency,
  cast(0 as gtdisc) AS CN_TaxInvcDiscNetAmtInLoclCrcy,
  cast(0 as gtdisctax) AS CN_TaxInvcDiscTaxAmtInLoclCrcy,
  cast(0 as idgt_deduct_amt) AS CN_GoldenTaxDdctdAmtInLoclCrcy,
  CN_GoldenTaxClassfctnNumber,
  CN_GoldenTaxPrfntlTreatment,
  CN_GoldenTaxIdentification,
  CN_GoldenTxPrfntlTrtmtNote,
  CN_GoldenTaxCommodityCode,
  CN_GoldenTaxClassificationDesc
FROM P_CN_GoldenTaxSettlmtDocItem
LEFT OUTER JOIN I_Currency AS _LocalCurrency ON LocalCurrency = _LocalCurrency.Currency  -- association [0..1]
;