I_SAFTGenLedgerOneTimeCustomer

DDL: I_SAFTGENLEDGERONETIMECUSTOMER SQL: ISAFTGENLEDOTC Type: view COMPOSITE

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 41 fields with key fields SourceLedger, CompanyCode, FiscalYear, AccountingDocument, LedgerGLLineItem. It has 2 associations to related views.

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 (41)

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
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
@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._Address.StreetName                                                  as StreetName,
  b._Address.StreetPrefixName                                            as StreetPrefixName,
  b._Address.AdditionalStreetPrefixName                                  as AdditionalStreetPrefixName,
  b._Address.StreetSuffixName                                            as StreetSuffixName,
  b._Address.AdditionalStreetSuffixName                                  as AdditionalStreetSuffixName,
  b._Address.HouseNumber                                                 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,
  b._Address._DefaultPhoneNumber.PhoneNumber                             as PhoneNumber,
  b._Address._DefaultFaxNumber.FaxNumber                                 as FaxNumber,
  b._Address._DefaultEmailAddress.EmailAddress                           as EmailAddress,
  cast(lower(b._Address._DefaultURLAddress.SearchURLAddress) as ad_uri2) as WebsiteURL,
  
  //Associations

  a._Customer,
  a._ChartOfAccounts,
  a._GLAccountInChartOfAccounts,
  a._SourceLedger,
  a._CompanyCode,
  a._FiscalYear,
  a._JournalEntry,
  a._Ledger,
  a._AccountingDocumentCategory
}
where
  a.FinancialAccountType = 'D'
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_ADDRESS",
"I_ADDRESSEMAILADDRESS",
"I_ADDRESSFAXNUMBER",
"I_ADDRESSHOMEPAGEURL",
"I_ADDRESSPHONENUMBER",
"I_CUSTOMERCOMPANY",
"I_JOURNALENTRYITEM",
"I_JOURNALENTRYITEMONETIMEDATA",
"I_OPERATIONALACCTGDOCITEM"
],
"ASSOCIATED":
[
"I_ACCOUNTINGDOCUMENTCATEGORY",
"I_CHARTOFACCOUNTS",
"I_COMPANYCODE",
"I_CUSTOMER",
"I_CUSTOMERCOMPANY",
"I_FISCALYEARFORCOMPANYCODE",
"I_GLACCOUNTINCHARTOFACCOUNTS",
"I_JOURNALENTRY",
"I_LEDGER",
"I_OPERATIONALACCTGDOCITEM"
],
"BASE":
[
"I_JOURNALENTRYITEM"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/