I_PT_SAFTBillgDocCustAddrHist

DDL: I_PT_SAFTBILLGDOCCUSTADDRHIST SQL: IPTSAFTBLGADRHST Type: view COMPOSITE

SAF-T PT BillingDoc CustAddr History

I_PT_SAFTBillgDocCustAddrHist is a Composite CDS View that provides data about "SAF-T PT BillingDoc CustAddr History" in SAP S/4HANA. It reads from 4 data sources (I_CustomerCompany, I_GLAccountInCompanyCode, I_PT_SAFTCustAddrHist, I_PT_BillgDocCustAddrVers) and exposes 14 fields with key fields BillingDocument, Customer.

Data Sources (4)

SourceAliasJoin Type
I_CustomerCompany CustomerCompany left_outer
I_GLAccountInCompanyCode GLAccountInCompanyCode left_outer
I_PT_SAFTCustAddrHist History inner
I_PT_BillgDocCustAddrVers Version from

Annotations (11)

NameValueLevelField
AbapCatalog.sqlViewName IPTSAFTBLGADRHST view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
ClientHandling.algorithm #SESSION_VARIABLE view
VDM.viewType #COMPOSITE view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.sizeCategory #XXL view
ObjectModel.usageType.serviceQuality #D view
AccessControl.authorizationCheck #CHECK view
AccessControl.personalData.blocking #BLOCKED_DATA_INCLUDED view
EndUserText.label SAF-T PT BillingDoc CustAddr History view

Fields (14)

KeyFieldSource TableSource FieldDescription
KEY BillingDocument I_PT_BillgDocCustAddrVers BillingDocument
KEY Customer I_PT_SAFTCustAddrHist Customer
CompanyCode I_PT_BillgDocCustAddrVers CompanyCode
CustomerVATRegistration I_PT_SAFTCustAddrHist CustomerVATRegistration
CompanyName I_PT_SAFTCustAddrHist CompanyName
CustomerSupplierAddress I_PT_SAFTCustAddrHist CustomerSupplierAddress
CityName I_PT_SAFTCustAddrHist CityName
PostalCode I_PT_SAFTCustAddrHist PostalCode
Country I_PT_SAFTCustAddrHist Country
PhoneNumber I_PT_SAFTCustAddrHist PhoneNumber
FaxNumber I_PT_SAFTCustAddrHist FaxNumber
EmailAddress I_PT_SAFTCustAddrHist EmailAddress
SearchURLAddress I_PT_SAFTCustAddrHist SearchURLAddress
_Customer I_PT_SAFTCustAddrHist _Customer
@AbapCatalog.sqlViewName: 'IPTSAFTBLGADRHST'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@ClientHandling.algorithm: #SESSION_VARIABLE
@VDM.viewType: #COMPOSITE
@ObjectModel.usageType.dataClass: #MIXED
@ObjectModel.usageType.sizeCategory: #XXL
@ObjectModel.usageType.serviceQuality: #D
@AccessControl.authorizationCheck: #CHECK
@AccessControl.personalData.blocking: #BLOCKED_DATA_INCLUDED
@EndUserText.label: 'SAF-T PT BillingDoc CustAddr History'
define view I_PT_SAFTBillgDocCustAddrHist
  as select from    I_PT_BillgDocCustAddrVers as Version

    left outer join I_CustomerCompany         as CustomerCompany        on  Version.Customer    = CustomerCompany.Customer
                                                                        and Version.CompanyCode = CustomerCompany.CompanyCode
    left outer join I_GLAccountInCompanyCode  as GLAccountInCompanyCode on  CustomerCompany.ReconciliationAccount = GLAccountInCompanyCode.GLAccount
                                                                        and CustomerCompany.CompanyCode           = GLAccountInCompanyCode.CompanyCode

    inner join      I_PT_SAFTCustAddrHist     as History                on  Version.Customer                  = History.Customer
                                                                        and Version.PortugueseCustomerVersion = History.PortugueseCustomerVersion
{
  key Version.BillingDocument                                                            as BillingDocument,
  key History.Customer                                                                   as Customer,

      Version.CompanyCode                                                                as CompanyCode,

      cast(
      concat(Version.Customer,concat('_',Version.PortugueseCustomerVersion))
      as sipt_kunnr_with_version)                                                        as PortugueseCustomerWithVersion,

      cast(
      case
      when GLAccountInCompanyCode.AlternativeGLAccount is not initial
      then GLAccountInCompanyCode.AlternativeGLAccount
      when CustomerCompany.ReconciliationAccount is not initial
      then CustomerCompany.ReconciliationAccount
      else ''
      end as akont)                                                                      as ReconciliationAccount,

      History.CustomerVATRegistration                                                    as CustomerVATRegistration,

      History.CompanyName                                                                as CompanyName,

      cast(
      concat_with_space(History.PartnerFirstName,History.PartnerLastName,1)
      as saft_pt_contact_name)                                                           as ContactPersonName,

      History.CustomerSupplierAddress                                                    as CustomerSupplierAddress,

      History.CityName                                                                   as CityName,

      History.PostalCode                                                                 as PostalCode,

      History.Country                                                                    as Country,

      History.PhoneNumber                                                                as PhoneNumber,

      History.FaxNumber                                                                  as FaxNumber,

      History.EmailAddress                                                               as EmailAddress,
      
      History.SearchURLAddress                                                           as SearchURLAddress,

      /* Associations */
      //FOR DPP AUTHORIZATION CHECK

      History._Customer

}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_CUSTOMERCOMPANY",
"I_GLACCOUNTINCOMPANYCODE",
"I_PT_BILLGDOCCUSTADDRVERS",
"I_PT_SAFTCUSTADDRHIST"
],
"ASSOCIATED":
[
"I_CUSTOMER"
],
"BASE":
[
"I_PT_SAFTCUSTADDRHIST"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/