P_RU_VATSPLedgersJournal2

DDL: P_RU_VATSPLEDGERSJOURNAL2 SQL: PRUVATSPLDJ2 Type: view CONSUMPTION

P_RU_VATSPLedgersJournal2 is a Consumption CDS View in SAP S/4HANA. It reads from 1 data source (P_RU_VATSPLedgersJournal1) and exposes 89 fields.

Data Sources (1)

SourceAliasJoin Type
P_RU_VATSPLedgersJournal1 VatSPLedgerJournal from

Annotations (6)

NameValueLevelField
VDM.private true view
VDM.viewType #CONSUMPTION view
AbapCatalog.sqlViewName PRUVATSPLDJ2 view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #NOT_REQUIRED view
ClientHandling.algorithm #SESSION_VARIABLE view

Fields (89)

KeyFieldSource TableSource FieldDescription
CompanyCode P_RU_VATSPLedgersJournal1 CompanyCode Receiver Company Code
AccountingDocument P_RU_VATSPLedgersJournal1 AccountingDocument Journal Entry
FiscalYear P_RU_VATSPLedgersJournal1 FiscalYear G/L Fiscal Year
TaxItem P_RU_VATSPLedgersJournal1 TaxItem Tax Item
PostingDate P_RU_VATSPLedgersJournal1 PostingDate Posting Date for GR
TaxReportingDate P_RU_VATSPLedgersJournal1 TaxReportingDate Tax Reporting Date
DocumentDate P_RU_VATSPLedgersJournal1 DocumentDate Journal Entry Date
AccountingDocumentType P_RU_VATSPLedgersJournal1 AccountingDocumentType Journal Entry Type
IsReversal P_RU_VATSPLedgersJournal1 IsReversal Reversal doc.
IsReversed P_RU_VATSPLedgersJournal1 IsReversed Reversed?
OriginalReferenceDocument P_RU_VATSPLedgersJournal1 OriginalReferenceDocument Reference Key
ReferenceDocumentType P_RU_VATSPLedgersJournal1 ReferenceDocumentType Reference Document Type
BusinessTransactionType P_RU_VATSPLedgersJournal1 BusinessTransactionType Bus.transaction
SenderLogicalSystem P_RU_VATSPLedgersJournal1 SenderLogicalSystem Sender Logical System
TaxCode P_RU_VATSPLedgersJournal1 TaxCode Tax Code
TaxRate P_RU_VATSPLedgersJournal1 TaxRate Tax Rate
CompanyCodeCurrency P_RU_VATSPLedgersJournal1 CompanyCodeCurrency Local Currency
Currency P_RU_VATSPLedgersJournal1 Currency Valuation Crcy
AmountInCompanyCodeCurrency P_RU_VATSPLedgersJournal1 AmountInCompanyCodeCurrency Local Crcy Amt
TaxBaseAmountInCoCodeCrcy P_RU_VATSPLedgersJournal1 TaxBaseAmountInCoCodeCrcy TxBaseAmt CoCodeCrcy
TaxAmountInCoCodeCrcy P_RU_VATSPLedgersJournal1 TaxAmountInCoCodeCrcy Tax Amount in Company Code Currency
AmountInTransactionCurrency P_RU_VATSPLedgersJournal1 AmountInTransactionCurrency Pt Crcy Amt
TaxBaseAmountInTransCrcy P_RU_VATSPLedgersJournal1 TaxBaseAmountInTransCrcy Value-Added Tax
TaxAmount P_RU_VATSPLedgersJournal1 TaxAmount Tax Amt in Rptg Crcy
DebitCreditCode P_RU_VATSPLedgersJournal1 DebitCreditCode Single-Character Flag
Sign P_RU_VATSPLedgersJournal1 Sign Type of SIGN component in row type of a Ranges type
Invoice P_RU_VATSPLedgersJournal1 Invoice Orig.Inv.Number
InvoiceYear P_RU_VATSPLedgersJournal1 InvoiceYear Orig.Inv.Year
ExternalInvoice
InvoiceDate
CorrectionInvoice P_RU_VATSPLedgersJournal1 CorrectionInvoice Corr.Inv.Number
CorrectionInvoiceYear P_RU_VATSPLedgersJournal1 CorrectionInvoiceYear Corr.Inv.Year
ExternalCorrectionInvoice
RevisionInvoice P_RU_VATSPLedgersJournal1 RevisionInvoice Rev.Inv.Number
RevisionInvoiceDate P_RU_VATSPLedgersJournal1 RevisionInvoiceDate
RevisionInvoiceYear P_RU_VATSPLedgersJournal1 RevisionInvoiceYear Rev.Inv.Year
CorRev_CompanyCodeName P_RU_VATSPLedgersJournal1 CorRev_CompanyCodeName Company Name
CorRev_CompanyCodeINN P_RU_VATSPLedgersJournal1 CorRev_CompanyCodeINN
CorRev_CompanyCodeKPP P_RU_VATSPLedgersJournal1 CorRev_CompanyCodeKPP
CorRev_BusinessPartnerName P_RU_VATSPLedgersJournal1 CorRev_BusinessPartnerName Extracted Customer Name
CorRev_BusinessPartnerINN P_RU_VATSPLedgersJournal1 CorRev_BusinessPartnerINN BP INN
CorRev_BusinessPartnerKPP P_RU_VATSPLedgersJournal1 CorRev_BusinessPartnerKPP BP KPP
CorRev_BusinessPartnerIsOrg P_RU_VATSPLedgersJournal1 CorRev_BusinessPartnerIsOrg
CorRev_BusinessPartnerIsNP P_RU_VATSPLedgersJournal1 CorRev_BusinessPartnerIsNP
CorRev_SupplierName P_RU_VATSPLedgersJournal1 CorRev_SupplierName Supplier Name
CorRev_SupplierINN P_RU_VATSPLedgersJournal1 CorRev_SupplierINN
CorRev_SupplierKPP P_RU_VATSPLedgersJournal1 CorRev_SupplierKPP Seller KPP
CorRev_SupplierIsOrg P_RU_VATSPLedgersJournal1 CorRev_SupplierIsOrg
CorRev_SupplierIsNP P_RU_VATSPLedgersJournal1 CorRev_SupplierIsNP
CorRev_CommisTradeSupplierName P_RU_VATSPLedgersJournal1 CorRev_CommisTradeSupplierName
CorRev_CommisTradeSupplierINN P_RU_VATSPLedgersJournal1 CorRev_CommisTradeSupplierINN
CorRev_CommisTradeSupplierKPP P_RU_VATSPLedgersJournal1 CorRev_CommisTradeSupplierKPP
CorRev_CommisTradeSupplIsOrg P_RU_VATSPLedgersJournal1 CorRev_CommisTradeSupplIsOrg
CorRev_CommisTradeSupplIsNP P_RU_VATSPLedgersJournal1 CorRev_CommisTradeSupplIsNP
CorRev_CommisTradeCustomerName P_RU_VATSPLedgersJournal1 CorRev_CommisTradeCustomerName
CorRev_CommisTradeCustomerINN P_RU_VATSPLedgersJournal1 CorRev_CommisTradeCustomerINN
CorRev_CommisTradeCustomerKPP P_RU_VATSPLedgersJournal1 CorRev_CommisTradeCustomerKPP
CorRev_CommisTradeCustIsOrg P_RU_VATSPLedgersJournal1 CorRev_CommisTradeCustIsOrg
CorRev_CommisTradeCustIsNP P_RU_VATSPLedgersJournal1 CorRev_CommisTradeCustIsNP
LedgerLineSign P_RU_VATSPLedgersJournal1 LedgerLineSign
IsRevisionReversed P_RU_VATSPLedgersJournal1 IsRevisionReversed
IsLastDocumentCorRevChain P_RU_VATSPLedgersJournal1 IsLastDocumentCorRevChain
RU_VATReturnVersion P_RU_VATSPLedgersJournal1 RU_VATReturnVersion VAT Return Version
RU_VATReturnSectionType P_RU_VATSPLedgersJournal1 RU_VATReturnSectionType Section Type
RU_VATReturnSection P_RU_VATSPLedgersJournal1 RU_VATReturnSection VAT Return Section
RU_VATReturnLine P_RU_VATSPLedgersJournal1 RU_VATReturnLine Line
RU_VATSubScenarioVersion P_RU_VATSPLedgersJournal1 RU_VATSubScenarioVersion Subscenario Version
RU_VATSubScenario P_RU_VATSPLedgersJournal1 RU_VATSubScenario Subscenario
RU_VATScenario P_RU_VATSPLedgersJournal1 RU_VATScenario VAT Scenario
RU_TotalAmountCalcType P_RU_VATSPLedgersJournal1 RU_TotalAmountCalcType
RU_TaxBaseAmountCalcType P_RU_VATSPLedgersJournal1 RU_TaxBaseAmountCalcType
BusinessPartnerType P_RU_VATSPLedgersJournal1 BusinessPartnerType Undefined range (can be used for patch levels)
AgentType P_RU_VATSPLedgersJournal1 AgentType
PaymentOrderOutputType P_RU_VATSPLedgersJournal1 PaymentOrderOutputType
ImprtCstmsDeclnIsRead P_RU_VATSPLedgersJournal1 ImprtCstmsDeclnIsRead
MatlRcptDateIsRead P_RU_VATSPLedgersJournal1 MatlRcptDateIsRead
RU_CustomerOutputType P_RU_VATSPLedgersJournal1 RU_CustomerOutputType
RU_SupplierAgentOutputType P_RU_VATSPLedgersJournal1 RU_SupplierAgentOutputType
RU_SupplierOutputType P_RU_VATSPLedgersJournal1 RU_SupplierOutputType
RU_SubagentOutputType P_RU_VATSPLedgersJournal1 RU_SubagentOutputType
SalesDealType P_RU_VATSPLedgersJournal1 SalesDealType Deal Type
RU_OrgOperationType P_RU_VATSPLedgersJournal1 RU_OrgOperationType
RU_PersonOperationType P_RU_VATSPLedgersJournal1 RU_PersonOperationType
SourceDocument P_RU_VATSPLedgersJournal1 SourceDocument Document
SourceDocumentFiscalYear P_RU_VATSPLedgersJournal1 SourceDocumentFiscalYear
RevisionNumber P_RU_VATSPLedgersJournal1 RevisionNumber Revision Number
StatryRptgEntity P_RU_VATSPLedgersJournal1 StatryRptgEntity Reporting Entity
StatryRptCategory P_RU_VATSPLedgersJournal1 StatryRptCategory Report ID
StatryRptRunID P_RU_VATSPLedgersJournal1 StatryRptRunID Report Run ID

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_RU_VATSPLedgersJournal2.
-- 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: PRUVATSPLDJ2

CREATE VIEW P_RU_VATSPLedgersJournal2 AS
SELECT
  VatSPLedgerJournal.CompanyCode AS CompanyCode,
  VatSPLedgerJournal.AccountingDocument AS AccountingDocument,
  VatSPLedgerJournal.FiscalYear AS FiscalYear,
  VatSPLedgerJournal.TaxItem AS TaxItem,
  VatSPLedgerJournal.PostingDate AS PostingDate,
  VatSPLedgerJournal.TaxReportingDate AS TaxReportingDate,
  VatSPLedgerJournal.DocumentDate AS DocumentDate,
  VatSPLedgerJournal.AccountingDocumentType AS AccountingDocumentType,
  VatSPLedgerJournal.IsReversal AS IsReversal,
  VatSPLedgerJournal.IsReversed AS IsReversed,
  VatSPLedgerJournal.OriginalReferenceDocument AS OriginalReferenceDocument,
  VatSPLedgerJournal.ReferenceDocumentType AS ReferenceDocumentType,
  VatSPLedgerJournal.BusinessTransactionType AS BusinessTransactionType,
  VatSPLedgerJournal.SenderLogicalSystem AS SenderLogicalSystem,
  VatSPLedgerJournal.TaxCode AS TaxCode,
  VatSPLedgerJournal.TaxRate AS TaxRate,
  VatSPLedgerJournal.CompanyCodeCurrency AS CompanyCodeCurrency,
  VatSPLedgerJournal.Currency AS Currency,
  VatSPLedgerJournal.AmountInCompanyCodeCurrency AS AmountInCompanyCodeCurrency,
  VatSPLedgerJournal.TaxBaseAmountInCoCodeCrcy AS TaxBaseAmountInCoCodeCrcy,
  VatSPLedgerJournal.TaxAmountInCoCodeCrcy AS TaxAmountInCoCodeCrcy,
  VatSPLedgerJournal.AmountInTransactionCurrency AS AmountInTransactionCurrency,
  VatSPLedgerJournal.TaxBaseAmountInTransCrcy AS TaxBaseAmountInTransCrcy,
  VatSPLedgerJournal.TaxAmount AS TaxAmount,
  VatSPLedgerJournal.DebitCreditCode AS DebitCreditCode,
  VatSPLedgerJournal.Sign AS Sign,
  VatSPLedgerJournal.Invoice AS Invoice,
  VatSPLedgerJournal.InvoiceYear AS InvoiceYear,
  cast(coalesce(VatInvExtraDataInvc.ExternalInvoice, '') as firu_inv_extnum preserving type) AS ExternalInvoice,
  cast(coalesce(VatInvExtraDataInvc.InvoiceDate, '00010101') as firu_inv_extdate preserving type) AS InvoiceDate,
  VatSPLedgerJournal.CorrectionInvoice AS CorrectionInvoice,
  VatSPLedgerJournal.CorrectionInvoiceYear AS CorrectionInvoiceYear,
  cast(coalesce(VatInvExtraDataCorr.ExternalInvoice, '') as j_3rfinv_corre preserving type) AS ExternalCorrectionInvoice,
  VatSPLedgerJournal.RevisionInvoice AS RevisionInvoice,
  VatSPLedgerJournal.RevisionInvoiceDate AS RevisionInvoiceDate,
  VatSPLedgerJournal.RevisionInvoiceYear AS RevisionInvoiceYear,
  VatSPLedgerJournal.CorRev_CompanyCodeName AS CorRev_CompanyCodeName,
  VatSPLedgerJournal.CorRev_CompanyCodeINN AS CorRev_CompanyCodeINN,
  VatSPLedgerJournal.CorRev_CompanyCodeKPP AS CorRev_CompanyCodeKPP,
  VatSPLedgerJournal.CorRev_BusinessPartnerName AS CorRev_BusinessPartnerName,
  VatSPLedgerJournal.CorRev_BusinessPartnerINN AS CorRev_BusinessPartnerINN,
  VatSPLedgerJournal.CorRev_BusinessPartnerKPP AS CorRev_BusinessPartnerKPP,
  VatSPLedgerJournal.CorRev_BusinessPartnerIsOrg AS CorRev_BusinessPartnerIsOrg,
  VatSPLedgerJournal.CorRev_BusinessPartnerIsNP AS CorRev_BusinessPartnerIsNP,
  VatSPLedgerJournal.CorRev_SupplierName AS CorRev_SupplierName,
  VatSPLedgerJournal.CorRev_SupplierINN AS CorRev_SupplierINN,
  VatSPLedgerJournal.CorRev_SupplierKPP AS CorRev_SupplierKPP,
  VatSPLedgerJournal.CorRev_SupplierIsOrg AS CorRev_SupplierIsOrg,
  VatSPLedgerJournal.CorRev_SupplierIsNP AS CorRev_SupplierIsNP,
  VatSPLedgerJournal.CorRev_CommisTradeSupplierName AS CorRev_CommisTradeSupplierName,
  VatSPLedgerJournal.CorRev_CommisTradeSupplierINN AS CorRev_CommisTradeSupplierINN,
  VatSPLedgerJournal.CorRev_CommisTradeSupplierKPP AS CorRev_CommisTradeSupplierKPP,
  VatSPLedgerJournal.CorRev_CommisTradeSupplIsOrg AS CorRev_CommisTradeSupplIsOrg,
  VatSPLedgerJournal.CorRev_CommisTradeSupplIsNP AS CorRev_CommisTradeSupplIsNP,
  VatSPLedgerJournal.CorRev_CommisTradeCustomerName AS CorRev_CommisTradeCustomerName,
  VatSPLedgerJournal.CorRev_CommisTradeCustomerINN AS CorRev_CommisTradeCustomerINN,
  VatSPLedgerJournal.CorRev_CommisTradeCustomerKPP AS CorRev_CommisTradeCustomerKPP,
  VatSPLedgerJournal.CorRev_CommisTradeCustIsOrg AS CorRev_CommisTradeCustIsOrg,
  VatSPLedgerJournal.CorRev_CommisTradeCustIsNP AS CorRev_CommisTradeCustIsNP,
  VatSPLedgerJournal.LedgerLineSign AS LedgerLineSign,
  VatSPLedgerJournal.IsRevisionReversed AS IsRevisionReversed,
  VatSPLedgerJournal.IsLastDocumentCorRevChain AS IsLastDocumentCorRevChain,
  VatSPLedgerJournal.RU_VATReturnVersion AS RU_VATReturnVersion,
  VatSPLedgerJournal.RU_VATReturnSectionType AS RU_VATReturnSectionType,
  VatSPLedgerJournal.RU_VATReturnSection AS RU_VATReturnSection,
  VatSPLedgerJournal.RU_VATReturnLine AS RU_VATReturnLine,
  VatSPLedgerJournal.RU_VATSubScenarioVersion AS RU_VATSubScenarioVersion,
  VatSPLedgerJournal.RU_VATSubScenario AS RU_VATSubScenario,
  VatSPLedgerJournal.RU_VATScenario AS RU_VATScenario,
  VatSPLedgerJournal.RU_TotalAmountCalcType AS RU_TotalAmountCalcType,
  VatSPLedgerJournal.RU_TaxBaseAmountCalcType AS RU_TaxBaseAmountCalcType,
  VatSPLedgerJournal.BusinessPartnerType AS BusinessPartnerType,
  VatSPLedgerJournal.AgentType AS AgentType,
  VatSPLedgerJournal.PaymentOrderOutputType AS PaymentOrderOutputType,
  VatSPLedgerJournal.ImprtCstmsDeclnIsRead AS ImprtCstmsDeclnIsRead,
  VatSPLedgerJournal.MatlRcptDateIsRead AS MatlRcptDateIsRead,
  VatSPLedgerJournal.RU_CustomerOutputType AS RU_CustomerOutputType,
  VatSPLedgerJournal.RU_SupplierAgentOutputType AS RU_SupplierAgentOutputType,
  VatSPLedgerJournal.RU_SupplierOutputType AS RU_SupplierOutputType,
  VatSPLedgerJournal.RU_SubagentOutputType AS RU_SubagentOutputType,
  VatSPLedgerJournal.SalesDealType AS SalesDealType,
  VatSPLedgerJournal.RU_OrgOperationType AS RU_OrgOperationType,
  VatSPLedgerJournal.RU_PersonOperationType AS RU_PersonOperationType,
  VatSPLedgerJournal.SourceDocument AS SourceDocument,
  VatSPLedgerJournal.SourceDocumentFiscalYear AS SourceDocumentFiscalYear,
  VatSPLedgerJournal.RevisionNumber AS RevisionNumber,
  VatSPLedgerJournal.StatryRptgEntity AS StatryRptgEntity,
  VatSPLedgerJournal.StatryRptCategory AS StatryRptCategory,
  VatSPLedgerJournal.StatryRptRunID AS StatryRptRunID
FROM P_RU_VATSPLedgersJournal1 AS VatSPLedgerJournal
;