I_IN_GSTR6InvoiceDetailCube

DDL: I_IN_GSTR6INVOICEDETAILCUBE Type: view_entity COMPOSITE

Incoming Docs B2B and CDN - Cube

I_IN_GSTR6InvoiceDetailCube is a Composite CDS View (Cube) that provides data about "Incoming Docs B2B and CDN - Cube" in SAP S/4HANA. It reads from 1 data source (I_IN_EDocGSTPurRegTaxItem) and exposes 29 fields with key fields ElectronicDocUUID, TaxItem, TaxItemAcctgDocItemRef, IndianTaxConditionName, ElectronicDocCompanyCode. It has 1 association to related views.

Data Sources (1)

SourceAliasJoin Type
I_IN_EDocGSTPurRegTaxItem I_IN_EDocGSTPurRegTaxItem from

Associations (1)

CardinalityTargetAliasCondition
[0..1] I_IN_GSTStateCodeMap _gststatecodemap _gststatecodemap.Country = I_IN_EDocGSTPurRegTaxItem.ElectronicDocCountry and _gststatecodemap.Region = I_IN_EDocGSTPurRegTaxItem.IN_GSTPlaceOfSupply

Annotations (11)

NameValueLevelField
AccessControl.authorizationCheck #MANDATORY view
EndUserText.label Incoming Docs B2B and CDN - Cube view
Metadata.ignorePropagatedAnnotations true view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.dataClass #MIXED view
VDM.viewType #COMPOSITE view
Metadata.allowExtensions true view
Analytics.dataCategory #CUBE view
AccessControl.personalData.blocking #BLOCKED_DATA_INCLUDED view
Analytics.internalName #LOCAL view

Fields (29)

KeyFieldSource TableSource FieldDescription
KEY ElectronicDocUUID I_IN_EDocGSTPurRegTaxItem ElectronicDocUUID
KEY TaxItem I_IN_EDocGSTPurRegTaxItem TaxItem Tax Item
KEY TaxItemAcctgDocItemRef I_IN_EDocGSTPurRegTaxItem TaxItemAcctgDocItemRef Tax doc. item number
KEY IndianTaxConditionName I_IN_EDocGSTPurRegTaxItem IndianTaxConditionName
KEY ElectronicDocCompanyCode I_IN_EDocGSTPurRegTaxItem ElectronicDocCompanyCode
AccountingDocument I_IN_EDocGSTPurRegTaxItem AccountingDocument Journal Entry
IN_EDocFiscalYear I_IN_EDocGSTPurRegTaxItem IN_EDocFiscalYear
0elseTaxRateendasfitaxrateasTaxRate
IN_DocumentSectionCode I_IN_EDocGSTPurRegTaxItem IN_DocumentSectionCode
IN_EDocInptTaxCrdtAccptdDate I_IN_EDocGSTPurRegTaxItem IN_EDocInptTaxCrdtAccptdDate ITC Accepted Date
IN_EDocInptTaxCrdtAccptdPeriod I_IN_EDocGSTPurRegTaxItem IN_EDocInptTaxCrdtAccptdPeriod
IN_EDocGSTRetsExtNmbr I_IN_EDocGSTPurRegTaxItem IN_EDocGSTRetsExtNmbr
PostingDate I_IN_EDocGSTPurRegTaxItem PostingDate Posting Date for GR
IN_EDocGSTRetsTaxReportingDate I_IN_EDocGSTPurRegTaxItem IN_EDocGSTRetsTaxReportingDate
ElectronicDocProcessStatus I_IN_EDocGSTPurRegTaxItem ElectronicDocProcessStatus Invoice status
CompanyCodeCurrency I_IN_EDocGSTPurRegTaxItem CompanyCodeCurrency Local Currency
ElectronicDocSourceType I_IN_EDocGSTPurRegTaxItem ElectronicDocSourceType
ElectronicDocCountry I_IN_EDocGSTPurRegTaxItem ElectronicDocCountry
IN_GSTPlaceOfSupply I_IN_EDocGSTPurRegTaxItem IN_GSTPlaceOfSupply Place of Supply
IN_InvoiceType I_IN_EDocGSTPurRegTaxItem IN_InvoiceType
IN_NoteType I_IN_EDocGSTPurRegTaxItem IN_NoteType Credit/Debit Note Type
TaxableAmountendasTaxableAmount Taxable Amount
IN_IntegratedGSTAmount Integrated GST Amount
IN_CentralGSTAmount Central GST Amount
IN_StateGSTAmount State GST
IN_CessGSTAmtInCoCodeCrcy Cess GST Amount
PricingProcedure I_IN_EDocGSTPurRegTaxItem PricingProcedure Tax Calc. Procedure
IN_EDocGSTRetsBusinessPlace I_IN_EDocGSTPurRegTaxItem IN_EDocGSTRetsBusinessPlace
IN_GSTLegalStateCode _gststatecodemap IN_GSTLegalStateCode State Code

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 I_IN_GSTR6InvoiceDetailCube.
-- 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 I_IN_GSTR6InvoiceDetailCube AS
SELECT
  I_IN_EDocGSTPurRegTaxItem.ElectronicDocUUID AS ElectronicDocUUID,
  I_IN_EDocGSTPurRegTaxItem.TaxItem AS TaxItem,
  I_IN_EDocGSTPurRegTaxItem.TaxItemAcctgDocItemRef AS TaxItemAcctgDocItemRef,
  I_IN_EDocGSTPurRegTaxItem.IndianTaxConditionName AS IndianTaxConditionName,
  I_IN_EDocGSTPurRegTaxItem.ElectronicDocCompanyCode AS ElectronicDocCompanyCode,
  I_IN_EDocGSTPurRegTaxItem.AccountingDocument AS AccountingDocument,
  I_IN_EDocGSTPurRegTaxItem.IN_EDocFiscalYear AS IN_EDocFiscalYear,
  cast( case when I_IN_EDocGSTPurRegTaxItem.IndianTaxConditionName = 'CGSTSOFFAP' or I_IN_EDocGSTPurRegTaxItem.IndianTaxConditionName = 'CGSTINVAP' or I_IN_EDocGSTPurRegTaxItem.IndianTaxConditionName = 'SGSTSOFFAP' or I_IN_EDocGSTPurRegTaxItem.IndianTaxConditionName = 'SGSTINVAP' then TaxRate * 2.0 else TaxRate end as fitaxrate ) as TaxRate AS 0elseTaxRateendasfitaxrateasTaxRate,
  I_IN_EDocGSTPurRegTaxItem.IN_DocumentSectionCode AS IN_DocumentSectionCode,
  I_IN_EDocGSTPurRegTaxItem.IN_EDocInptTaxCrdtAccptdDate AS IN_EDocInptTaxCrdtAccptdDate,
  I_IN_EDocGSTPurRegTaxItem.IN_EDocInptTaxCrdtAccptdPeriod AS IN_EDocInptTaxCrdtAccptdPeriod,
  I_IN_EDocGSTPurRegTaxItem.IN_EDocGSTRetsExtNmbr AS IN_EDocGSTRetsExtNmbr,
  I_IN_EDocGSTPurRegTaxItem.PostingDate AS PostingDate,
  I_IN_EDocGSTPurRegTaxItem.IN_EDocGSTRetsTaxReportingDate AS IN_EDocGSTRetsTaxReportingDate,
  I_IN_EDocGSTPurRegTaxItem.ElectronicDocProcessStatus AS ElectronicDocProcessStatus,
  I_IN_EDocGSTPurRegTaxItem.CompanyCodeCurrency AS CompanyCodeCurrency,
  I_IN_EDocGSTPurRegTaxItem.ElectronicDocSourceType AS ElectronicDocSourceType,
  I_IN_EDocGSTPurRegTaxItem.ElectronicDocCountry AS ElectronicDocCountry,
  I_IN_EDocGSTPurRegTaxItem.IN_GSTPlaceOfSupply AS IN_GSTPlaceOfSupply,
  I_IN_EDocGSTPurRegTaxItem.IN_InvoiceType AS IN_InvoiceType,
  I_IN_EDocGSTPurRegTaxItem.IN_NoteType AS IN_NoteType,
  case when I_IN_EDocGSTPurRegTaxItem.IndianTaxConditionName = 'SGSTSOFFAP' or I_IN_EDocGSTPurRegTaxItem.IndianTaxConditionName = 'SGSTINVAP' then I_IN_EDocGSTPurRegTaxItem.TaxableAmount * 0 else abs( I_IN_EDocGSTPurRegTaxItem.TaxableAmount ) end as TaxableAmount AS TaxableAmountendasTaxableAmount,
  abs( I_IN_EDocGSTPurRegTaxItem.IN_InElgblIGSTInptTxCrdtAmount + I_IN_EDocGSTPurRegTaxItem.IN_ElgblIntgtdGSTInptTxCrdtAmt ) AS IN_IntegratedGSTAmount,
  abs( I_IN_EDocGSTPurRegTaxItem.IN_InElgblCGSTInptTxCrdtAmount + I_IN_EDocGSTPurRegTaxItem.IN_ElgblCntrlGSTInptTxCrdtAmt ) AS IN_CentralGSTAmount,
  abs( I_IN_EDocGSTPurRegTaxItem.IN_InElgblSGSTInptTxCrdtAmount + I_IN_EDocGSTPurRegTaxItem.IN_ElgblStateGSTInptTxCrdtAmt ) AS IN_StateGSTAmount,
  abs( I_IN_EDocGSTPurRegTaxItem.IN_IneligibleCessInptTxCrdtAmt + I_IN_EDocGSTPurRegTaxItem.IN_EligibleCessInptTxCrdtAmt ) AS IN_CessGSTAmtInCoCodeCrcy,
  I_IN_EDocGSTPurRegTaxItem.PricingProcedure AS PricingProcedure,
  I_IN_EDocGSTPurRegTaxItem.IN_EDocGSTRetsBusinessPlace AS IN_EDocGSTRetsBusinessPlace,
  _gststatecodemap.IN_GSTLegalStateCode AS IN_GSTLegalStateCode
FROM I_IN_EDocGSTPurRegTaxItem
LEFT OUTER JOIN I_IN_GSTStateCodeMap AS _gststatecodemap ON _gststatecodemap.Country = I_IN_EDocGSTPurRegTaxItem.ElectronicDocCountry AND _gststatecodemap.Region = I_IN_EDocGSTPurRegTaxItem.IN_GSTPlaceOfSupply  -- association [0..1]
;