P_StRpTrialBalanceItem1

DDL: P_STRPTRIALBALANCEITEM1 SQL: PTRIALBALITEM1 Type: view COMPOSITE Package: GLO_FIN_IS_TB_GEN

Trial Balance Line Item

P_StRpTrialBalanceItem1 is a Composite CDS View that provides data about "Trial Balance Line Item" in SAP S/4HANA. It reads from 2 data sources (I_GLAccountLineItem, P_DistinctDatetoFiscalYear) and exposes 106 fields with key fields Ledger, CompanyCode, FiscalYear, SourceLedger, AccountingDocument. Part of development package GLO_FIN_IS_TB_GEN.

Data Sources (2)

SourceAliasJoin Type
I_GLAccountLineItem I_GLAccountLineItem from
P_DistinctDatetoFiscalYear P_DistinctDatetoFiscalYear left_outer

Parameters (2)

NameTypeDefault
P_FromPostingDate fis_budat_from
P_ToPostingDate fis_budat_to

Annotations (9)

NameValueLevelField
AbapCatalog.sqlViewName PTRIALBALITEM1 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 (106)

KeyFieldSource TableSource FieldDescription
KEY Ledger Ledger Ledger
KEY CompanyCode CompanyCode Receiver Company Code
KEY FiscalYear I_GLAccountLineItem 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 I_GLAccountLineItem FiscalPeriod Tax period
FiscalYearVariant FiscalYearVariant FY Variant
LedgerFiscalYear LedgerFiscalYear
PostingDate PostingDate Posting Date for GR
DocumentDate DocumentDate Journal Entry Date
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 _GLAccountInCompanyCode 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
TaxCode TaxCode Tax Code
char1endasCashJournalItemType
char1endasglo_item_typeasItemType
JrnlEntryItemMigrationSource JrnlEntryItemMigrationSource
OffsettingAccount OffsettingAccount Offsetting Acct
OffsettingAccountType OffsettingAccountType Offset Acct Type
CompanyCodeCurrency CompanyCodeCurrency Local Currency
AmountInCompanyCodeCurrency AmountInCompanyCodeCurrency Local Crcy Amt
TransactionCurrency TransactionCurrency Transaction Currency
AmountInTransactionCurrency AmountInTransactionCurrency Pt Crcy Amt
BalanceTransactionCurrency BalanceTransactionCurrency Currency
AmountInBalanceTransacCrcy AmountInBalanceTransacCrcy Amount in Balance Transaction Currency
GlobalCurrency GlobalCurrency GM Billing Element: Global Currency
AmountInGlobalCurrency AmountInGlobalCurrency Amount in Global Currency
FreeDefinedCurrency1 FreeDefinedCurrency1 Freely Defined Currency 1
AmountInFreeDefinedCurrency1 AmountInFreeDefinedCurrency1 Amount in Freely Defined Currency 1
FreeDefinedCurrency2 FreeDefinedCurrency2 Freely Defined Currency 2
AmountInFreeDefinedCurrency2 AmountInFreeDefinedCurrency2 Amount in Freely Defined Currency 2
FreeDefinedCurrency3 FreeDefinedCurrency3 Freely Defined Currency 3
AmountInFreeDefinedCurrency3 AmountInFreeDefinedCurrency3 Amount in Freely Defined Currency 3
FreeDefinedCurrency4 FreeDefinedCurrency4 Freely Defined Currency 4
AmountInFreeDefinedCurrency4 AmountInFreeDefinedCurrency4 Amount in Freely Defined Currency 4
FreeDefinedCurrency5 FreeDefinedCurrency5 Freely Defined Currency 5
AmountInFreeDefinedCurrency5 AmountInFreeDefinedCurrency5 Amount in Freely Defined Currency 5
FreeDefinedCurrency6 FreeDefinedCurrency6 Freely Defined Currency 6
AmountInFreeDefinedCurrency6 AmountInFreeDefinedCurrency6 Amount in Freely Defined Currency 6
FreeDefinedCurrency7 FreeDefinedCurrency7 Freely Defined Currency 7
AmountInFreeDefinedCurrency7 AmountInFreeDefinedCurrency7 Amount in Freely Defined Currency 7
FreeDefinedCurrency8 FreeDefinedCurrency8 Freely Defined Currency 8
AmountInFreeDefinedCurrency8 AmountInFreeDefinedCurrency8 Amount in Freely Defined Currency 8
AssignmentReference AssignmentReference Assignment Reference
DocumentItemText DocumentItemText Text
ReferenceDocument ReferenceDocument Reference Document
_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_StRpTrialBalanceItem1.
-- 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: PTRIALBALITEM1
-- Parameters: P_FromPostingDate : fis_budat_from, P_ToPostingDate : fis_budat_to

CREATE VIEW P_StRpTrialBalanceItem1 AS
SELECT
  Ledger,
  CompanyCode,
  I_GLAccountLineItem.FiscalYear AS FiscalYear,
  SourceLedger,
  AccountingDocument,
  LedgerGLLineItem,
  AccountingDocumentItem,
  I_GLAccountLineItem.FiscalPeriod AS FiscalPeriod,
  FiscalYearVariant,
  LedgerFiscalYear,
  PostingDate,
  DocumentDate,
  IsReversal,
  IsReversed,
  ProfitCenter,
  FunctionalArea,
  BusinessArea,
  ControllingArea,
  Segment,
  ChartOfAccounts,
  AlternativeGLAccount,
  CountryChartOfAccounts,
  GLAccount,
  _GLAccountInCompanyCode.ReconciliationAccountType AS ReconciliationAccountType,
  Supplier,
  Customer,
  FinancialAccountType,
  SpecialGLCode,
  AccountingDocumentType,
  PostingKey,
  AccountingDocumentCategory,
  AccountingDocCreatedByUser,
  DebitCreditCode,
  TaxCode,
  case FinancialAccountType when 'K' then FinancialAccountType when 'D' then FinancialAccountType when ' ' then case _GLAccountInCompanyCode.ReconciliationAccountType when 'K' then _GLAccountInCompanyCode.ReconciliationAccountType when 'D' then _GLAccountInCompanyCode.ReconciliationAccountType else cast( ' ' as abap.char(1)) end else cast( ' ' as abap.char(1)) end as CashJournalItemType AS char1endasCashJournalItemType,
  cast ( case AccountingDocumentItem when '000' then case AccountingDocumentCategory when 'C' then cast( '3' as abap.char(1)) else cast( '2' as abap.char(1)) end else cast( '1' as abap.char(1)) end as glo_item_type ) as ItemType AS char1endasglo_item_typeasItemType,
  JrnlEntryItemMigrationSource,
  OffsettingAccount,
  OffsettingAccountType,
  CompanyCodeCurrency,
  AmountInCompanyCodeCurrency,
  TransactionCurrency,
  AmountInTransactionCurrency,
  BalanceTransactionCurrency,
  AmountInBalanceTransacCrcy,
  GlobalCurrency,
  AmountInGlobalCurrency,
  FreeDefinedCurrency1,
  AmountInFreeDefinedCurrency1,
  FreeDefinedCurrency2,
  AmountInFreeDefinedCurrency2,
  FreeDefinedCurrency3,
  AmountInFreeDefinedCurrency3,
  FreeDefinedCurrency4,
  AmountInFreeDefinedCurrency4,
  FreeDefinedCurrency5,
  AmountInFreeDefinedCurrency5,
  FreeDefinedCurrency6,
  AmountInFreeDefinedCurrency6,
  FreeDefinedCurrency7,
  AmountInFreeDefinedCurrency7,
  FreeDefinedCurrency8,
  AmountInFreeDefinedCurrency8,
  AssignmentReference,
  DocumentItemText,
  ReferenceDocument
FROM I_GLAccountLineItem
LEFT OUTER JOIN P_DistinctDatetoFiscalYear ON /* join condition not captured in parsed metadata */
;