I_SAFTGeneralLedgerSupplier

DDL: I_SAFTGENERALLEDGERSUPPLIER SQL: ISAFTGLSUP Type: view COMPOSITE Package: GLO_FIN_IS_SAFT_GEN

SAF-T Gen Ledger Supplier

I_SAFTGeneralLedgerSupplier is a Composite CDS View that provides data about "SAF-T Gen Ledger Supplier" in SAP S/4HANA. It reads from 2 data sources (I_Supplier, P_SAFTGLMaxSupplier) and exposes 38 fields with key fields SourceLedger, CompanyCode, FiscalYear, AccountingDocument, LedgerGLLineItem. It has 1 association to related views. Part of development package GLO_FIN_IS_SAFT_GEN.

Data Sources (2)

SourceAliasJoin Type
I_Supplier b inner
P_SAFTGLMaxSupplier GLMaxSupplier inner

Associations (1)

CardinalityTargetAliasCondition
[0..*] I_SAFTSupTaxRegnNmbr _MultiVAT a.Supplier = _MultiVAT.Supplier

Annotations (10)

NameValueLevelField
AbapCatalog.sqlViewName ISAFTGLSUP view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #MANDATORY view
VDM.viewType #COMPOSITE view
ClientHandling.algorithm #SESSION_VARIABLE view
AccessControl.personalData.blocking #BLOCKED_DATA_INCLUDED view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.dataClass #MIXED view
EndUserText.label SAF-T Gen Ledger Supplier view

Fields (38)

KeyFieldSource TableSource FieldDescription
KEY SourceLedger a SourceLedger
KEY CompanyCode a CompanyCode
KEY FiscalYear a FiscalYear
KEY AccountingDocument a AccountingDocument
KEY LedgerGLLineItem a LedgerGLLineItem
KEY Ledger a Ledger
ChartOfAccounts a ChartOfAccounts
GLAccount a GLAccount
AccountingDocumentCategory a AccountingDocumentCategory
AccountingDocumentItem a AccountingDocumentItem
PostingDate a PostingDate
Supplier a Supplier
AddressID I_Supplier AddressID
VATRegistration
CompanyName
StreetName I_Supplier BPAddrStreetName
StreetPrefixName
AdditionalStreetPrefixName
StreetSuffixName
AdditionalStreetSuffixName
HouseNumber
CityName I_Supplier BPAddrCityName
PostalCode I_Supplier PostalCode
Country I_Supplier Country
Region I_Supplier Region
ReconciliationAccount
_SupplierCompany a _SupplierCompany
_AddressRepresentation I_Supplier _AddressRepresentation
_MultiVAT _MultiVAT
_ChartOfAccounts a _ChartOfAccounts
_GLAccountInChartOfAccounts a _GLAccountInChartOfAccounts
_SourceLedger a _SourceLedger
_CompanyCode a _CompanyCode
_FiscalYear a _FiscalYear
_JournalEntry a _JournalEntry
_Ledger a _Ledger
_AccountingDocumentCategory a _AccountingDocumentCategory
_Supplier a _Supplier
@AbapCatalog.sqlViewName: 'ISAFTGLSUP'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #MANDATORY
@VDM.viewType: #COMPOSITE
@ClientHandling.algorithm: #SESSION_VARIABLE
@AccessControl.personalData.blocking: #BLOCKED_DATA_INCLUDED
@ObjectModel.usageType.serviceQuality: #D
@ObjectModel.usageType.sizeCategory: #XL
@ObjectModel.usageType.dataClass: #MIXED
@EndUserText.label: 'SAF-T Gen Ledger Supplier'
define view I_SAFTGeneralLedgerSupplier
  as select distinct from I_JournalEntryItem  as a

    inner join            P_SAFTGLMaxSupplier as GLMaxSupplier on  GLMaxSupplier.SourceLedger       = a.SourceLedger
                                                               and GLMaxSupplier.CompanyCode        = a.CompanyCode
                                                               and GLMaxSupplier.FiscalYear         = a.FiscalYear
                                                               and GLMaxSupplier.AccountingDocument = a.AccountingDocument
                                                               and GLMaxSupplier.LedgerGLLineItem   = a.LedgerGLLineItem
                                                               and GLMaxSupplier.Ledger             = a.Ledger

    inner join            I_Supplier          as b             on  a.Supplier         = b.Supplier
                                                               and b.IsOneTimeAccount = ' '

  association [0..*] to I_SAFTSupTaxRegnNmbr as _MultiVAT on a.Supplier = _MultiVAT.Supplier

{
      @ObjectModel.foreignKey.association: '_SourceLedger'
  key a.SourceLedger                                                            as SourceLedger,
      @ObjectModel.foreignKey.association: '_CompanyCode'
  key a.CompanyCode                                                             as CompanyCode,
      @ObjectModel.foreignKey.association: '_FiscalYear'
  key a.FiscalYear                                                              as FiscalYear,
      @ObjectModel.foreignKey.association: '_JournalEntry'
  key a.AccountingDocument                                                      as AccountingDocument,
  key a.LedgerGLLineItem                                                        as LedgerGLLineItem,
      @ObjectModel.foreignKey.association: '_Ledger'
  key a.Ledger                                                                  as Ledger,

      @ObjectModel.foreignKey.association: '_ChartOfAccounts'
      a.ChartOfAccounts,
      @ObjectModel.foreignKey.association: '_GLAccountInChartOfAccounts'
      a.GLAccount,

      @ObjectModel.foreignKey.association: '_AccountingDocumentCategory'
      a.AccountingDocumentCategory,

      a.AccountingDocumentItem                                                  as AccountingDocumentItem,
      a.PostingDate                                                             as PostingDate,
      a.Supplier                                                                as Supplier,
      b.AddressID,
      substring(b.VATRegistration ,3,18)                                        as VATRegistration,
      concat( concat( b.BusinessPartnerName1, ' '), b.BusinessPartnerName2 )      as CompanyName,
      //b.StreetName                                                         as StreetName,

      b.BPAddrStreetName                                                        as StreetName,
      b._AddressRepresentation.StreetPrefixName1                                as StreetPrefixName,
      b._AddressRepresentation.StreetPrefixName2                                as AdditionalStreetPrefixName,
      b._AddressRepresentation.StreetSuffixName1                                as StreetSuffixName,
      b._AddressRepresentation.StreetSuffixName2                                as AdditionalStreetSuffixName,
      b._AddressRepresentation.HouseNumber                                      as HouseNumber,

      b.BPAddrCityName                                                          as CityName,
      b.PostalCode                                                              as PostalCode,
      b.Country                                                                 as Country,
      //b.Supplier                                                                as SupplierName,

      b.Region,
      a._SupplierCompany[ 1:CompanyCode = a.CompanyCode ].ReconciliationAccount as ReconciliationAccount,


      //Associations

      a._SupplierCompany, //Reconciliation Account

      b._AddressRepresentation,
      _MultiVAT,          //MultiVAT

      a._ChartOfAccounts,
      a._GLAccountInChartOfAccounts,
      a._SourceLedger,
      a._CompanyCode,
      a._FiscalYear,
      a._JournalEntry,
      a._Ledger,
      a._AccountingDocumentCategory,
      a._Supplier

}
where
  a.FinancialAccountType = 'K'