P_StRpTrialBalanceItem2

DDL: P_STRPTRIALBALANCEITEM2 SQL: PTRIALBALITEM2 Type: view COMPOSITE

P_StRpTrialBalanceItem2 is a Composite CDS View in SAP S/4HANA. It reads from 1 data source (P_StRpTrialBalanceItem1) and exposes 96 fields with key fields Ledger, CompanyCode, FiscalYear, SourceLedger, AccountingDocument.

Data Sources (1)

SourceAliasJoin Type
P_StRpTrialBalanceItem1 P_StRpTrialBalanceItem1 from

Parameters (4)

NameTypeDefault
P_FromPostingDate fis_budat_from
P_ToPostingDate fis_budat_to
P_FromFiscalPeriod fis_period_from
P_ToFiscalPeriod fis_period_to

Annotations (9)

NameValueLevelField
AbapCatalog.sqlViewName PTRIALBALITEM2 view
AbapCatalog.compiler.compareFilter true view
VDM.viewType #COMPOSITE view
VDM.private true view
AccessControl.authorizationCheck #NOT_REQUIRED view
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.serviceQuality #X view
ObjectModel.usageType.dataClass #MIXED view

Fields (96)

KeyFieldSource TableSource FieldDescription
KEY Ledger Ledger Ledger
KEY CompanyCode CompanyCode Receiver Company Code
KEY FiscalYear FiscalYear G/L Fiscal Year
KEY SourceLedger SourceLedger Source Ledger
KEY AccountingDocument AccountingDocument Journal Entry
KEY LedgerGLLineItem LedgerGLLineItem Journal Entry Item
AccountingDocumentItem AccountingDocumentItem Posting View Item
FiscalPeriod FiscalPeriod Tax period
PostingDate PostingDate Posting Date for GR
DocumentDate DocumentDate Journal Entry Date
FiscalYearVariant FiscalYearVariant FY Variant
LedgerFiscalYear LedgerFiscalYear
IsReversal IsReversal Reversal doc.
IsReversed IsReversed Reversed?
ProfitCenter ProfitCenter Profit Center
FunctionalArea FunctionalArea Sendr Fctl Area
BusinessArea BusinessArea Business Area
ControllingArea ControllingArea Controlling Area
Segment Segment Segment number
ChartOfAccounts ChartOfAccounts Node Class
AlternativeGLAccount AlternativeGLAccount Group Account
CountryChartOfAccounts CountryChartOfAccounts Chart of Accts
GLAccount GLAccount General Ledger
ReconciliationAccountType ReconciliationAccountType Reconcil. ID
Supplier Supplier Supplier
Customer Customer Sold-to Party
FinancialAccountType FinancialAccountType Fin. Account Type
SpecialGLCode SpecialGLCode Special G/L Ind
AccountingDocumentType AccountingDocumentType Journal Entry Type
PostingKey PostingKey Posting Key
AccountingDocumentCategory AccountingDocumentCategory Journal Entry Category
AccountingDocCreatedByUser AccountingDocCreatedByUser User which created overhead document
DebitCreditCode DebitCreditCode Single-Character Flag
CashJournalItemType CashJournalItemType
ItemType ItemType Object Type
AssignmentReference AssignmentReference Assignment Reference
DocumentItemText DocumentItemText Text
TaxCode TaxCode Tax Code
JrnlEntryItemMigrationSource JrnlEntryItemMigrationSource
ReferenceDocument ReferenceDocument Reference Document
OffsettingAccount OffsettingAccount Offsetting Acct
OffsettingAccountType OffsettingAccountType Offset Acct Type
char1endendasIsSelected
CompanyCodeCurrency CompanyCodeCurrency Local Currency
TransactionCurrency TransactionCurrency Transaction Currency
BalanceTransactionCurrency BalanceTransactionCurrency Currency
GlobalCurrency GlobalCurrency GM Billing Element: Global Currency
curr232endendendasAmountInGlobalCurrency
FreeDefinedCurrency1 FreeDefinedCurrency1 Freely Defined Currency 1
FreeDefinedCurrency2 FreeDefinedCurrency2 Freely Defined Currency 2
FreeDefinedCurrency3 FreeDefinedCurrency3 Freely Defined Currency 3
FreeDefinedCurrency4 FreeDefinedCurrency4 Freely Defined Currency 4
FreeDefinedCurrency5 FreeDefinedCurrency5 Freely Defined Currency 5
FreeDefinedCurrency6 FreeDefinedCurrency6 Freely Defined Currency 6
FreeDefinedCurrency7 FreeDefinedCurrency7 Freely Defined Currency 7
FreeDefinedCurrency8 FreeDefinedCurrency8 Freely Defined Currency 8
_Supplier _Supplier
_Customer _Customer
_GLAccountText _GLAccountText
_GLAccountInChartOfAccounts _GLAccountInChartOfAccounts
_ProfitCenter _ProfitCenter
_FunctionalArea _FunctionalArea
_BusinessArea _BusinessArea
_Segment _Segment
_AlternativeGLAccount _AlternativeGLAccount
_ControllingArea _ControllingArea
_CountryChartOfAccounts _CountryChartOfAccounts
_ChartOfAccounts _ChartOfAccounts
_GLAccountInCompanyCode _GLAccountInCompanyCode
_Ledger _Ledger
_CompanyCode _CompanyCode
_AccountingDocumentType _AccountingDocumentType
_FiscalYear _FiscalYear
_SourceLedger _SourceLedger
_FiscalPeriodForVariant _FiscalPeriodForVariant
_FiscalYearVariant _FiscalYearVariant
_LedgerFiscalYearForVariant _LedgerFiscalYearForVariant
_FinancialAccountType _FinancialAccountType
_PostingKey _PostingKey
_SpecialGLCode _SpecialGLCode
_AccountingDocumentCategory _AccountingDocumentCategory
_DebitCreditCode _DebitCreditCode
_TaxCode _TaxCode
_CompanyCodeCurrency _CompanyCodeCurrency
_TransactionCurrency _TransactionCurrency
_BalanceTransactionCurrency _BalanceTransactionCurrency
_GlobalCurrency _GlobalCurrency
_FreeDefinedCurrency1 _FreeDefinedCurrency1
_FreeDefinedCurrency2 _FreeDefinedCurrency2
_FreeDefinedCurrency3 _FreeDefinedCurrency3
_FreeDefinedCurrency4 _FreeDefinedCurrency4
_FreeDefinedCurrency5 _FreeDefinedCurrency5
_FreeDefinedCurrency6 _FreeDefinedCurrency6
_FreeDefinedCurrency7 _FreeDefinedCurrency7
_FreeDefinedCurrency8 _FreeDefinedCurrency8
_JournalEntry _JournalEntry

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_StRpTrialBalanceItem2.
-- 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: PTRIALBALITEM2
-- Parameters: P_FromPostingDate : fis_budat_from, P_ToPostingDate : fis_budat_to, P_FromFiscalPeriod : fis_period_from, P_ToFiscalPeriod : fis_period_to

CREATE VIEW P_StRpTrialBalanceItem2 AS
SELECT
  Ledger,
  CompanyCode,
  FiscalYear,
  SourceLedger,
  AccountingDocument,
  LedgerGLLineItem,
  AccountingDocumentItem,
  FiscalPeriod,
  PostingDate,
  DocumentDate,
  FiscalYearVariant,
  LedgerFiscalYear,
  IsReversal,
  IsReversed,
  ProfitCenter,
  FunctionalArea,
  BusinessArea,
  ControllingArea,
  Segment,
  ChartOfAccounts,
  AlternativeGLAccount,
  CountryChartOfAccounts,
  GLAccount,
  ReconciliationAccountType,
  Supplier,
  Customer,
  FinancialAccountType,
  SpecialGLCode,
  AccountingDocumentType,
  PostingKey,
  AccountingDocumentCategory,
  AccountingDocCreatedByUser,
  DebitCreditCode,
  CashJournalItemType,
  ItemType,
  AssignmentReference,
  DocumentItemText,
  TaxCode,
  JrnlEntryItemMigrationSource,
  ReferenceDocument,
  OffsettingAccount,
  OffsettingAccountType,
  case $parameters.P_FromFiscalPeriod when '000' then 'X' else case when FiscalPeriod <= $parameters.P_ToFiscalPeriod then 'X' else cast( ' ' as abap.char(1)) end end as IsSelected AS char1endendasIsSelected,
  CompanyCodeCurrency,
  TransactionCurrency,
  BalanceTransactionCurrency,
  GlobalCurrency,
  case FiscalPeriod when '000' then cast( '0' as abap.curr( 23,2)) else case $parameters.P_FromFiscalPeriod when '000' then case when PostingDate >= $parameters.P_FromPostingDate and PostingDate <= $parameters.P_ToPostingDate then AmountInGlobalCurrency else cast( '0' as abap.curr( 23,2)) end else case when FiscalPeriod >= $parameters.P_FromFiscalPeriod and FiscalPeriod <= $parameters.P_ToFiscalPeriod then AmountInGlobalCurrency else cast( '0' as abap.curr( 23,2)) end end end as AmountInGlobalCurrency AS curr232endendendasAmountInGlobalCurrency,
  FreeDefinedCurrency1,
  FreeDefinedCurrency2,
  FreeDefinedCurrency3,
  FreeDefinedCurrency4,
  FreeDefinedCurrency5,
  FreeDefinedCurrency6,
  FreeDefinedCurrency7,
  FreeDefinedCurrency8
FROM P_StRpTrialBalanceItem1
;