I_PT_SelfBillgCustAddrVers

DDL: I_PT_SELFBILLGCUSTADDRVERS SQL: IPTSBADRVERS Type: view COMPOSITE

PT Self-Billing CustAddr Version

I_PT_SelfBillgCustAddrVers is a Composite CDS View that provides data about "PT Self-Billing CustAddr Version" in SAP S/4HANA. It reads from 4 data sources (I_SupplierInvoiceItemPurOrdRef, I_Plant, I_PT_SelfBillgDgtlSgntr, I_PT_CustomerAddressVersion) and exposes 8 fields with key fields FiscalYear, SupplierInvoice, PlantCustomer.

Data Sources (4)

SourceAliasJoin Type
I_SupplierInvoiceItemPurOrdRef Item inner
I_Plant Plant inner
I_PT_SelfBillgDgtlSgntr Signature from
I_PT_CustomerAddressVersion Version left_outer

Annotations (10)

NameValueLevelField
AbapCatalog.sqlViewName IPTSBADRVERS 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 #L view
ObjectModel.usageType.serviceQuality #D view
AccessControl.authorizationCheck #CHECK view
EndUserText.label PT Self-Billing CustAddr Version view

Fields (8)

KeyFieldSource TableSource FieldDescription
KEY FiscalYear I_SupplierInvoiceItemPurOrdRef FiscalYear
KEY SupplierInvoice I_SupplierInvoiceItemPurOrdRef SupplierInvoice
KEY PlantCustomer I_Plant PlantCustomer
CompanyCode I_PT_SelfBillgDgtlSgntr CompanyCode
Supplier I_PT_SelfBillgDgtlSgntr Supplier
PortugueseCustomerVersion
_Customer I_Plant _Customer
_Supplier I_PT_SelfBillgDgtlSgntr _Supplier
@AbapCatalog.sqlViewName: 'IPTSBADRVERS'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@ClientHandling.algorithm: #SESSION_VARIABLE
@VDM.viewType: #COMPOSITE
@ObjectModel.usageType.dataClass: #MIXED
@ObjectModel.usageType.sizeCategory: #L
@ObjectModel.usageType.serviceQuality: #D
@AccessControl.authorizationCheck: #CHECK
@AccessControl.personalData.blocking: #('BLOCKED_DATA_INCLUDED')
@EndUserText.label: 'PT Self-Billing CustAddr Version'
define view I_PT_SelfBillgCustAddrVers
  as select from    I_PT_SelfBillgDgtlSgntr        as Signature

    inner join      I_SupplierInvoiceItemPurOrdRef as Item    on  Signature.SupplierInvoice = Item.SupplierInvoice
                                                              and Signature.FiscalYear      = Item.FiscalYear
    inner join      I_Plant                        as Plant   on Item.Plant = Plant.Plant

    left outer join I_PT_CustomerAddressVersion    as Version on Plant.PlantCustomer                           =  Version.Customer
                                                              and(
                                                                Signature.PortugueseDigitalSignatureDate       >  Version.PortugueseDigitalSignatureDate
                                                                or(
                                                                  Signature.PortugueseDigitalSignatureDate     =  Version.PortugueseDigitalSignatureDate
                                                                  and Signature.PortugueseDigitalSignatureTime >= Version.PortugueseDigitalSignatureTime
                                                                )
                                                              )
{
  key Item.FiscalYear                                                       as   FiscalYear,
  key Item.SupplierInvoice                                                  as   SupplierInvoice,
  key Plant.PlantCustomer                                                   as   PlantCustomer,

      Signature.CompanyCode                                                 as   CompanyCode,

      Signature.Supplier                                                    as   Supplier,

      cast(max(Version.PortugueseCustomerVersion) as sipt_data_version)     as   PortugueseCustomerVersion,

      /* Associations */
      //FOR DPP AUTHORIZATION CHECK

      Plant._Customer,
      Signature._Supplier

}
group by
  Item.FiscalYear,
  Item.SupplierInvoice,
  Plant.PlantCustomer,
  CompanyCode,
  Supplier;