C_PE_StRpSalesLedgerCube

DDL: C_PE_STRPSALESLEDGERCUBE SQL: CPESLSLC Type: view CONSUMPTION

Sales Ledger Peru - Cube

C_PE_StRpSalesLedgerCube is a Consumption CDS View (Cube) that provides data about "Sales Ledger Peru - Cube" in SAP S/4HANA. It reads from 4 data sources (I_CompanyCode, I_AddlCompanyCodeInformation, I_Country, P_PE_SalesTaxAggrgd) and exposes 37 fields with key fields CompanyCode, FiscalYear, AccountingDocument, StatryRptCategory, StatryRptgEntity.

Data Sources (4)

SourceAliasJoin Type
I_CompanyCode CompanyCode inner
I_AddlCompanyCodeInformation CompanyCodeInfo inner
I_Country Country inner
P_PE_SalesTaxAggrgd P_PE_SalesTaxAggrgd from

Parameters (2)

NameTypeDefault
P_ReportingCurrency glo_reporting_currency
P_TaxConversionIsNotEnabled fipe_deactivate_currency_conv

Annotations (13)

NameValueLevelField
AbapCatalog.sqlViewName CPESLSLC view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #MANDATORY view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.dataClass #MIXED view
VDM.viewType #CONSUMPTION view
Analytics.dataCategory #CUBE view
Analytics.internalName #LOCAL view
ClientHandling.algorithm #SESSION_VARIABLE view
AccessControl.personalData.blocking #BLOCKED_DATA_INCLUDED view
EndUserText.label Sales Ledger Peru - Cube view
Metadata.allowExtensions true view

Fields (37)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode SalesTaxEntry CompanyCode Receiver Company Code
KEY FiscalYear SalesTaxEntry FiscalYear G/L Fiscal Year
KEY AccountingDocument SalesTaxEntry AccountingDocument Journal Entry
KEY StatryRptCategory SalesTaxEntry StatryRptCategory Report ID
KEY StatryRptgEntity SalesTaxEntry StatryRptgEntity Reporting Entity
KEY StatryRptRunID SalesTaxEntry StatryRptRunID Report Run ID
KEY Ledger SalesTaxEntry Ledger Ledger
OriginalReferenceDocument SalesTaxEntry OriginalReferenceDocument Reference Key
PE_CompanyCodeTaxNumber
CalendarYearMonth
DocumentDate SalesTaxEntry DocumentDate Journal Entry Date
DocumentNetDueDate SalesTaxEntry DocumentNetDueDate
TaxNumberTypeendasTaxNumberType
TaxNumber1endasTaxNumber1
CountryCurrency
TransactionCurrency SalesTaxEntry TransactionCurrency Transaction Currency
ReportingCurrency SalesTaxEntry ReportingCurrency Currency
PE_OriginalDocumentDate SalesTaxEntry PE_OriginalDocumentDate
ExchangeRateDate SalesTaxEntry ExchangeRateDate Translatn Date
ExchangeRate SalesTaxEntry ExchangeRate Exchange rate
FiscalPeriod SalesTaxEntry FiscalPeriod Tax period
ReportingDate SalesTaxEntry ReportingDate
PE_ExportAmountInCtryCrcy SalesTaxEntry PE_ExportAmountInCtryCrcy
PE_TaxableBaseAmountInCtryCrcy SalesTaxEntry PE_TaxableBaseAmountInCtryCrcy
PE_DiscountBaseAmtInCtryCrcy SalesTaxEntry PE_DiscountBaseAmtInCtryCrcy
PE_VATAmountInCtryCrcy SalesTaxEntry PE_VATAmountInCtryCrcy
PE_VATDiscountAmountInCtryCrcy SalesTaxEntry PE_VATDiscountAmountInCtryCrcy
PE_ExemptTaxAmountInCtryCrcy SalesTaxEntry PE_ExemptTaxAmountInCtryCrcy
PE_SelectiveAcqnAmtInCtryCrcy SalesTaxEntry PE_SelectiveAcqnAmtInCtryCrcy
PE_TxBaseOnRiceAmtInCtryCrcy SalesTaxEntry PE_TxBaseOnRiceAmtInCtryCrcy
PE_TaxOnRiceAmountInCtryCrcy SalesTaxEntry PE_TaxOnRiceAmountInCtryCrcy
PE_TxOnPlasticBagAmtInCtryCrcy SalesTaxEntry PE_TxOnPlasticBagAmtInCtryCrcy
PE_OthTxAndChrgsAmtInCtryCrcy SalesTaxEntry PE_OthTxAndChrgsAmtInCtryCrcy
PE_NonTxblBaseAmtInCtryCrcy SalesTaxEntry PE_NonTxblBaseAmtInCtryCrcy
LogicalSystem
CurrencyExchangeRateAsText
SalesDocument

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 C_PE_StRpSalesLedgerCube.
-- 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: CPESLSLC
-- Parameters: P_ReportingCurrency : glo_reporting_currency, P_TaxConversionIsNotEnabled : fipe_deactivate_currency_conv

CREATE VIEW C_PE_StRpSalesLedgerCube AS
SELECT
  SalesTaxEntry.CompanyCode AS CompanyCode,
  SalesTaxEntry.FiscalYear AS FiscalYear,
  SalesTaxEntry.AccountingDocument AS AccountingDocument,
  SalesTaxEntry.StatryRptCategory AS StatryRptCategory,
  SalesTaxEntry.StatryRptgEntity AS StatryRptgEntity,
  SalesTaxEntry.StatryRptRunID AS StatryRptRunID,
  SalesTaxEntry.Ledger AS Ledger,
  SalesTaxEntry.OriginalReferenceDocument AS OriginalReferenceDocument,
  cast( CompanyCodeInfo.CompanyCodeParameterValue as fipe_company_code_tax_number ) AS PE_CompanyCodeTaxNumber,
  cast( substring(SalesTaxEntry.ReportingDate,1,6 ) as vdm_yearmonth ) AS CalendarYearMonth,
  SalesTaxEntry.DocumentDate AS DocumentDate,
  SalesTaxEntry.DocumentNetDueDate AS DocumentNetDueDate,
  case when SalesTaxEntry.IsReversed = 'X' then '' when OneTimeAccountBP.AccountingDocument is not null then OneTimeAccountBP.TaxNumberType else Customer.TaxNumberType end as TaxNumberType AS TaxNumberTypeendasTaxNumberType,
  case when SalesTaxEntry.IsReversed = 'X' then '' when OneTimeAccountBP.AccountingDocument is not null then OneTimeAccountBP.TaxID1 else Customer.TaxNumber1 end as TaxNumber1 AS TaxNumber1endasTaxNumber1,
  cast( Country.CountryCurrency as glo_country_currency preserving type ) AS CountryCurrency,
  SalesTaxEntry.TransactionCurrency AS TransactionCurrency,
  SalesTaxEntry.ReportingCurrency AS ReportingCurrency,
  SalesTaxEntry.PE_OriginalDocumentDate AS PE_OriginalDocumentDate,
  SalesTaxEntry.ExchangeRateDate AS ExchangeRateDate,
  SalesTaxEntry.ExchangeRate AS ExchangeRate,
  SalesTaxEntry.FiscalPeriod AS FiscalPeriod,
  SalesTaxEntry.ReportingDate AS ReportingDate,
  SalesTaxEntry.PE_ExportAmountInCtryCrcy AS PE_ExportAmountInCtryCrcy,
  SalesTaxEntry.PE_TaxableBaseAmountInCtryCrcy AS PE_TaxableBaseAmountInCtryCrcy,
  SalesTaxEntry.PE_DiscountBaseAmtInCtryCrcy AS PE_DiscountBaseAmtInCtryCrcy,
  SalesTaxEntry.PE_VATAmountInCtryCrcy AS PE_VATAmountInCtryCrcy,
  SalesTaxEntry.PE_VATDiscountAmountInCtryCrcy AS PE_VATDiscountAmountInCtryCrcy,
  SalesTaxEntry.PE_ExemptTaxAmountInCtryCrcy AS PE_ExemptTaxAmountInCtryCrcy,
  SalesTaxEntry.PE_SelectiveAcqnAmtInCtryCrcy AS PE_SelectiveAcqnAmtInCtryCrcy,
  SalesTaxEntry.PE_TxBaseOnRiceAmtInCtryCrcy AS PE_TxBaseOnRiceAmtInCtryCrcy,
  SalesTaxEntry.PE_TaxOnRiceAmountInCtryCrcy AS PE_TaxOnRiceAmountInCtryCrcy,
  SalesTaxEntry.PE_TxOnPlasticBagAmtInCtryCrcy AS PE_TxOnPlasticBagAmtInCtryCrcy,
  SalesTaxEntry.PE_OthTxAndChrgsAmtInCtryCrcy AS PE_OthTxAndChrgsAmtInCtryCrcy,
  SalesTaxEntry.PE_NonTxblBaseAmtInCtryCrcy AS PE_NonTxblBaseAmtInCtryCrcy,
  cast( '' as logsystem ) AS LogicalSystem,
  cast( '' as fipe_exchange_rate_text ) AS CurrencyExchangeRateAsText,
  cast( '' as fins_cfin_av_sales_document) AS SalesDocument
FROM P_PE_SalesTaxAggrgd
INNER JOIN I_CompanyCode AS CompanyCode ON /* join condition not captured in parsed metadata */
INNER JOIN I_Country AS Country ON /* join condition not captured in parsed metadata */
INNER JOIN I_AddlCompanyCodeInformation AS CompanyCodeInfo ON /* join condition not captured in parsed metadata */
;