I_PT_SAFTOneTimeCustBillg
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)
| Source | Alias | Join Type |
|---|---|---|
| I_PT_SAFTIsAlternateAccount | c | inner |
| I_PT_SAFTIsAlternateAccount | c | inner |
| I_SDDocumentCompletePartners | Cust | inner |
| I_SDDocumentCompletePartners | Cust | inner |
| I_CustomerCompany | CustCompany | inner |
| I_CustomerCompany | CustCompany | inner |
| I_GLAccountInCompanyCode | f | inner |
| I_GLAccountInCompanyCode | f | inner |
| I_BillingDocument | SDDoc | inner |
| I_InvoiceList | SDDoc | union |
| I_PT_BillgDocDgtlSgntr | Sig | from |
| I_PT_BillgDocDgtlSgntr | Sig | inner |
Annotations (8)
| Name | Value | Level | Field |
|---|---|---|---|
| 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)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| 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
;
Learn More
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- CDS View Annotations — A Complete Guide
- What Is a CDS View in SAP S/4HANA?
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- CDS View Field Mapping and Associations
- Understanding the SAP S/4HANA Data Model
- CDS View Extensions and Custom Fields in SAP S/4HANA
- Released APIs and Stability Contracts in SAP S/4HANA
- BSEG to ACDOCA: The Universal Journal Migration
- Business Partner Migration: KNA1/LFA1 to BUT000
- Material Document Migration: MSEG/MKPF to MATDOC
- How to Find the Right CDS View for an SAP Table
- BW Extractor to CDS View Migration Guide
- S/4HANA CDS View Deprecation: What You Need to Know
- ABAP CDS View Tutorial — From Basics to Real-World Examples
- RAP and CDS Views — Building Transactional Apps in SAP S/4HANA
- Sales Document Status Migration: VBUP/VBUK Removal in S/4HANA
- CO Tables in S/4HANA: COEP, COBK, COSS, COSP to ACDOCA