P_RU_InvoiceJournal1

DDL: P_RU_INVOICEJOURNAL1 SQL: PRUINVCJRNL1 Type: view CONSUMPTION

P_RU_InvoiceJournal1 is a Consumption CDS View in SAP S/4HANA. It reads from 1 data source (I_RU_StRpJournalEntryLog) and exposes 31 fields. It has 1 association to related views.

Data Sources (1)

SourceAliasJoin Type
I_RU_StRpJournalEntryLog Main from

Parameters (3)

NameTypeDefault
P_StatryRptgEntity srf_reporting_entity
P_StatryRptCategory srf_rep_cat_id
P_StatryRptRunID srf_report_run_id

Associations (1)

CardinalityTargetAliasCondition
[0..1] P_RU_NonTaxableTaxCode _NonTaxableTaxCode _NonTaxableTaxCode.TaxCode = VatSPLedgerCust.TaxCode

Annotations (6)

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

Fields (31)

KeyFieldSource TableSource FieldDescription
CompanyCode AccountingDocument CompanyCode Receiver Company Code
AccountingDocument AccountingDocument AccountingDocument Journal Entry
AccountingDocumentType AccountingDocument AccountingDocumentType Journal Entry Type
FiscalYear AccountingDocument FiscalYear G/L Fiscal Year
PostingDate AccountingDocument PostingDate Posting Date for GR
CompanyCodeCurrency AccountingDocument CompanyCodeCurrency Local Currency
Currency AccountingDocument Currency Valuation Crcy
TaxReportingDate AccountingDocument TaxReportingDate Tax Reporting Date
TaxCode TaxItem TaxCode Tax Code
TaxRate TaxItem TaxRate Tax Rate
DebitCreditCode TaxItem DebitCreditCode Single-Character Flag
TaxBaseAmountInTransCrcy TaxItem TaxBaseAmountInTransCrcy Value-Added Tax
TaxAmount TaxItem TaxAmount Tax Amt in Rptg Crcy
TaxBaseAmountInCoCodeCrcy TaxItem TaxBaseAmountInCoCodeCrcy TxBaseAmt CoCodeCrcy
TaxAmountInCoCodeCrcy TaxItem TaxAmountInCoCodeCrcy Tax Amount in Company Code Currency
RU_VATSubScenario VatSPLedgerCust RU_VATSubScenario Subscenario
RU_VATScenario VatSPLedgerCust RU_VATScenario VAT Scenario
RU_VATReturnSection VatSPLedgerCust RU_VATReturnSection VAT Return Section
RU_VATReturnSectionType VatSPLedgerCust RU_VATReturnSectionType Section Type
RU_VATSubScenarioVersion VatSPLedgerCust RU_VATSubScenarioVersion Subscenario Version
RU_VATReturnVersion VatSPLedgerCust RU_VATReturnVersion VAT Return Version
RU_CustomerOutputType VatSPLedgerCust RU_CustomerOutputType
RU_SupplierAgentOutputType VatSPLedgerCust RU_SupplierAgentOutputType
RU_SupplierOutputType VatSPLedgerCust RU_SupplierOutputType
RU_SubagentOutputType VatSPLedgerCust RU_SubagentOutputType
SalesDealType VatSPLedgerCust SalesDealType Deal Type
RU_OrgOperationType VatSPLedgerCust RU_OrgOperationType
RU_PersonOperationType VatSPLedgerCust RU_PersonOperationType
IsCorrectionInvoice VatSPLedgerCust IsCorrectionInvoice
RevisionNumber I_RU_StRpJournalEntryLog RevisionNumber Revision Number
ActionRuleIsGenerated

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_InvoiceJournal1.
-- 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: PRUINVCJRNL1
-- Parameters: P_StatryRptgEntity : srf_reporting_entity, P_StatryRptCategory : srf_rep_cat_id, P_StatryRptRunID : srf_report_run_id

CREATE VIEW P_RU_InvoiceJournal1 AS
SELECT
  AccountingDocument.CompanyCode AS CompanyCode,
  AccountingDocument.AccountingDocument AS AccountingDocument,
  AccountingDocument.AccountingDocumentType AS AccountingDocumentType,
  AccountingDocument.FiscalYear AS FiscalYear,
  AccountingDocument.PostingDate AS PostingDate,
  AccountingDocument.CompanyCodeCurrency AS CompanyCodeCurrency,
  AccountingDocument.Currency AS Currency,
  AccountingDocument.TaxReportingDate AS TaxReportingDate,
  TaxItem.TaxCode AS TaxCode,
  TaxItem.TaxRate AS TaxRate,
  TaxItem.DebitCreditCode AS DebitCreditCode,
  TaxItem.TaxBaseAmountInTransCrcy AS TaxBaseAmountInTransCrcy,
  TaxItem.TaxAmount AS TaxAmount,
  TaxItem.TaxBaseAmountInCoCodeCrcy AS TaxBaseAmountInCoCodeCrcy,
  TaxItem.TaxAmountInCoCodeCrcy AS TaxAmountInCoCodeCrcy,
  VatSPLedgerCust.RU_VATSubScenario AS RU_VATSubScenario,
  VatSPLedgerCust.RU_VATScenario AS RU_VATScenario,
  VatSPLedgerCust.RU_VATReturnSection AS RU_VATReturnSection,
  VatSPLedgerCust.RU_VATReturnSectionType AS RU_VATReturnSectionType,
  VatSPLedgerCust.RU_VATSubScenarioVersion AS RU_VATSubScenarioVersion,
  VatSPLedgerCust.RU_VATReturnVersion AS RU_VATReturnVersion,
  VatSPLedgerCust.RU_CustomerOutputType AS RU_CustomerOutputType,
  VatSPLedgerCust.RU_SupplierAgentOutputType AS RU_SupplierAgentOutputType,
  VatSPLedgerCust.RU_SupplierOutputType AS RU_SupplierOutputType,
  VatSPLedgerCust.RU_SubagentOutputType AS RU_SubagentOutputType,
  VatSPLedgerCust.SalesDealType AS SalesDealType,
  VatSPLedgerCust.RU_OrgOperationType AS RU_OrgOperationType,
  VatSPLedgerCust.RU_PersonOperationType AS RU_PersonOperationType,
  VatSPLedgerCust.IsCorrectionInvoice AS IsCorrectionInvoice,
  Main.RevisionNumber AS RevisionNumber,
  '0' AS ActionRuleIsGenerated
FROM I_RU_StRpJournalEntryLog AS Main
LEFT OUTER JOIN P_RU_NonTaxableTaxCode AS _NonTaxableTaxCode ON _NonTaxableTaxCode.TaxCode = VatSPLedgerCust.TaxCode  -- association [0..1]
;