I_PT_DelDocCustAddVers

DDL: I_PT_DELDOCCUSTADDVERS SQL: IPTDELADRVERS Type: view COMPOSITE

PT Delivery Doc CustAddr Version

I_PT_DelDocCustAddVers is a Composite CDS View that provides data about "PT Delivery Doc CustAddr Version" in SAP S/4HANA. It reads from 3 data sources (I_DeliveryDocument, I_PT_DeliveryDgtlSgntr, I_PT_CustomerAddressVersion) and exposes 5 fields with key fields DeliveryDocument, Customer.

Data Sources (3)

SourceAliasJoin Type
I_DeliveryDocument DeliveryDocument inner
I_PT_DeliveryDgtlSgntr Signature from
I_PT_CustomerAddressVersion Version inner

Annotations (11)

NameValueLevelField
AbapCatalog.sqlViewName IPTDELADRVERS 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 #REQUIRED view
EndUserText.label PT Delivery Doc CustAddr Version view

Fields (5)

KeyFieldSource TableSource FieldDescription
KEY DeliveryDocument I_DeliveryDocument DeliveryDocument
KEY Customer I_DeliveryDocument ShipToParty
CompanyCode
PortugueseCustomerVersion
_ShipToParty I_DeliveryDocument _ShipToParty
@AbapCatalog.sqlViewName: 'IPTDELADRVERS'
@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: #REQUIRED
@EndUserText.label: 'PT Delivery Doc CustAddr Version'
define view I_PT_DelDocCustAddVers
  as select from I_PT_DeliveryDgtlSgntr      as Signature

    inner join   I_DeliveryDocument          as DeliveryDocument on Signature.DeliveryDocument = DeliveryDocument.DeliveryDocument

    inner join   I_PT_CustomerAddressVersion as Version         on DeliveryDocument.ShipToParty                    =  Version.Customer
                                                                and(
                                                                  Signature.PortugueseDigitalSignatureDate       >  Version.PortugueseDigitalSignatureDate
                                                                  or(
                                                                    Signature.PortugueseDigitalSignatureDate     =  Version.PortugueseDigitalSignatureDate
                                                                    and Signature.PortugueseDigitalSignatureTime >= Version.PortugueseDigitalSignatureTime
                                                                  )
                                                                )
{
  key DeliveryDocument.DeliveryDocument                                      as DeliveryDocument,
  key DeliveryDocument.ShipToParty                                             as Customer,

      DeliveryDocument._SalesOrganization.CompanyCode                          as CompanyCode,

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

      /* Associations */
      //FOR DPP AUTHORIZATION CHECK      

      DeliveryDocument._ShipToParty

}
group by
  DeliveryDocument.DeliveryDocument,
  DeliveryDocument._SalesOrganization.CompanyCode,
  DeliveryDocument.ShipToParty;
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_DELIVERYDOCUMENT",
"I_PT_CUSTOMERADDRESSVERSION",
"I_PT_DELIVERYDGTLSGNTR",
"I_SALESORGANIZATION"
],
"ASSOCIATED":
[
"I_CUSTOMER"
],
"BASE":
[
"I_DELIVERYDOCUMENT"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/