P_SAFT_GENERALLEDGERONETIMEBP

CDS View

P_SAFT_GENERALLEDGERONETIMEBP is a CDS View in S/4HANA. It contains 6 fields. 1 CDS views read from this table.

CDS Views using this table (1)

ViewTypeJoinVDMDescription
I_SAFTGeneralLedgerOneTimeBP view from COMPOSITE SAFT GLedger One Time Business Partner

Fields (6)

KeyField CDS FieldsUsed in Views
KEY AccountingDocument AccountingDocument 1
KEY CompanyCode CompanyCode 1
KEY FiscalYear FiscalYear 1
KEY Ledger Ledger 1
KEY LedgerGLLineItem LedgerGLLineItem 1
BusinessPartnerNumber BusinessPartnerNumber 1
@AbapCatalog.sqlViewName: 'PSAFTGENLEOTDBP'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@VDM.private: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@VDM.viewType: #COMPOSITE
@ObjectModel.usageType.sizeCategory: #XL
@ObjectModel.usageType.dataClass:  #MIXED
@ObjectModel.usageType.serviceQuality: #P
@ClientHandling.algorithm: #SESSION_VARIABLE
@AccessControl.personalData.blocking : #NOT_REQUIRED
define view P_SAFT_GeneralLedgerOneTimeBP
  as select from I_JournalEntryItem as a

    inner join   P_SAFT_GLMaxBuPa   as GLMaxBusinessPartner on  GLMaxBusinessPartner.CompanyCode        = a.CompanyCode
                                                            and GLMaxBusinessPartner.FiscalYear         = a.FiscalYear
                                                            and GLMaxBusinessPartner.AccountingDocument = a.AccountingDocument
                                                            and GLMaxBusinessPartner.LedgerGLLineItem   = a.LedgerGLLineItem
                                                            and GLMaxBusinessPartner.Ledger             = a.Ledger

{
  key a.CompanyCode                                                       as CompanyCode,
  key a.FiscalYear                                                        as FiscalYear,
  key a.AccountingDocument                                                as AccountingDocument,
  key a.LedgerGLLineItem                                                  as LedgerGLLineItem,
  key a.Ledger                                                            as Ledger,

      cast (case when a.Supplier is initial then '0001' else '0002' end as abap.char(4))              as BusinessPartnerType,

      case when a.Supplier is initial then a.Customer else a.Supplier end as BusinessPartnerNumber
}

where
  (
       a.FinancialAccountType       = 'D'
    or a.FinancialAccountType       = 'K'
  )
  and(
       a._Customer.IsOneTimeAccount = 'X'
    or a._Supplier.IsOneTimeAccount = 'X'
  )
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_CUSTOMER",
"I_JOURNALENTRYITEM",
"I_SUPPLIER",
"P_SAFT_GLMAXBUPA"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/