C_PT_SAFTGenLedgerBPAddress
SAFT PT BP Address Info for Master Data
C_PT_SAFTGenLedgerBPAddress is a Consumption CDS View that provides data about "SAFT PT BP Address Info for 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 (9)
| Name | Value | Level | Field |
|---|---|---|---|
| AccessControl.authorizationCheck | #MANDATORY | view | |
| VDM.viewType | #CONSUMPTION | view | |
| EndUserText.label | SAFT PT BP Address Info for Master Data | view | |
| Metadata.ignorePropagatedAnnotations | true | view | |
| AccessControl.personalData.blocking | #BLOCKED_DATA_INCLUDED | view | |
| VDM.lifecycle.status | #DEPRECATED | view | |
| ObjectModel.usageType.serviceQuality | #X | view | |
| ObjectModel.usageType.sizeCategory | #S | view | |
| ObjectModel.usageType.dataClass | #MIXED | view |
Fields (16)
| 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 | ||
| BPCustomerNameendendendasCompanyName | ||||
| PersonFullNameendendasContactPersonName | ||||
| StreetNameendendasStreetName | ||||
| CityNameendendendasCityName | ||||
| PostalCodeendendendasEventPostalCode | ||||
| char50asCountryName | ||||
| _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_SAFTGenLedgerBPAddress.
-- 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_SAFTGenLedgerBPAddress 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,
case when Document.Supplier is not initial then case Document._Supplier.IsOneTimeAccount when 'X' then cast( case when Document._Supplier.SupplierName is not initial and Document._Supplier.SupplierName is not null then Document._Supplier.SupplierName when _Address.OrganizationName1 is not initial and _Address.OrganizationName1 is not null then _Address.OrganizationName1 else 'Consumidor Final' end as bu_name1tx) else Document._Supplier.SupplierName end else case Document._Customer.IsOneTimeAccount when 'X' then cast( case when Document._Customer.BPCustomerName is not initial and Document._Customer.BPCustomerName is not null then Document._Customer.BPCustomerName when _Address.OrganizationName1 is not initial and _Address.OrganizationName1 is not null then _Address.OrganizationName1 else 'Consumidor Final' end as bu_name1tx) else case when _CustHist.CompanyName is not initial then _CustHist.CompanyName else Document._Customer.BPCustomerName end end end as CompanyName AS BPCustomerNameendendendasCompanyName,
case when Document.Supplier is not initial then '' else case when _CustHist.ContactPersonName is not initial then _CustHist.ContactPersonName else Document._Customer._ContactPerson.PersonFullName end end as ContactPersonName AS PersonFullNameendendasContactPersonName,
case Document._Customer.IsOneTimeAccount when 'X' then case when Document._Customer.StreetName is not initial and Document._Customer.StreetName is not null then cast(concat_with_space(concat_with_space((concat_with_space( concat_with_space(Document._Customer.StreetName,Document._Customer._AddressDefaultRepresentation.StreetPrefixName1,1), concat_with_space(Document._Customer._AddressDefaultRepresentation.StreetPrefixName2,Document._Customer._AddressDefaultRepresentation.StreetSuffixName1,1),1) ),Document._Customer._AddressDefaultRepresentation.StreetSuffixName2,1),Document._Customer._AddressDefaultRepresentation.HouseNumber,1) as fieu_address) when _Address.StreetName is not initial and _Address.StreetName is not null then cast(concat_with_space(concat_with_space((concat_with_space( concat_with_space(_Address.StreetName,_Address.StreetPrefixName1,1), concat_with_space(_Address.StreetPrefixName2,_Address.StreetSuffixName1,1),1) ),_Address.StreetSuffixName2,1),_Address.HouseNumber,1) as fieu_address) else 'Desconhecido' end else case when _CustHist.PT_SAFTBPFullAddressText is not initial then _CustHist.PT_SAFTBPFullAddressText else Document._Customer.StreetName end end as StreetName AS StreetNameendendasStreetName,
case when Document.Supplier is not initial then case Document._Supplier.IsOneTimeAccount when 'X' then case when Document._Supplier.CityName is not initial and Document._Supplier.CityName is not null then Document._Supplier.CityName when _Address.CityName is not initial and _Address.CityName is not null then _Address.CityName else 'Desconhecido' end else Document._Supplier.CityName end else case Document._Customer.IsOneTimeAccount when 'X' then case when Document._Customer.CityName is not initial and Document._Customer.CityName is not null then Document._Customer.CityName when _Address.CityName is not initial and _Address.CityName is not null then _Address.CityName else 'Desconhecido' end else case when _CustHist.CityName is not initial then _CustHist.CityName else Document._Customer.CityName end end end as CityName AS CityNameendendendasCityName,
case when Document.Supplier is not initial then case Document._Supplier.IsOneTimeAccount when 'X' then case when Document._Supplier.PostalCode is not initial and Document._Supplier.PostalCode is not null then Document._Supplier.PostalCode when _Address.PostalCode is not initial and _Address.PostalCode is not null then _Address.PostalCode else 'Desconhecido' end else Document._Supplier.PostalCode end else case Document._Customer.IsOneTimeAccount when 'X' then case when Document._Customer.PostalCode is not initial and Document._Customer.PostalCode is not null then Document._Customer.PostalCode when _Address.PostalCode is not initial and _Address.PostalCode is not null then _Address.PostalCode else '0000-000' end else case when _CustHist.PostalCode is not initial then _CustHist.PostalCode else Document._Customer.PostalCode end end end as EventPostalCode AS PostalCodeendendendasEventPostalCode,
cast( case when Document.Supplier is not initial then case Document._Supplier.IsOneTimeAccount when 'X' then case when Document._Supplier.Country is not initial and Document._Supplier.Country is not null then Document._Supplier.Country when _Address.Country is not initial and _Address.Country is not null then _Address.Country else 'Desconhecido' end else Document._Supplier.Country end else case Document._Customer.IsOneTimeAccount when 'X' then case when Document._Customer.Country is not initial and Document._Customer.Country is not null then Document._Customer.Country when _Address.Country is not initial and _Address.Country is not null then _Address.Country else 'Desconhecido' end else case when _CustHist.Country is not initial then _CustHist.Country else Document._Customer.Country end end end as abap.char(50)) as CountryName AS char50asCountryName,
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