P_RO_SAFTPaymnetItemNew

DDL: P_RO_SAFTPAYMNETITEMNEW SQL: PROSAFTPAYITEMN Type: view CONSUMPTION

SAFT RO Payment Item

P_RO_SAFTPaymnetItemNew is a Consumption CDS View that provides data about "SAFT RO Payment Item" in SAP S/4HANA. It reads from 4 data sources (I_OperationalAcctgDocItem, I_StRpJournalEntryHeaderLog, P_RO_SAFTJournalEntryItemExc, I_RO_SAFTPaymentMethod) and exposes 49 fields with key fields StatryRptCategory, StatryRptgEntity, StatryRptRunID, SourceLedger, CompanyCode.

Data Sources (4)

SourceAliasJoin Type
I_OperationalAcctgDocItem Bseg inner
I_StRpJournalEntryHeaderLog Log from
P_RO_SAFTJournalEntryItemExc P_RO_SAFTJournalEntryItemExc inner
I_RO_SAFTPaymentMethod PaymentMethod inner

Parameters (1)

NameTypeDefault
P_AlternativeGLAccountIsUsed saft_ro_alt_gl_account_flag

Annotations (12)

NameValueLevelField
AbapCatalog.sqlViewName PROSAFTPAYITEMN view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
VDM.viewType #CONSUMPTION view
VDM.private true view
ObjectModel.usageType.serviceQuality #X view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.dataClass #MIXED view
ClientHandling.algorithm #SESSION_VARIABLE view
AccessControl.personalData.blocking #NOT_REQUIRED view
AccessControl.authorizationCheck #NOT_REQUIRED view
EndUserText.label SAFT RO Payment Item view

Fields (49)

KeyFieldSource TableSource FieldDescription
KEY StatryRptCategory I_StRpJournalEntryHeaderLog StatryRptCategory Report ID
KEY StatryRptgEntity I_StRpJournalEntryHeaderLog StatryRptgEntity Reporting Entity
KEY StatryRptRunID I_StRpJournalEntryHeaderLog StatryRptRunID Report Run ID
KEY SourceLedger Item SourceLedger Source Ledger
KEY CompanyCode Item CompanyCode Receiver Company Code
KEY FiscalYear Item FiscalYear G/L Fiscal Year
KEY AccountingDocument Item AccountingDocument Journal Entry
KEY LedgerGLLineItem Item LedgerGLLineItem Journal Entry Item
KEY Ledger Item Ledger Ledger
AccountingDocumentItem Item AccountingDocumentItem Posting View Item
Customer Item Customer Sold-to Party
Supplier Item Supplier Supplier
DebitCreditCode Item DebitCreditCode Single-Character Flag
DebitCreditCodeIsChanged
TaxCode Item TaxCode Tax Code
TaxCountry Item TaxCountry Tax Ctry/Reg.
ActiveChartOfAccounts Item ActiveChartOfAccounts
ActiveGLAccount Item ActiveGLAccount
GLAccount Item GLAccount General Ledger
ChartOfAccounts Item ChartOfAccounts Node Class
AlternativeGLAccount Item AlternativeGLAccount Group Account
CountryChartOfAccounts Item CountryChartOfAccounts Chart of Accts
GLAccountType Item GLAccountType G/L Account Type
PostingDate Item PostingDate Posting Date for GR
DocumentDate Item DocumentDate Journal Entry Date
AccountingDocCreatedByUser Item AccountingDocCreatedByUser User which created overhead document
AccountingDocumentType Item AccountingDocumentType Journal Entry Type
ValueDate Item ValueDate Value Date
DocumentItemTextendasDocumentItemText
BaseUnit Item BaseUnit Unit of Measure
ControllingArea Item ControllingArea Controlling Area
ProfitCenter Item ProfitCenter Profit Center
Segment Item Segment Segment number
CostCenter Item CostCenter Cost Center
OrderID Item OrderID Order ID
_Order Item _Order
WBSElement Item WBSElement WBS Internal ID
WBSElementInternalID Item WBSElementInternalID WBS Internal ID
TransactionTypeDetermination Item TransactionTypeDetermination Transaction Key
CompanyCodeCurrency Item CompanyCodeCurrency Local Currency
TransactionCurrency Item TransactionCurrency Transaction Currency
TaxType
RO_SAFTStandardAccount Item RO_SAFTStandardAccount
LogicalSystem Item LogicalSystem Logical System
VATRegistrationendasCustomerTaxID5
VATRegistrationendasSupplierTaxID5
RO_SAFTPaymentMethod I_RO_SAFTPaymentMethod RO_SAFTPaymentMethod Payment Method
FiscalPeriod
TaxReportingDate

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_RO_SAFTPaymnetItemNew.
-- 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: PROSAFTPAYITEMN
-- Parameters: P_AlternativeGLAccountIsUsed : saft_ro_alt_gl_account_flag

CREATE VIEW P_RO_SAFTPaymnetItemNew AS
SELECT
  Log.StatryRptCategory AS StatryRptCategory,
  Log.StatryRptgEntity AS StatryRptgEntity,
  Log.StatryRptRunID AS StatryRptRunID,
  Item.SourceLedger AS SourceLedger,
  Item.CompanyCode AS CompanyCode,
  Item.FiscalYear AS FiscalYear,
  Item.AccountingDocument AS AccountingDocument,
  Item.LedgerGLLineItem AS LedgerGLLineItem,
  Item.Ledger AS Ledger,
  Item.AccountingDocumentItem AS AccountingDocumentItem,
  Item.Customer AS Customer,
  Item.Supplier AS Supplier,
  Item.DebitCreditCode AS DebitCreditCode,
  coalesce(PayMapNoGL.DebitCreditCodeIsChanged, PayMapGL.DebitCreditCodeIsChanged) AS DebitCreditCodeIsChanged,
  Item.TaxCode AS TaxCode,
  Item.TaxCountry AS TaxCountry,
  Item.ActiveChartOfAccounts AS ActiveChartOfAccounts,
  Item.ActiveGLAccount AS ActiveGLAccount,
  Item.GLAccount AS GLAccount,
  Item.ChartOfAccounts AS ChartOfAccounts,
  Item.AlternativeGLAccount AS AlternativeGLAccount,
  Item.CountryChartOfAccounts AS CountryChartOfAccounts,
  Item.GLAccountType AS GLAccountType,
  Item.PostingDate AS PostingDate,
  Item.DocumentDate AS DocumentDate,
  Item.AccountingDocCreatedByUser AS AccountingDocCreatedByUser,
  Item.AccountingDocumentType AS AccountingDocumentType,
  Item.ValueDate AS ValueDate,
  case Item.DocumentItemText when '' then 'N.A' else Item.DocumentItemText end as DocumentItemText AS DocumentItemTextendasDocumentItemText,
  Item.BaseUnit AS BaseUnit,
  Item.ControllingArea AS ControllingArea,
  Item.ProfitCenter AS ProfitCenter,
  Item.Segment AS Segment,
  Item.CostCenter AS CostCenter,
  Item.OrderID AS OrderID,
  Item._Order AS _Order,
  Item.WBSElement AS WBSElement,
  Item.WBSElementInternalID AS WBSElementInternalID,
  Item.TransactionTypeDetermination AS TransactionTypeDetermination,
  Item.CompanyCodeCurrency AS CompanyCodeCurrency,
  Item.TransactionCurrency AS TransactionCurrency,
  '' AS TaxType,
  Item.RO_SAFTStandardAccount AS RO_SAFTStandardAccount,
  Item.LogicalSystem AS LogicalSystem,
  case when Item.Customer <> '' and Bseg.VATRegistration <> '' and BsegStcegCountry.IsEuropeanUnionMember = 'X' then case when BsegStcegCountry.Country = 'RO' then replace(Bseg.VATRegistration, 'RO', '00') else cast(concat('01', Bseg.VATRegistration) as bptaxnumxl) end when Item.Customer = '' or CustomerTaxType.BPTaxLongNumber = 'EXCLUDE' then '0' when CustomerTaxType.BPTaxLongNumber <> '0' then CustomerTaxType.BPTaxLongNumber else OTC.VATRegistration end as CustomerTaxID5 AS VATRegistrationendasCustomerTaxID5,
  case when Item.Supplier <> '' and Bseg.VATRegistration <> '' and BsegStcegCountry.IsEuropeanUnionMember = 'X' then case when BsegStcegCountry.Country = 'RO' then replace(Bseg.VATRegistration, 'RO', '00') else cast(concat('01', Bseg.VATRegistration) as bptaxnumxl) end when Item.Supplier = '' or SupplierTaxType.BPTaxLongNumber = 'EXCLUDE' then '0' when SupplierTaxType.BPTaxLongNumber <> '0' then SupplierTaxType.BPTaxLongNumber else OTS.VATRegistration end as SupplierTaxID5 AS VATRegistrationendasSupplierTaxID5,
  PaymentMethod.RO_SAFTPaymentMethod AS RO_SAFTPaymentMethod,
  Item._JournalEntry.FiscalPeriod AS FiscalPeriod,
  Item._JournalEntry.TaxReportingDate AS TaxReportingDate
FROM I_StRpJournalEntryHeaderLog AS Log
INNER JOIN P_RO_SAFTJournalEntryItemExc ON /* join condition not captured in parsed metadata */
INNER JOIN I_OperationalAcctgDocItem AS Bseg ON /* join condition not captured in parsed metadata */
INNER JOIN I_RO_SAFTPaymentMethod AS PaymentMethod ON /* join condition not captured in parsed metadata */
;