P_PT_GLAccountBOPLineItem

DDL: P_PT_GLACCOUNTBOPLINEITEM Type: view_entity COMPOSITE

P_PT_GLAccountBOPLineItem is a Composite CDS View in SAP S/4HANA. It reads from 3 data sources (P_PT_GLAccountBOPCustUnion, I_Ledger, I_GLAccountLineItem) and exposes 20 fields with key fields Sourceledger, CompanyCode, FiscalYear, AccountingDocument, LedgerGLLineItem.

Data Sources (3)

SourceAliasJoin Type
P_PT_GLAccountBOPCustUnion Cust from
I_Ledger I_Ledger inner
I_GLAccountLineItem Je inner

Annotations (7)

NameValueLevelField
AccessControl.authorizationCheck #NOT_REQUIRED view
VDM.private true view
VDM.viewType #COMPOSITE view
Metadata.ignorePropagatedAnnotations true view
ObjectModel.usageType.serviceQuality #X view
ObjectModel.usageType.sizeCategory #S view
ObjectModel.usageType.dataClass #MIXED view

Fields (20)

KeyFieldSource TableSource FieldDescription
KEY Sourceledger I_GLAccountLineItem SourceLedger
KEY CompanyCode I_GLAccountLineItem CompanyCode
KEY FiscalYear I_GLAccountLineItem FiscalYear
KEY AccountingDocument I_GLAccountLineItem AccountingDocument
KEY LedgerGLLineItem I_GLAccountLineItem LedgerGLLineItem
KEY Ledger I_GLAccountLineItem Ledger
LedgerFiscalYear I_GLAccountLineItem LedgerFiscalYear
AccountingDocumentCategory I_GLAccountLineItem AccountingDocumentCategory
Postingdate I_GLAccountLineItem PostingDate
Clearingdate I_GLAccountLineItem ClearingDate
GLAccount I_GLAccountLineItem GLAccount
GLAccountType I_GLAccountLineItem GLAccountType
FinancialAccountType I_GLAccountLineItem FinancialAccountType
HouseBankAccount I_GLAccountLineItem HouseBankAccount
DebitCreditCode I_GLAccountLineItem DebitCreditCode
BalanceTransactionCurrency I_GLAccountLineItem BalanceTransactionCurrency
CurrencyISOCode
AmountInBalanceTransacCrcy I_GLAccountLineItem AmountInBalanceTransacCrcy
HouseBankendasHouseBank
PT_BOPValueType
@AbapCatalog.viewEnhancementCategory: [#NONE]
@AccessControl.authorizationCheck: #NOT_REQUIRED
@VDM.private:true
@VDM.viewType: #COMPOSITE
@Metadata.ignorePropagatedAnnotations: true
@ObjectModel.usageType:{
  serviceQuality: #X,
  sizeCategory: #S,
  dataClass: #MIXED
}

define view entity P_PT_GLAccountBOPLineItem
  as select from P_PT_GLAccountBOPCustUnion as Cust
    inner join   I_GLAccountLineItem        as Je on Cust.CompanyCode = Je.CompanyCode
                                             and
                                            (
                                               (
                                                 Cust.Account_To is not initial
                                                 and Je.GLAccount between Cust.Account_From and Cust.Account_To
                                               )
                                               or
                                               (
                                                  Cust.Account_To is initial
                                                 and Je.GLAccount  = Cust.Account_From
                                               )
                                             )

    inner join      I_Ledger                          on  Je.Ledger                = I_Ledger.Ledger
                                                      and I_Ledger.IsLeadingLedger = 'X'                                                    

{
  key  Je.SourceLedger                                as Sourceledger,
  key  Je.CompanyCode                                 as CompanyCode,
  key  Je.FiscalYear                                  as FiscalYear,
  key  Je.AccountingDocument                          as AccountingDocument,
  key  Je.LedgerGLLineItem                            as LedgerGLLineItem,
  key  Je.Ledger                                      as Ledger,
       Je.LedgerFiscalYear                            as LedgerFiscalYear,
       Je.AccountingDocumentCategory                  as AccountingDocumentCategory,
       Je.PostingDate                                 as Postingdate,
       Je.ClearingDate                                as Clearingdate,
       Je.GLAccount                                   as GLAccount,
       Je.GLAccountType                               as GLAccountType,
       Je.FinancialAccountType                        as FinancialAccountType,
       Je.HouseBankAccount                            as HouseBankAccount,
       Je.DebitCreditCode                             as DebitCreditCode,
       Je.BalanceTransactionCurrency                  as BalanceTransactionCurrency,
       Je._BalanceTransactionCurrency.CurrencyISOCode as CurrencyISOCode,
       @Semantics: { amount : {currencyCode: 'BalanceTransactionCurrency'} }
       Je.AmountInBalanceTransacCrcy                  as AmountInBalanceTransacCrcy,
       
       case
         when Je.HouseBank = ''
           then Je._GLAccountInCompanyCode.HouseBank
         else Je.HouseBank
       end                                            as HouseBank,

       cast( 'P' as fipt_cope_value_type preserving type) as PT_BOPValueType


}
where

          Je._GLAccountInCompanyCode.ReconciliationAccountType  <> 'K'
  and     Je._GLAccountInCompanyCode.ReconciliationAccountType  <> 'D'
  and(
          Je.AccountingDocumentCategory                        is initial
    or    Je.AccountingDocumentCategory                        =       'L'
    or    Je.AccountingDocumentCategory                        =       'U'
    or    Je.AccountingDocumentCategory                        =       'C'
  )
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_CURRENCY",
"I_GLACCOUNTINCOMPANYCODE",
"I_GLACCOUNTLINEITEM",
"I_LEDGER",
"P_PT_GLACCOUNTBOPCUSTUNION"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/