C_PT_SAFTGenLdgrCustVATReg

DDL: C_PT_SAFTGENLDGRCUSTVATREG Type: view_entity CONSUMPTION

SAFTPT Customer VAT Reg Master Data

C_PT_SAFTGenLdgrCustVATReg is a Consumption CDS View that provides data about "SAFTPT Customer VAT Reg Master Data" in SAP S/4HANA. It reads from 3 data sources (C_PT_SAFTAccountGenLedgerC, I_PT_SAFTIsAlternateAccount, I_GLAccountInCompanyCode) and exposes 7 fields with key fields CompanyCode, FiscalYear, BusinessPartnerCustomer.

Data Sources (3)

SourceAliasJoin Type
C_PT_SAFTAccountGenLedgerC Account inner
I_PT_SAFTIsAlternateAccount AltAccount inner
I_GLAccountInCompanyCode GLAccount inner

Annotations (8)

NameValueLevelField
AccessControl.authorizationCheck #MANDATORY view
AccessControl.personalData.blocking #BLOCKED_DATA_INCLUDED view
VDM.viewType #CONSUMPTION view
EndUserText.label SAFTPT Customer VAT Reg Master Data view
Metadata.ignorePropagatedAnnotations true view
ObjectModel.usageType.serviceQuality #X view
ObjectModel.usageType.sizeCategory #S view
ObjectModel.usageType.dataClass #MIXED view

Fields (7)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode Document CompanyCode Receiver Company Code
KEY FiscalYear Document FiscalYear G/L Fiscal Year
KEY BusinessPartnerCustomer Document BusinessPartnerCustomer CHAR35
char20asVATRegistration
_CompanyCode Document _CompanyCode
_FiscalYear Document _FiscalYear
IsOneTimeAccount

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 C_PT_SAFTGenLdgrCustVATReg.
-- 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 C_PT_SAFTGenLdgrCustVATReg AS
SELECT
  Document.CompanyCode AS CompanyCode,
  Document.FiscalYear AS FiscalYear,
  Document.BusinessPartnerCustomer AS BusinessPartnerCustomer,
  cast( case Document._Customer.IsOneTimeAccount when 'X' then VATReg.VATRegistration else case when Document._Customer.VATRegistration is not initial then substring(Document._Customer.VATRegistration ,3,18) else 'Desconhecido' end end as abap.char(20)) as VATRegistration AS char20asVATRegistration,
  Document._CompanyCode AS _CompanyCode,
  Document._FiscalYear AS _FiscalYear,
  Document._Customer.IsOneTimeAccount AS IsOneTimeAccount
INNER JOIN C_PT_SAFTAccountGenLedgerC AS Account ON /* join condition not captured in parsed metadata */
INNER JOIN I_PT_SAFTIsAlternateAccount AS AltAccount ON /* join condition not captured in parsed metadata */
INNER JOIN I_GLAccountInCompanyCode AS GLAccount ON /* join condition not captured in parsed metadata */
;