P_FINS_GL_CLEAREDITEMS

DDL: P_FINS_GL_CLEAREDITEMS SQL: PGLCLEAREDITEMS Type: view BASIC

P_FINS_GL_CLEAREDITEMS is a Basic CDS View in SAP S/4HANA. It reads from 4 data sources (acdoca, bkpf, P_FINS_REPRESENTIVE_LEDGER, skb1) and exposes 25 fields with key fields CompanyCode, FiscalYear, AccountingDocument, LedgerGLLineItem.

Data Sources (4)

SourceAliasJoin Type
acdoca acdoca from
bkpf bkpf inner
P_FINS_REPRESENTIVE_LEDGER ledger inner
skb1 skb1 inner

Annotations (7)

NameValueLevelField
AbapCatalog.sqlViewName PGLCLEAREDITEMS view
AbapCatalog.preserveKey true view
ClientHandling.algorithm #SESSION_VARIABLE view
AccessControl.authorizationCheck #NOT_REQUIRED view
AbapCatalog.compiler.compareFilter true view
VDM.private true view
VDM.viewType #BASIC view

Fields (25)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode acdoca rbukrs
KEY FiscalYear acdoca gjahr
KEY AccountingDocument acdoca belnr
KEY LedgerGLLineItem
AccountingDocumentItem acdoca buzei
FinancialAccountType acdoca koart
ClearingAccountingDocument acdoca augbl
ClearingDocFiscalYear acdoca auggj
AccountingDocumentType bkpf blart
AccountingDocumentCategory bkpf bstat
AssignmentReference acdoca zuonr
CompanyCodeCurrency bkpf hwaer
DocumentDate bkpf bldat
DocumentItemText acdoca sgtxt
InvoiceReference acdoca rebzg
FollowOnDocumentType acdoca rebzt
PostingDate bkpf budat
SpecialGLCode
AccountingDocumentItemType
PaymentCardItem
AmountInCompanyCodeCurrency acdoca hsl
CashDiscountAmtInCoCodeCrcy 0
AmountInAdditionalCurrency1 0
AmountInAdditionalCurrency2 0
Account acdoca racct
@AbapCatalog.sqlViewName: 'PGLCLEAREDITEMS'
@AbapCatalog.preserveKey:true
@ClientHandling.algorithm: #SESSION_VARIABLE
@AccessControl.authorizationCheck: #NOT_REQUIRED
@AbapCatalog.compiler.compareFilter:true
@VDM.private: true
@VDM.viewType: #BASIC

//This view is used in the context of Reset Clearing

define view P_FINS_GL_CLEAREDITEMS
  as select from acdoca

    inner join   bkpf                                 on  bkpf.bukrs = acdoca.rbukrs
                                                      and bkpf.gjahr = acdoca.gjahr
                                                      and bkpf.belnr = acdoca.belnr

    inner join   P_FINS_REPRESENTIVE_LEDGER as ledger on  ledger.ldgrp = bkpf.ldgrp
                                                      and ledger.rldnr = acdoca.rldnr

    inner join   skb1                                 on  skb1.bukrs    = acdoca.rbukrs
                                                      and skb1.saknr    = acdoca.racct
                                                      and skb1.x_uj_clr = 'X'

{
  key acdoca.rbukrs                   as CompanyCode,
  key acdoca.gjahr                    as FiscalYear,
  key acdoca.belnr                    as AccountingDocument,
  key cast(acdoca.docln as fis_docln) as LedgerGLLineItem,
  
  
      acdoca.buzei  as AccountingDocumentItem,
      acdoca.koart  as FinancialAccountType,
      acdoca.augbl  as ClearingAccountingDocument,
      acdoca.auggj  as ClearingDocFiscalYear,
      bkpf.blart    as AccountingDocumentType,
      bkpf.bstat    as AccountingDocumentCategory,
      acdoca.zuonr  as AssignmentReference,
      bkpf.hwaer    as CompanyCodeCurrency,
      bkpf.bldat    as DocumentDate,
      acdoca.sgtxt  as DocumentItemText,
      acdoca.rebzg  as InvoiceReference,
      acdoca.rebzt  as FollowOnDocumentType,
      bkpf.budat    as PostingDate,
      ' '           as SpecialGLCode,
      ' '           as AccountingDocumentItemType, //field BUZID doesn't exist in ACDOCA

      '000'         as PaymentCardItem,
    
      @Semantics: { amount : {currencyCode: 'CompanyCodeCurrency'} }
      acdoca.hsl    as AmountInCompanyCodeCurrency,

      //Not needed. Never exposed to any UI

      0             as CashDiscountAmtInCoCodeCrcy,
      0             as AmountInAdditionalCurrency1, 
      0             as AmountInAdditionalCurrency2, 

      acdoca.racct  as Account
}
where
      acdoca.koart = 'S'
  and acdoca.augbl <> ''
  and bkpf.xstov   <> 'X'
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"P_FINS_REPRESENTIVE_LEDGER",
"ACDOCA",
"BKPF",
"SKB1"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/