Deprecated
This CDS view is deprecated in S/4HANA. View all deprecated CDS views →

C_PT_SAFTGenLedgerBPAddress

DDL: C_PT_SAFTGENLEDGERBPADDRESS Type: view_entity CONSUMPTION

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)

CardinalityTargetAliasCondition
[0..1] I_Address_2 _Address Document.AddressID = _Address.AddressID

Annotations (9)

NameValueLevelField
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)

KeyFieldSource TableSource FieldDescription
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]
;