I_PT_SAFTDeliveryCustomer

DDL: I_PT_SAFTDELIVERYCUSTOMER SQL: IPTSAFTDELCUST Type: view COMPOSITE

SAF-T PT Delivery Customer

I_PT_SAFTDeliveryCustomer is a Composite CDS View that provides data about "SAF-T PT Delivery Customer" in SAP S/4HANA. It reads from 2 data sources (I_SAFTDeliveryCustomer, I_PT_DeliveryDgtlSgntr) and exposes 14 fields with key fields CompanyCode, PortugueseDeliveryNumber. It has 3 associations to related views.

Data Sources (2)

SourceAliasJoin Type
I_SAFTDeliveryCustomer a from
I_PT_DeliveryDgtlSgntr s inner

Associations (3)

CardinalityTargetAliasCondition
[0..1] I_PT_DelDocCustAddrHist h a.DeliveryDocument = h.DeliveryDocument and a.CompanyCode = h.CompanyCode and a.Customer = h.Customer
[0..1] I_SAFTCustTaxRegnNmbr _CustLand a.Customer = _CustLand.CustomerNum and a.Country = _CustLand.Country
[0..*] I_CustomerContactOP _CustomerContact h.Customer = _CustomerContact.Customer

Annotations (10)

NameValueLevelField
AbapCatalog.sqlViewName IPTSAFTDELCUST view
AbapCatalog.compiler.compareFilter true view
VDM.viewType #COMPOSITE view
AccessControl.authorizationCheck #MANDATORY view
AccessControl.personalData.blocking #BLOCKED_DATA_EXCLUDED view
ObjectModel.usageType.serviceQuality #X view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.dataClass #MIXED view
ClientHandling.algorithm #SESSION_VARIABLE view
EndUserText.label SAF-T PT Delivery Customer view

Fields (14)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode I_PT_DeliveryDgtlSgntr CompanyCode Receiver Company Code
KEY PortugueseDeliveryNumber I_PT_DeliveryDgtlSgntr PortugueseDeliveryNumber Delivery No
DeliveryDocument I_PT_DeliveryDgtlSgntr DeliveryDocument Outbound Delivery
DocumentDate I_PT_DeliveryDgtlSgntr DeliveryDate Delivery Date
CreationDate I_PT_DeliveryDgtlSgntr PortugueseDigitalSignatureDate
CreationTime I_PT_DeliveryDgtlSgntr PortugueseDigitalSignatureTime
CustomerendasCustomer
CustomerNameasbu_name1txendasCompanyName
StreetNameDesconhecidoendasStreetName
PostalCode0000000endasPostalCode
PhoneNumberendasPhoneNumber
FaxNumberendasFaxNumber
EmailAddressendasEmailAddress
SearchURLAddressendasWebsiteURL

Derived SQL interpretation, reconstructed from the parsed view metadata (data sources, associations, and field mappings). SAP annotations are omitted and the structure is reformulated as SQL — this is a functional approximation, not the verbatim SAP source.

-- Derived SQL interpretation of CDS view I_PT_SAFTDeliveryCustomer.
-- Reconstructed from parsed metadata (data sources, associations, fields).
-- SAP annotations are omitted and the structure is reformulated as SQL;
-- this is a functional approximation, not the verbatim SAP source. Some join
-- conditions may be unavailable and a few CDS constructs are kept as-is.
-- SQL view name: IPTSAFTDELCUST

CREATE VIEW I_PT_SAFTDeliveryCustomer AS
SELECT
  s.CompanyCode AS CompanyCode,
  s.PortugueseDeliveryNumber AS PortugueseDeliveryNumber,
  s.DeliveryDocument AS DeliveryDocument,
  s.DeliveryDate AS DocumentDate,
  s.PortugueseDigitalSignatureDate AS CreationDate,
  s.PortugueseDigitalSignatureTime AS CreationTime,
  case when h.PortugueseCustomerWithVersion is not initial then h.Customer else a.Customer end as Customer AS CustomerendasCustomer,
  case when h.PortugueseCustomerWithVersion is not initial then cast (h.CompanyName as bu_name1tx) else cast (a._ShipToParty.CustomerName as bu_name1tx) end as CompanyName AS CustomerNameasbu_name1txendasCompanyName,
  case when h.PortugueseCustomerWithVersion is not initial then coalesce(h.CustomerSupplierAddress, 'Desconhecido') else coalesce(a._ShipToParty.StreetName, 'Desconhecido') end as StreetName AS StreetNameDesconhecidoendasStreetName,
  case when h.PortugueseCustomerWithVersion is not initial then coalesce(h.PostalCode, '0000-000') else coalesce(a._ShipToParty.PostalCode, '0000-000') end as PostalCode AS PostalCode0000000endasPostalCode,
  case when h.PortugueseCustomerWithVersion is not initial then coalesce ( h.PhoneNumber, '' ) else coalesce ( a._ShipToParty._StandardAddress.PhoneNumber, '' ) end as PhoneNumber AS PhoneNumberendasPhoneNumber,
  case when h.PortugueseCustomerWithVersion is not initial then coalesce ( h.FaxNumber, '' ) else coalesce ( a._ShipToParty.FaxNumber, '' ) end as FaxNumber AS FaxNumberendasFaxNumber,
  case when h.PortugueseCustomerWithVersion is not initial then coalesce ( h.EmailAddress, '' ) else coalesce ( a._ShipToParty._StandardAddress._DefaultCorpEmailAddress.EmailAddress, '' ) end as EmailAddress AS EmailAddressendasEmailAddress,
  case when h.PortugueseCustomerWithVersion is not initial then coalesce ( h.SearchURLAddress, '' ) else coalesce ( a._ShipToParty._StandardAddress._DefaultCorpURLAddress.SearchURLAddress, '' ) end as WebsiteURL AS SearchURLAddressendasWebsiteURL
FROM I_SAFTDeliveryCustomer AS a
INNER JOIN I_PT_DeliveryDgtlSgntr AS s ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_PT_DelDocCustAddrHist AS h ON a.DeliveryDocument = h.DeliveryDocument AND a.CompanyCode = h.CompanyCode AND a.Customer = h.Customer  -- association [0..1]
LEFT OUTER JOIN I_SAFTCustTaxRegnNmbr AS _CustLand ON a.Customer = _CustLand.CustomerNum AND a.Country = _CustLand.Country  -- association [0..1]
LEFT OUTER JOIN I_CustomerContactOP AS _CustomerContact ON h.Customer = _CustomerContact.Customer  -- association [0..*]
;