C_PL_SAFTCompany

DDL: C_PL_SAFTCOMPANY SQL: CPLSAFTCOMPANY Type: view CONSUMPTION

SAFT PL Company

C_PL_SAFTCompany is a Consumption CDS View that provides data about "SAFT PL Company" in SAP S/4HANA. It reads from 2 data sources (I_CompanyCode, I_PL_SAFTGeneralSettings) and exposes 19 fields with key fields CompanyCode, ValidityEndDate.

Data Sources (2)

SourceAliasJoin Type
I_CompanyCode I_CompanyCode from
I_PL_SAFTGeneralSettings I_PL_SAFTGeneralSettings inner

Annotations (11)

NameValueLevelField
AbapCatalog.sqlViewName CPLSAFTCOMPANY view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #CHECK view
AccessControl.personalData.blocking #NOT_REQUIRED view
VDM.viewType #CONSUMPTION view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.serviceQuality #D view
ClientHandling.algorithm #SESSION_VARIABLE view
EndUserText.label SAFT PL Company view

Fields (19)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode I_PL_SAFTGeneralSettings CompanyCode
KEY ValidityEndDate I_PL_SAFTGeneralSettings ValidityEndDate
ValidityStartDate I_PL_SAFTGeneralSettings ValidityStartDate
EmailAddress I_PL_SAFTGeneralSettings EmailAddress
PL_OfficialEntityRegistration I_PL_SAFTGeneralSettings PL_OfficialEntityRegistration
PL_CompanyDistrictName I_PL_SAFTGeneralSettings PL_CompanyDistrictName
PL_CompanySubDistrictName I_PL_SAFTGeneralSettings PL_CompanySubDistrictName
PL_TaxOfficeCode I_PL_SAFTGeneralSettings PL_TaxOfficeCode
BusinessPartnerName41asCompanyName
CityName
PostalCode
StreetName
HouseNumber
HouseNumberSupplementText
HomeCityNameendasHomeCityName
RegionNameendasRegion
CompanyVATRegistration
CompanyCodeCurrency I_CompanyCode Currency
_Currency _Currency
@AbapCatalog.sqlViewName: 'CPLSAFTCOMPANY'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey:true
@AccessControl.authorizationCheck: #CHECK
@AccessControl.personalData.blocking: #NOT_REQUIRED
@VDM.viewType: #CONSUMPTION
@ObjectModel.usageType.sizeCategory: #L
@ObjectModel.usageType.dataClass:  #MIXED
@ObjectModel.usageType.serviceQuality: #D
@ClientHandling.algorithm: #SESSION_VARIABLE
@EndUserText.label: 'SAFT PL Company'
define view C_PL_SAFTCompany
  as select from I_CompanyCode
    inner join   I_PL_SAFTGeneralSettings on I_CompanyCode.CompanyCode = I_PL_SAFTGeneralSettings.CompanyCode
{
  key I_PL_SAFTGeneralSettings.CompanyCode,
  key I_PL_SAFTGeneralSettings.ValidityEndDate,
      I_PL_SAFTGeneralSettings.ValidityStartDate,

      I_PL_SAFTGeneralSettings.EmailAddress,
      I_PL_SAFTGeneralSettings.PL_OfficialEntityRegistration,
      I_PL_SAFTGeneralSettings.PL_CompanyDistrictName,
      I_PL_SAFTGeneralSettings.PL_CompanySubDistrictName,
      I_PL_SAFTGeneralSettings.PL_TaxOfficeCode,   
      
      concat_with_space(
        concat_with_space(
            concat_with_space(
              I_CompanyCode._Address.BusinessPartnerName1,
              I_CompanyCode._Address.BusinessPartnerName2, 1),
              I_CompanyCode._Address.BusinessPartnerName3, 1),
              I_CompanyCode._Address.BusinessPartnerName4, 1)   as CompanyName,

      I_CompanyCode._Address.CityName                           as CityName,
      I_CompanyCode._Address.PostalCode                         as PostalCode,
      I_CompanyCode._Address.StreetName                         as StreetName,
      I_CompanyCode._Address.HouseNumber                        as HouseNumber,
      I_CompanyCode._Address.HouseNumberSupplementText          as HouseNumberSupplementText,
      case when I_CompanyCode._Address.HomeCityName is initial
        then I_CompanyCode._Address.CityName
        else I_CompanyCode._Address.HomeCityName
      end                                                 as HomeCityName,
      case when I_CompanyCode._Address.Region  is initial
        then 'Nie dotyczy'
        else  I_CompanyCode._Address._Region._RegionText[1: Language = 'L'].RegionName
      end                                                 as Region,

      replace(I_CompanyCode.VATRegistration,I_CompanyCode.Country,'') as CompanyVATRegistration,

      @Semantics.currencyCode: true
      I_CompanyCode.Currency                                    as CompanyCodeCurrency,
      
      _Currency

}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_ADDRESS",
"I_COMPANYCODE",
"I_PL_SAFTGENERALSETTINGS",
"I_REGION",
"I_REGIONTEXT"
],
"ASSOCIATED":
[
"I_CURRENCY"
],
"BASE":
[
"I_COMPANYCODE"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/