I_PT_SAFTPaymentCustomer

DDL: I_PT_SAFTPAYMENTCUSTOMER SQL: IPTSAFTPAYCUST Type: view COMPOSITE

SAF-T Payment Customer

I_PT_SAFTPaymentCustomer is a Composite CDS View that provides data about "SAF-T Payment Customer" in SAP S/4HANA. It reads from 3 data sources (I_SAFTAccountingCustomer, I_PT_SAFTIsAlternateAccount, I_GLAccountInCompanyCode) and exposes 15 fields with key fields AccountingDocument, CompanyCode, FiscalYear.

Data Sources (3)

Annotations (10)

NameValueLevelField
AbapCatalog.sqlViewName IPTSAFTPAYCUST view
AbapCatalog.compiler.compareFilter true view
VDM.viewType #COMPOSITE view
AccessControl.authorizationCheck #CHECK view
ClientHandling.algorithm #SESSION_VARIABLE view
AccessControl.personalData.blocking #BLOCKED_DATA_INCLUDED view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.dataClass #MIXED view
EndUserText.label SAF-T Payment Customer view

Fields (15)

KeyFieldSource TableSource FieldDescription
KEY AccountingDocument I_SAFTAccountingCustomer AccountingDocument Journal Entry
KEY CompanyCode I_SAFTAccountingCustomer CompanyCode Receiver Company Code
KEY FiscalYear I_SAFTAccountingCustomer FiscalYear G/L Fiscal Year
DocumentDate I_SAFTAccountingCustomer PostingDate Posting Date for GR
Customer
BusinessPartnerName2endasCompanyName
StreetNameendendasStreetName
CityNameendasCityName
PostalCodeendasPostalCode
CountryendasCountry
AuthorizationGroup
PhoneNumber
FaxNumber
EmailAddress
WebsiteURL

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_SAFTPaymentCustomer.
-- 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: IPTSAFTPAYCUST

CREATE VIEW I_PT_SAFTPaymentCustomer AS
SELECT
  a.AccountingDocument AS AccountingDocument,
  a.CompanyCode AS CompanyCode,
  a.FiscalYear AS FiscalYear,
  a.PostingDate AS DocumentDate,
  max(a.Customer) AS Customer,
  max( case when a.BusinessPartnerName1 is not initial and a.BusinessPartnerName2 is not initial then concat_with_space(a.BusinessPartnerName1, a.BusinessPartnerName2, 1) when a.BusinessPartnerName1 is not initial then a.BusinessPartnerName1 when a.BusinessPartnerName2 is not initial then a.BusinessPartnerName2 end ) as CompanyName AS BusinessPartnerName2endasCompanyName,
  max( case when a.AddressID is not initial then cast(concat_with_space(concat_with_space((concat_with_space( concat_with_space(a._AddressRepresentation.StreetName,a._AddressRepresentation.StreetPrefixName1,1), concat_with_space(a._AddressRepresentation.StreetPrefixName2,a._AddressRepresentation.StreetSuffixName1,1),1) ),a._AddressRepresentation.StreetSuffixName2,1),a._AddressRepresentation.HouseNumber,1) as fieu_address) else case when a.StreetName is initial then 'Desconhecido' else a.StreetName end end ) as StreetName AS StreetNameendendasStreetName,
  max(case when a.CityName is initial then 'Desconhecido' else a.CityName end ) as CityName AS CityNameendasCityName,
  max(case when a.PostalCode is initial then '0000-000' else a.PostalCode end ) as PostalCode AS PostalCodeendasPostalCode,
  max( case when a.Country is initial then 'Desconhecido' else a.Country end ) as Country AS CountryendasCountry,
  max(a.AuthorizationGroup) AS AuthorizationGroup,
  max(a._AddressRepresentation._PhoneNumber[ 1: PhNmbrIsCurrentOverallDefault = 'X' ].InternationalPhoneNumber) AS PhoneNumber,
  max(a._AddressRepresentation._FaxNumber[ 1: FaxNumberIsCurrentDefault = 'X' ].InternationalFaxNumber) AS FaxNumber,
  max(a._AddressRepresentation._EmailAddress[ 1: EmailAddressIsCurrentDefault = 'X' ].EmailAddress) AS EmailAddress,
  ' ' AS WebsiteURL
INNER JOIN I_SAFTAccountingCustomer AS a ON /* join condition not captured in parsed metadata */
INNER JOIN I_PT_SAFTIsAlternateAccount AS c ON /* join condition not captured in parsed metadata */
INNER JOIN I_GLAccountInCompanyCode AS f ON /* join condition not captured in parsed metadata */
;