I_SAFTBillingCustomer

DDL: I_SAFTBILLINGCUSTOMER SQL: ISAFTBILCUST Type: view COMPOSITE Package: GLO_FIN_IS_SAFT_GEN

SAF-T Regular Billing Customers

I_SAFTBillingCustomer is a Composite CDS View that provides data about "SAF-T Regular Billing Customers" in SAP S/4HANA. It reads from 4 data sources (I_BillingDocument, I_InvoiceList, I_Customer, I_Customer) and exposes 24 fields with key field BillingDocument. It has 2 associations to related views. Part of development package GLO_FIN_IS_SAFT_GEN.

Data Sources (4)

SourceAliasJoin Type
I_BillingDocument bd from
I_InvoiceList bd union
I_Customer Cust inner
I_Customer Cust inner

Associations (2)

CardinalityTargetAliasCondition
[0..*] I_ContactPerson _ContactPerson Cust.Customer = _ContactPerson.Customer
[0..1] I_CustomerCompany _CustCompany Cust.Customer = _CustCompany.Customer and bd.CompanyCode = _CustCompany.CompanyCode

Annotations (11)

NameValueLevelField
AbapCatalog.sqlViewName ISAFTBILCUST 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 Regular Billing Customers view

Fields (24)

KeyFieldSource TableSource FieldDescription
KEY BillingDocument BillingDocument
CompanyCode CompanyCode
FiscalYear FiscalYear
DocumentDate BillingDocumentDate
Customer PayerParty
ReconciliationAccount _CustCompany ReconciliationAccount
PartnerFirstName
PartnerLastName
_PayerParty _PayerParty
AddressID I_Customer AddressID
_AddressRepresentation I_Customer _AddressRepresentation
VATRegistrationCountry VATRegistrationCountry
CompanyCode CompanyCode
FiscalYear FiscalYear
DocumentDate InvoiceListBillingDate
Customer PayerParty
ReconciliationAccount _CustCompany ReconciliationAccount
PartnerFirstName
PartnerLastName
_PayerParty _PayerParty
AddressID I_Customer AddressID
_AddressRepresentation I_Customer _AddressRepresentation
VATRegistrationCountry VATRegistrationCountry
VATRegistration I_InvoiceList VATRegistration
@AbapCatalog.sqlViewName: 'ISAFTBILCUST'
@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 Regular Billing Customers'
define view I_SAFTBillingCustomer
  as select from I_BillingDocument as bd
    inner join   I_Customer        as Cust on  Cust.Customer         = bd.PayerParty
                                           and Cust.IsOneTimeAccount = ' ' //update 1905


  association [0..*] to I_ContactPerson   as _ContactPerson on  Cust.Customer = _ContactPerson.Customer

  association [0..1] to I_CustomerCompany as _CustCompany   on  Cust.Customer  = _CustCompany.Customer
                                                            and bd.CompanyCode = _CustCompany.CompanyCode //update 1905

{
  key  BillingDocument,

       CompanyCode,
       FiscalYear,

       BillingDocumentDate                as DocumentDate,
       PayerParty                         as Customer,

       _CustCompany.ReconciliationAccount as ReconciliationAccount,

       min(_ContactPerson.FirstName)      as PartnerFirstName,
       min(_ContactPerson.LastName)       as PartnerLastName,


       _PayerParty,
       Cust.AddressID,
       Cust._AddressRepresentation,
       VATRegistrationCountry,
       bd.VATRegistration
}
group by
  BillingDocument,
  CompanyCode,
  FiscalYear,
  BillingDocumentDate,
  PayerParty,
  Cust.AddressID,
  _CustCompany.ReconciliationAccount,
  VATRegistrationCountry,
  bd.VATRegistration

union select from I_InvoiceList as bd
  inner join      I_Customer    as Cust on  Cust.Customer         = bd.PayerParty
                                        and Cust.IsOneTimeAccount = ' ' //update 1905


association [0..*] to I_ContactPerson   as _ContactPerson on  Cust.Customer = _ContactPerson.Customer

association [0..1] to I_CustomerCompany as _CustCompany   on  Cust.Customer  = _CustCompany.Customer
                                                          and bd.CompanyCode = _CustCompany.CompanyCode //update 1905

{
  key  InvoiceList                        as BillingDocument,

       CompanyCode,
       FiscalYear,

       InvoiceListBillingDate             as DocumentDate,  //VDM

       PayerParty                         as Customer,

       _CustCompany.ReconciliationAccount as ReconciliationAccount,

       min(_ContactPerson.FirstName)      as PartnerFirstName,
       min(_ContactPerson.LastName)       as PartnerLastName,


       _PayerParty,
       Cust.AddressID,
       Cust._AddressRepresentation,
       VATRegistrationCountry,
       bd.VATRegistration
}
group by
  InvoiceList,
  CompanyCode,
  FiscalYear,
  InvoiceListBillingDate,  //VDM

  PayerParty,
  Cust.AddressID,
  _CustCompany.ReconciliationAccount,
  VATRegistrationCountry,
  bd.VATRegistration