C_PT_SAFTGenLedgerBPContact
SAFT PT BP Contact Master Data
C_PT_SAFTGenLedgerBPContact is a Consumption CDS View that provides data about "SAFT PT BP Contact Master Data" in SAP S/4HANA. It has 1 association to related views.
Associations (1)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | I_Address_2 | _Address | Document.AddressID = _Address.AddressID |
Annotations (10)
| Name | Value | Level | Field |
|---|---|---|---|
| AccessControl.authorizationCheck | #MANDATORY | view | |
| VDM.viewType | #CONSUMPTION | view | |
| EndUserText.label | SAFT PT BP Contact Master Data | view | |
| Metadata.ignorePropagatedAnnotations | true | view | |
| AccessControl.personalData.blocking | #BLOCKED_DATA_INCLUDED | view | |
| ObjectModel.usageType.serviceQuality | #X | view | |
| ObjectModel.usageType.sizeCategory | #S | view | |
| ObjectModel.usageType.dataClass | #MIXED | view | |
| VDM.lifecycle.status | #DEPRECATED | view | |
| VDM.lifecycle.successor | NoSuccessor | view |
Fields (13)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | CompanyCode | Document | CompanyCode | Receiver Company Code |
| KEY | FiscalYear | Document | FiscalYear | G/L Fiscal Year |
| Customer | Document | Customer | Sold-to Party | |
| VATRegistration | ||||
| BusinessPartnerCustomer | BusinessPartnerCustomer | CHAR35 | ||
| Supplier | Document | Supplier | Supplier | |
| DelivOfGoodsDestCountry | DelivOfGoodsDestCountry | Dest. C/R | ||
| IsOneTimeAccount | IsOneTimeAccount | One-time acct | ||
| char31asFaxNumber | ||||
| EmailAddressendendendasEmailAddress | ||||
| SearchURLAddressendendendasWebsiteURL | ||||
| _CompanyCode | Document | _CompanyCode | ||
| _FiscalYear | Document | _FiscalYear |
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_SAFTGenLedgerBPContact.
-- 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_SAFTGenLedgerBPContact AS
SELECT
Document.CompanyCode AS CompanyCode,
Document.FiscalYear AS FiscalYear,
Document.Customer AS Customer,
cast(' ' as stceg) AS VATRegistration,
BusinessPartnerCustomer,
Document.Supplier AS Supplier,
DelivOfGoodsDestCountry,
IsOneTimeAccount,
cast(case when Document.Supplier is not initial then case Document._Supplier.IsOneTimeAccount when 'X' then case when Document._Supplier._AddressDefaultRepresentation._FaxNumber.InternationalFaxNumber is not initial and Document._Supplier._AddressDefaultRepresentation._FaxNumber.InternationalFaxNumber is not null then Document._Supplier._AddressDefaultRepresentation._FaxNumber.InternationalFaxNumber when _Address._FaxNumber.InternationalFaxNumber is not initial and _Address._FaxNumber.InternationalFaxNumber is not null then _Address._FaxNumber.InternationalFaxNumber else 'Desconhecido' end else Document._Supplier._AddressDefaultRepresentation._FaxNumber.InternationalFaxNumber end else case Document._Customer.IsOneTimeAccount when 'X' then case when Document._Customer._AddressDefaultRepresentation._FaxNumber.InternationalFaxNumber is not initial and Document._Customer._AddressDefaultRepresentation._FaxNumber.InternationalFaxNumber is not null then Document._Customer._AddressDefaultRepresentation._FaxNumber.InternationalFaxNumber when _Address._FaxNumber.InternationalFaxNumber is not initial and _Address._FaxNumber.InternationalFaxNumber is not null then _Address._FaxNumber.InternationalFaxNumber else 'Desconhecido' end else case when _CustHist.FaxNumber is not initial then _CustHist.FaxNumber else Document._Customer._AddressDefaultRepresentation._FaxNumber.InternationalFaxNumber end end end as abap.char(31)) as FaxNumber AS char31asFaxNumber,
case when Document.Supplier is not initial then case Document._Supplier.IsOneTimeAccount when 'X' then case when Document._Supplier._AddressDefaultRepresentation._EmailAddress.EmailAddress is not initial and Document._Supplier._AddressDefaultRepresentation._EmailAddress.EmailAddress is not null then Document._Supplier._AddressDefaultRepresentation._EmailAddress.EmailAddress when _Address._EmailAddress.EmailAddress is not initial and _Address._EmailAddress.EmailAddress is not null then _Address._EmailAddress.EmailAddress else 'Desconhecido' end else Document._Supplier._AddressDefaultRepresentation._EmailAddress.EmailAddress end else case Document._Customer.IsOneTimeAccount when 'X' then case when Document._Customer._AddressDefaultRepresentation._EmailAddress.EmailAddress is not initial and Document._Customer._AddressDefaultRepresentation._EmailAddress.EmailAddress is not null then Document._Customer._AddressDefaultRepresentation._EmailAddress.EmailAddress when _Address._EmailAddress.EmailAddress is not initial and _Address._EmailAddress.EmailAddress is not null then _Address._EmailAddress.EmailAddress else 'Desconhecido' end else case when _CustHist.EmailAddress is not initial then _CustHist.EmailAddress else Document._Customer._AddressDefaultRepresentation._EmailAddress.EmailAddress end end end as EmailAddress AS EmailAddressendendendasEmailAddress,
case when Document.Supplier is not initial then '' else case Document._Customer.IsOneTimeAccount when 'X' then ' ' else case when _CustHist.SearchURLAddress is not initial then _CustHist.SearchURLAddress end end end as WebsiteURL AS SearchURLAddressendendendasWebsiteURL,
Document._CompanyCode AS _CompanyCode,
Document._FiscalYear AS _FiscalYear
LEFT OUTER JOIN I_Address_2 AS _Address ON Document.AddressID = _Address.AddressID -- association [0..1]
;
Learn More
- S/4HANA CDS View Deprecation: What You Need to Know
- 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
- 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