I_SAFTGenLedgerOneTimeCustomer

DDL: I_SAFTGENLEDGERONETIMECUSTOMER SQL: ISAFTGENLEDOTC Type: view COMPOSITE Package: GLO_FIN_IS_SAFT_GEN

SAF-T Gen Ledger One Time Customer

I_SAFTGenLedgerOneTimeCustomer is a Composite CDS View that provides data about "SAF-T Gen Ledger One Time Customer" in SAP S/4HANA. It reads from 2 data sources (I_JournalEntryItem, I_JournalEntryItemOneTimeData) and exposes 42 fields with key fields SourceLedger, CompanyCode, FiscalYear, AccountingDocument, LedgerGLLineItem. It has 2 associations to related views. Part of development package GLO_FIN_IS_SAFT_GEN.

Data Sources (2)

SourceAliasJoin Type
I_JournalEntryItem a from
I_JournalEntryItemOneTimeData b inner

Associations (2)

CardinalityTargetAliasCondition
[0..1] I_OperationalAcctgDocItem _AccdocItem a.CompanyCode = _AccdocItem.CompanyCode and a.AccountingDocument = _AccdocItem.AccountingDocument and a.FiscalYear = _AccdocItem.FiscalYear and a.AccountingDocumentItem = _AccdocItem.AccountingDocumentItem and _AccdocItem.VATRegistration <> ''
[0..1] I_CustomerCompany _CustCompany a.Customer = _CustCompany.Customer and a.CompanyCode = _CustCompany.CompanyCode

Annotations (11)

NameValueLevelField
AbapCatalog.sqlViewName ISAFTGENLEDOTC view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #CHECK 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 One Time Customer view

Fields (42)

KeyFieldSource TableSource FieldDescription
KEY SourceLedger I_JournalEntryItem SourceLedger
KEY CompanyCode I_JournalEntryItem CompanyCode
KEY FiscalYear I_JournalEntryItem FiscalYear
KEY AccountingDocument I_JournalEntryItem AccountingDocument
KEY LedgerGLLineItem I_JournalEntryItem LedgerGLLineItem
KEY Ledger I_JournalEntryItem Ledger
ChartOfAccounts I_JournalEntryItem ChartOfAccounts
GLAccount I_JournalEntryItem GLAccount
AccountingDocumentCategory I_JournalEntryItem AccountingDocumentCategory
AccountingDocumentItem I_JournalEntryItem AccountingDocumentItem
PostingDate I_JournalEntryItem PostingDate
Customer I_JournalEntryItem Customer
CompanyCodeCurrency I_JournalEntryItem CompanyCodeCurrency
ReconciliationAccount _CustCompany ReconciliationAccount
CompanyName
StreetName I_JournalEntryItemOneTimeData StreetAddressName
StreetPrefixName
AdditionalStreetPrefixName
StreetSuffixName
AdditionalStreetSuffixName
HouseNumber
CityName I_JournalEntryItemOneTimeData CityName
PostalCode I_JournalEntryItemOneTimeData PostalCode
Country I_JournalEntryItemOneTimeData Country
Region I_JournalEntryItemOneTimeData Region
POBox I_JournalEntryItemOneTimeData POBox
POBoxPostalCode I_JournalEntryItemOneTimeData POBoxPostalCode
AddressID I_JournalEntryItemOneTimeData AddressID
PhoneNumber
FaxNumber
EmailAddress
WebsiteURL
_Customer I_JournalEntryItem _Customer
_ChartOfAccounts I_JournalEntryItem _ChartOfAccounts
_GLAccountInChartOfAccounts I_JournalEntryItem _GLAccountInChartOfAccounts
_SourceLedger I_JournalEntryItem _SourceLedger
_CompanyCode I_JournalEntryItem _CompanyCode
_FiscalYear I_JournalEntryItem _FiscalYear
_JournalEntry I_JournalEntryItem _JournalEntry
_Ledger I_JournalEntryItem _Ledger
_AccountingDocumentCategory I_JournalEntryItem _AccountingDocumentCategory
_GLAccountInCompanyCode I_JournalEntryItem _GLAccountInCompanyCode
@AbapCatalog.sqlViewName: 'ISAFTGENLEDOTC'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #CHECK
@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 One Time Customer'
define view I_SAFTGenLedgerOneTimeCustomer
  as select from I_JournalEntryItem            as a
    inner join   I_JournalEntryItemOneTimeData as b on  a.CompanyCode            = b.CompanyCode
                                                    and a.FiscalYear             = b.FiscalYear
                                                    and a.AccountingDocument     = b.AccountingDocument
                                                    and a.AccountingDocumentItem = b.AccountingDocumentItem

  association [0..1] to I_OperationalAcctgDocItem as _AccdocItem  on  a.CompanyCode               =  _AccdocItem.CompanyCode
                                                                  and a.AccountingDocument        =  _AccdocItem.AccountingDocument
                                                                  and a.FiscalYear                =  _AccdocItem.FiscalYear
                                                                  and a.AccountingDocumentItem    =  _AccdocItem.AccountingDocumentItem
                                                                  and _AccdocItem.VATRegistration <> ''

  association [0..1] to I_CustomerCompany         as _CustCompany on  a.Customer    = _CustCompany.Customer
                                                                  and a.CompanyCode = _CustCompany.CompanyCode

{
      @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,
      a.Customer                                                           as Customer,

      a.CompanyCodeCurrency,

      case when b.TaxID1 is not initial
            then b.TaxID1
           else substring(_AccdocItem.VATRegistration ,3,18)
      end                                                                  as CustomerVATRegistration,

      _CustCompany.ReconciliationAccount                                   as ReconciliationAccount,
      concat(b.BusinessPartnerName1, concat (' ', b.BusinessPartnerName2)) as CompanyName,

      //b.StreetAddressName                                                    as StreetName,

      b.StreetAddressName                                                  as StreetName,
      ''                                                                   as StreetPrefixName,
      ''                                                                   as AdditionalStreetPrefixName,
      ''                                                                   as StreetSuffixName,
      ''                                                                   as AdditionalStreetSuffixName,
      cast('' as abap.char(10))                                            as HouseNumber,
      b.CityName                                                           as CityName,
      b.PostalCode                                                         as PostalCode,
      b.Country                                                            as Country,
      b.Region                                                             as Region,
      b.POBox                                                              as POBox,
      b.POBoxPostalCode                                                    as POBoxPostalCode,

      b.AddressID,
      cast('' as abap.char(30))                                            as PhoneNumber,
      ''                                                                   as FaxNumber,
      cast('' as abap.char(241))                                           as EmailAddress,
      cast('' as abap.char(50))                                            as WebsiteURL,

      //Associations

      a._Customer,
      a._ChartOfAccounts,
      a._GLAccountInChartOfAccounts,
      a._SourceLedger,
      a._CompanyCode,
      a._FiscalYear,
      a._JournalEntry,
      a._Ledger,
      a._AccountingDocumentCategory,
      a._GLAccountInCompanyCode
}
where
  a.FinancialAccountType = 'D'