I_PT_SAFTBillingOneTimeCust

DDL: I_PT_SAFTBILLINGONETIMECUST SQL: IPTSAFTBILLOTC Type: view COMPOSITE

SAF-T PT Billing One Time Custmer

I_PT_SAFTBillingOneTimeCust is a Composite CDS View that provides data about "SAF-T PT Billing One Time Custmer" in SAP S/4HANA. It reads from 4 data sources (I_PT_SAFTIsAlternateAccount, P_PT_SAFTCUSTMAX, I_GLAccountInCompanyCode, I_PT_BillgDocDgtlSgntr) and exposes 12 fields with key fields CompanyCode, PortugueseInvoiceNumber.

Data Sources (4)

SourceAliasJoin Type
I_PT_SAFTIsAlternateAccount c inner
P_PT_SAFTCUSTMAX CM left_outer
I_GLAccountInCompanyCode f inner
I_PT_BillgDocDgtlSgntr Sig inner

Annotations (11)

NameValueLevelField
AbapCatalog.sqlViewName IPTSAFTBILLOTC view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #CHECK view
VDM.viewType #COMPOSITE view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.dataClass #MIXED view
ClientHandling.algorithm #SESSION_VARIABLE view
AccessControl.personalData.blocking #BLOCKED_DATA_INCLUDED view
EndUserText.label SAF-T PT Billing One Time Custmer view

Fields (12)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode I_PT_BillgDocDgtlSgntr CompanyCode Receiver Company Code
KEY PortugueseInvoiceNumber I_PT_BillgDocDgtlSgntr PortugueseInvoiceNumber
BillingDocument SD BillingDocument SD Document
DocumentDate PortugueseInvoiceDate Date
Customer SD Customer Sold-to Party
CityNameelseDesconhecidoendendasCityName
PostalCodeelse0000000endendasPostalCode
CountryelseDesconhecidoendendasCountry
PhoneNumberendendasPhoneNumber
FaxNumberendendasFaxNumber
EmailAddressendendasEmailAddress
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_SAFTBillingOneTimeCust.
-- 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: IPTSAFTBILLOTC

CREATE VIEW I_PT_SAFTBillingOneTimeCust AS
SELECT
  Sig.CompanyCode AS CompanyCode,
  Sig.PortugueseInvoiceNumber AS PortugueseInvoiceNumber,
  SD.BillingDocument AS BillingDocument,
  PortugueseInvoiceDate AS DocumentDate,
  SD.Customer AS Customer,
  case when SD.CustomerVATRegistration is initial or SD.CustomerVATRegistration is null then 'Desconhecido' else case when SD._DfltAddrRprstn.CityName is not null and SD._DfltAddrRprstn.CityName is not initial then SD._DfltAddrRprstn.CityName when CM.CityName is not null and CM.CityName is not initial then CM.CityName else 'Desconhecido' end end as CityName AS CityNameelseDesconhecidoendendasCityName,
  case when SD.CustomerVATRegistration is initial or SD.CustomerVATRegistration is null then '0000-000' else case when SD._DfltAddrRprstn.PostalCode is not null and SD._DfltAddrRprstn.PostalCode is not initial then SD._DfltAddrRprstn.PostalCode when CM.PostalCode is not null and CM.PostalCode is not initial then CM.PostalCode else '0000-000' end end as PostalCode AS PostalCodeelse0000000endendasPostalCode,
  case when SD.CustomerVATRegistration is initial or SD.CustomerVATRegistration is null then 'Desconhecido' else case when SD._DfltAddrRprstn.Country is not null and SD._DfltAddrRprstn.Country is not initial then SD._DfltAddrRprstn.Country when CM.Country is not null and CM.Country is not initial then CM.Country else 'Desconhecido' end end as Country AS CountryelseDesconhecidoendendasCountry,
  case when SD.CustomerVATRegistration is initial or SD.CustomerVATRegistration is null then 'Desconhecido' else case when SD._DfltAddrRprstn._PhoneNumber[ 1: PhNmbrIsCurrentOverallDefault = 'X' ].InternationalPhoneNumber is not null and SD._DfltAddrRprstn._PhoneNumber[ 1: PhNmbrIsCurrentOverallDefault = 'X' ].InternationalPhoneNumber is not initial then SD._DfltAddrRprstn._PhoneNumber[ 1: PhNmbrIsCurrentOverallDefault = 'X' ].InternationalPhoneNumber when CM.PhoneNumber is not null and CM.PhoneNumber is not initial then CM.PhoneNumber end end as PhoneNumber AS PhoneNumberendendasPhoneNumber,
  case when SD.CustomerVATRegistration is initial or SD.CustomerVATRegistration is null then 'Desconhecido' else case when SD._DfltAddrRprstn._FaxNumber[ 1: FaxNumberIsCurrentDefault = 'X' ].InternationalFaxNumber is not null and SD._DfltAddrRprstn._FaxNumber[ 1: FaxNumberIsCurrentDefault = 'X' ].InternationalFaxNumber is not initial then SD._DfltAddrRprstn._FaxNumber[ 1: FaxNumberIsCurrentDefault = 'X' ].InternationalFaxNumber when CM.FaxNumber is not null and CM.FaxNumber is not initial then CM.FaxNumber end end as FaxNumber AS FaxNumberendendasFaxNumber,
  case when SD.CustomerVATRegistration is initial or SD.CustomerVATRegistration is null then 'Desconhecido' else case when SD._DfltAddrRprstn._EmailAddress[ 1: EmailAddressIsCurrentDefault = 'X' ].EmailAddress is not null and SD._DfltAddrRprstn._EmailAddress[ 1: EmailAddressIsCurrentDefault = 'X' ].EmailAddress is not initial then SD._DfltAddrRprstn._EmailAddress[ 1: EmailAddressIsCurrentDefault = 'X' ].EmailAddress when CM.EmailAddress is not null and CM.EmailAddress is not initial then CM.EmailAddress end end as EmailAddress AS EmailAddressendendasEmailAddress,
  ' ' AS WebsiteURL
INNER JOIN I_PT_BillgDocDgtlSgntr AS Sig 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 */
LEFT OUTER JOIN P_PT_SAFTCUSTMAX AS CM ON /* join condition not captured in parsed metadata */
;