P_PL_SAFTInvoiceFileHeading

DDL: P_PL_SAFTINVOICEFILEHEADING SQL: PPLSAFTINVFILEH Type: view CONSUMPTION

P_PL_SAFTInvoiceFileHeading is a Consumption CDS View in SAP S/4HANA. It reads from 2 data sources (I_CompanyCode, I_PL_SAFTGeneralSettings) and exposes 19 fields with key field CompanyCode.

Data Sources (2)

SourceAliasJoin Type
I_CompanyCode Company from
I_PL_SAFTGeneralSettings Settings inner

Parameters (2)

NameTypeDefault
P_StartDate datum
P_EndDate datum

Annotations (10)

NameValueLevelField
AbapCatalog.sqlViewName PPLSAFTINVFILEH view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #CHECK view
VDM.private true view
VDM.viewType #CONSUMPTION view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.serviceQuality #P view
ClientHandling.algorithm #SESSION_VARIABLE view

Fields (19)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode I_CompanyCode CompanyCode Receiver Company Code
BusinessPartnerName41asCompanyName
HouseNumber1asCompanyCodeAddress
RegionNameendasRegion
CityName
PostalCode
StreetName
HouseNumber
HouseNumberSupplementText
PhoneNumber
HomeCityNameendasHomeCityName
CompanyVATRegistration
EmailAddress I_PL_SAFTGeneralSettings EmailAddress E-Mail Address
PL_TaxOfficeCode I_PL_SAFTGeneralSettings PL_TaxOfficeCode Tax Office Code
PL_CompanyDistrictName I_PL_SAFTGeneralSettings PL_CompanyDistrictName District Court
PL_CompanySubDistrictName I_PL_SAFTGeneralSettings PL_CompanySubDistrictName Sub District
CompanyCodeCurrency I_CompanyCode Currency Valuation Crcy
Country I_CompanyCode Country Venue: Ctry/Reg
_Currency _Currency

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 P_PL_SAFTInvoiceFileHeading.
-- 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.
-- SQL view name: PPLSAFTINVFILEH
-- Parameters: P_StartDate : datum, P_EndDate : datum

CREATE VIEW P_PL_SAFTInvoiceFileHeading AS
SELECT
  Company.CompanyCode AS CompanyCode,
  concat_with_space( concat_with_space( concat_with_space( Company._Address.BusinessPartnerName1, Company._Address.BusinessPartnerName2, 1), Company._Address.BusinessPartnerName3, 1), Company._Address.BusinessPartnerName4, 1) as CompanyName AS BusinessPartnerName41asCompanyName,
  concat_with_space(concat_with_space(concat_with_space( Company._Address.CityName, Company._Address.PostalCode, 1), Company._Address.StreetName, 1), Company._Address.HouseNumber, 1) as CompanyCodeAddress AS HouseNumber1asCompanyCodeAddress,
  case when Company._Address.Region is initial then 'Nie dotyczy' else Company._Address._Region._RegionText[1: Language = 'L'].RegionName end as Region AS RegionNameendasRegion,
  Company._Address.CityName AS CityName,
  Company._Address.PostalCode AS PostalCode,
  Company._Address.StreetName AS StreetName,
  Company._Address.HouseNumber AS HouseNumber,
  Company._Address.HouseNumberSupplementText AS HouseNumberSupplementText,
  Company._Address.PhoneNumber AS PhoneNumber,
  case when Company._Address.HomeCityName is initial then Company._Address.CityName else Company._Address.HomeCityName end as HomeCityName AS HomeCityNameendasHomeCityName,
  replace(Company.VATRegistration, Company.Country,'') AS CompanyVATRegistration,
  Settings.EmailAddress AS EmailAddress,
  Settings.PL_TaxOfficeCode AS PL_TaxOfficeCode,
  Settings.PL_CompanyDistrictName AS PL_CompanyDistrictName,
  Settings.PL_CompanySubDistrictName AS PL_CompanySubDistrictName,
  Company.Currency AS CompanyCodeCurrency,
  Company.Country AS Country
FROM I_CompanyCode AS Company
INNER JOIN I_PL_SAFTGeneralSettings AS Settings ON /* join condition not captured in parsed metadata */
;