I_PT_SAFTOneTimeCustBillg

DDL: I_PT_SAFTONETIMECUSTBILLG Type: view_entity COMPOSITE

One Time Customer from Billing Document

I_PT_SAFTOneTimeCustBillg is a Composite CDS View that provides data about "One Time Customer from Billing Document" in SAP S/4HANA. It reads from 12 data sources and exposes 25 fields with key fields BillingDocument, FiscalYear, CompanyCode, PartnerFunction, DocumentDate.

Data Sources (12)

Annotations (8)

NameValueLevelField
AccessControl.authorizationCheck #MANDATORY view
VDM.viewType #COMPOSITE view
AccessControl.personalData.blocking #BLOCKED_DATA_INCLUDED view
EndUserText.label One Time Customer from Billing Document view
Metadata.ignorePropagatedAnnotations true view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.dataClass #MIXED view

Fields (25)

KeyFieldSource TableSource FieldDescription
KEY BillingDocument I_InvoiceList BillingDocument SD Document
KEY FiscalYear I_InvoiceList FiscalYear G/L Fiscal Year
KEY CompanyCode I_InvoiceList CompanyCode Receiver Company Code
KEY PartnerFunction Partner Functn
KEY DocumentDate I_InvoiceList BillingDocumentDate Billing Date
PortugueseInvoiceNumber I_PT_BillgDocDgtlSgntr PortugueseInvoiceNumber
Customer I_SDDocumentCompletePartners Customer Sold-to Party
IsOneTimeAccount I_SDDocumentCompletePartners PartnerIsOneTimeAccount One-time acct
PayerParty I_InvoiceList PayerParty Payer
AddressID
char20asCustomerVATRegistration
VATRegistration12endasCountry
InvoiceListasBillingDocument
KEY FiscalYear I_InvoiceList FiscalYear G/L Fiscal Year
KEY CompanyCode I_InvoiceList CompanyCode Receiver Company Code
KEY PartnerFunction I_SDDocumentCompletePartners PartnerFunction Partner Functn
KEY DocumentDate I_InvoiceList InvoiceListBillingDate Billing Date
PortugueseInvoiceNumber I_PT_BillgDocDgtlSgntr PortugueseInvoiceNumber
Customer I_SDDocumentCompletePartners Customer Sold-to Party
IsOneTimeAccount I_SDDocumentCompletePartners PartnerIsOneTimeAccount One-time acct
PayerParty I_InvoiceList PayerParty Payer
AddressID
VATRegistration12endasCountry
ReconciliationAccount I_CustomerCompany ReconciliationAccount Recon. account
_PayerParty I_InvoiceList _PayerParty

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_SAFTOneTimeCustBillg.
-- 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.

CREATE VIEW I_PT_SAFTOneTimeCustBillg AS
SELECT
  SDDoc.BillingDocument AS BillingDocument,
  SDDoc.FiscalYear AS FiscalYear,
  SDDoc.CompanyCode AS CompanyCode,
  cast(Cust.PartnerFunction as parvw_unv) AS PartnerFunction,
  SDDoc.BillingDocumentDate AS DocumentDate,
  Sig.PortugueseInvoiceNumber AS PortugueseInvoiceNumber,
  Cust.Customer AS Customer,
  Cust.PartnerIsOneTimeAccount AS IsOneTimeAccount,
  SDDoc.PayerParty AS PayerParty,
  SDDoc._PayerParty.AddressID AS AddressID,
  cast(case when SDDoc.VATRegistration is not initial or SDDoc.VATRegistration is not null then substring(SDDoc.VATRegistration,3,18) else case when Tax.TaxNumber1 is not initial then Tax.TaxNumber1 else case when Tax.TaxNumber2 is not initial then Tax.TaxNumber2 else case when Tax.TaxNumber3 is not initial then Tax.TaxNumber3 else case when Tax.TaxNumber5 is not initial then Tax.TaxNumber5 end end end end end as abap.char(20)) as CustomerVATRegistration AS char20asCustomerVATRegistration,
  case when SDDoc.VATRegistration is initial or SDDoc.VATRegistration is null then SDDoc.Country else substring(SDDoc.VATRegistration,1,2) end as Country AS VATRegistration12endasCountry,
  CustCompany.ReconciliationAccount AS ReconciliationAccount,
  SDDoc._PayerParty AS _PayerParty
FROM I_PT_BillgDocDgtlSgntr AS Sig
INNER JOIN I_BillingDocument AS SDDoc ON /* join condition not captured in parsed metadata */
INNER JOIN I_SDDocumentCompletePartners AS Cust ON /* join condition not captured in parsed metadata */
INNER JOIN I_CustomerCompany AS CustCompany 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 */
INNER JOIN I_PT_BillgDocDgtlSgntr AS Sig ON /* join condition not captured in parsed metadata */
-- UNION with additional select branch(es): I_InvoiceList
;