I_PT_SAFTSelfBillgCustAddrHist

DDL: I_PT_SAFTSELFBILLGCUSTADDRHIST SQL: IPTSAFTSBADRHST Type: view COMPOSITE Package: GLO_FIN_IS_SAFT_PT

SAF-T PT Self-Billing CustAddr History

I_PT_SAFTSelfBillgCustAddrHist is a Composite CDS View that provides data about "SAF-T PT Self-Billing CustAddr History" in SAP S/4HANA. It reads from 2 data sources (I_SAFTHeader, I_PT_SelfBillgCustAddrVers) and exposes 12 fields with key fields FiscalYear, SupplierInvoice, PlantCustomer. It has 1 association to related views. Part of development package GLO_FIN_IS_SAFT_PT.

Data Sources (2)

SourceAliasJoin Type
I_SAFTHeader SAFTHeader inner
I_PT_SelfBillgCustAddrVers Version from

Associations (1)

CardinalityTargetAliasCondition
[0..1] I_GLAccountInCompanyCode _GLAccountInCompanyCode Version.ReconciliationAccount = _GLAccountInCompanyCode.GLAccount and Version.CompanyCode = _GLAccountInCompanyCode.CompanyCode

Annotations (10)

NameValueLevelField
AbapCatalog.sqlViewName IPTSAFTSBADRHST view
AbapCatalog.compiler.compareFilter 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 #MANDATORY view
AccessControl.personalData.blocking #BLOCKED_DATA_INCLUDED view
EndUserText.label SAF-T PT Self-Billing CustAddr History view

Fields (12)

KeyFieldSource TableSource FieldDescription
KEY FiscalYear I_PT_SelfBillgCustAddrVers FiscalYear G/L Fiscal Year
KEY SupplierInvoice I_PT_SelfBillgCustAddrVers SupplierInvoice
KEY PlantCustomer I_PT_SelfBillgCustAddrVers PlantCustomer
CompanyCode I_PT_SelfBillgCustAddrVers CompanyCode Receiver Company Code
Supplier I_PT_SelfBillgCustAddrVers Supplier Supplier
PortugueseCustomerVersion I_PT_SelfBillgCustAddrVers PortugueseCustomerVersion
PartnerFirstName
PartnerLastName
CountryelsePTendasland1asCountry
char241asEmailAddress
_Customer I_PT_SelfBillgCustAddrVers _Customer
_Supplier I_PT_SelfBillgCustAddrVers _Supplier

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_SAFTSelfBillgCustAddrHist.
-- 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: IPTSAFTSBADRHST

CREATE VIEW I_PT_SAFTSelfBillgCustAddrHist AS
SELECT
  Version.FiscalYear AS FiscalYear,
  Version.SupplierInvoice AS SupplierInvoice,
  Version.PlantCustomer AS PlantCustomer,
  Version.CompanyCode AS CompanyCode,
  Version.Supplier AS Supplier,
  Version.PortugueseCustomerVersion AS PortugueseCustomerVersion,
  min(Version._Customer._ContactPerson.FirstName) AS PartnerFirstName,
  min(Version._Customer._ContactPerson.LastName) AS PartnerLastName,
  cast( case when PlantCustomer is not initial then Version._Customer._AddressDefaultRepresentation.Country when SAFTHeader._CompanyCode._OrgAddressDefaultRprstn.Country is not initial then SAFTHeader._CompanyCode._OrgAddressDefaultRprstn.Country else 'PT' end as land1) as Country AS CountryelsePTendasland1asCountry,
  cast( case when Version._Customer._AddressDefaultRepresentation._CurrentDfltEmailAddress.EmailAddress is not initial then Version._Customer._AddressDefaultRepresentation._CurrentDfltEmailAddress.EmailAddress when SAFTHeader._CompanyCode._OrgAddressDefaultRprstn._EmailAddress.EmailAddress is not initial then SAFTHeader._CompanyCode._OrgAddressDefaultRprstn._EmailAddress.EmailAddress end as abap.char(241)) as EmailAddress AS char241asEmailAddress,
  Version._Customer AS _Customer,
  Version._Supplier AS _Supplier
FROM I_PT_SelfBillgCustAddrVers AS Version
INNER JOIN I_SAFTHeader AS SAFTHeader ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_GLAccountInCompanyCode AS _GLAccountInCompanyCode ON Version.ReconciliationAccount = _GLAccountInCompanyCode.GLAccount AND Version.CompanyCode = _GLAccountInCompanyCode.CompanyCode  -- association [0..1]
;