C_LU_SAFTHeader

DDL: C_LU_SAFTHEADER SQL: CLUSAFTHEADER Type: view CONSUMPTION

SAFT LU Header

C_LU_SAFTHeader is a Consumption CDS View that provides data about "SAFT LU Header" in SAP S/4HANA. It reads from 2 data sources (I_LU_SAFTGenericSettings, I_SAFTHeader) and exposes 21 fields with key fields CompanyCode, StartDate, EndDate, FiscalYear. It has 2 associations to related views.

Data Sources (2)

SourceAliasJoin Type
I_LU_SAFTGenericSettings GenSet inner
I_SAFTHeader head from

Associations (2)

CardinalityTargetAliasCondition
[1..1] I_AddlCompanyCodeInformation _ContactFirstName $projection.CompanyCode = _ContactFirstName.CompanyCode and _ContactFirstName.CompanyCodeParameterType = 'FNAME'
[1..1] I_AddlCompanyCodeInformation _ContactLastName $projection.CompanyCode = _ContactLastName.CompanyCode and _ContactLastName.CompanyCodeParameterType = 'LNAME'

Annotations (11)

NameValueLevelField
AbapCatalog.sqlViewName CLUSAFTHEADER view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.dataClass #MIXED view
ClientHandling.algorithm #SESSION_VARIABLE view
AccessControl.personalData.blocking #BLOCKED_DATA_INCLUDED view
AccessControl.authorizationCheck #CHECK view
VDM.viewType #CONSUMPTION view
EndUserText.label SAFT LU Header view

Fields (21)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode I_SAFTHeader CompanyCode
KEY StartDate StartDate
KEY EndDate EndDate
KEY FiscalYear FiscalYear
VATRegistration
CompanyCodeNameendasCompanyName
StreetName
HouseNumber
CityNameendasCityName
PostalCode
Country
EmbeddedSwVersionStatusDesc vers EmbeddedSwVersionStatusDesc
AddressID
Person
FirstName _ContactFirstName CompanyCodeParameterValue
LastName _ContactLastName CompanyCodeParameterValue
PhoneNumber
FaxNumber
EmailAddress
URLFieldLength
WebsiteURL
@AbapCatalog.sqlViewName: 'CLUSAFTHEADER'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@ObjectModel.usageType.serviceQuality: #D
@ObjectModel.usageType.sizeCategory: #XL
@ObjectModel.usageType.dataClass: #MIXED
@ClientHandling.algorithm: #SESSION_VARIABLE
@AccessControl.personalData.blocking: #BLOCKED_DATA_INCLUDED
@AccessControl.authorizationCheck: #CHECK
@VDM.viewType: #CONSUMPTION
@EndUserText.label: 'SAFT LU Header'
define view C_LU_SAFTHeader
  as select from I_SAFTHeader         as head
    join         I_SAFTProductVersion as vers on  vers.ObjectName              is not initial
                                              and EmbeddedSwVersionDescription is initial
                                              
    inner join            I_LU_SAFTGenericSettings       as GenSet  on  GenSet.CompanyCode    =  head.CompanyCode
                                                                    and GenSet.FiscalYearFrom <= head.FiscalYear
                                                                    and GenSet.FiscalYearTo   >= head.FiscalYear


  association [1..1] to I_AddlCompanyCodeInformation as _ContactFirstName on  $projection.CompanyCode                    = _ContactFirstName.CompanyCode
                                                                          and _ContactFirstName.CompanyCodeParameterType = 'FNAME'

  association [1..1] to I_AddlCompanyCodeInformation as _ContactLastName  on  $projection.CompanyCode                   = _ContactLastName.CompanyCode
                                                                          and _ContactLastName.CompanyCodeParameterType = 'LNAME'
{
  key head.CompanyCode,
  key StartDate,
  key EndDate,
  key FiscalYear,
      cast(head._CompanyCode.VATRegistration as abap.char(20))                            as VATRegistration,
      case
        when head._CompanyCode._Address.BusinessPartnerName1 is not initial
          then concat_with_space (head._CompanyCode._Address.BusinessPartnerName1, head._CompanyCode._Address.BusinessPartnerName2, 1)
          else head._CompanyCode.CompanyCodeName end                                as CompanyName,

      head._CompanyCode._Address.StreetName                                         as StreetName,
      head._CompanyCode._Address.HouseNumber,

      case
        when head._CompanyCode.CityName is not initial
          then head._CompanyCode.CityName
          else
              head._CompanyCode._Address.CityName end                               as CityName,
      head._CompanyCode._Address.PostalCode                                         as PostalCode,
      head._CompanyCode._Address.Country                                            as Country,
      vers.EmbeddedSwVersionStatusDesc                                              as EmbeddedSwVersionStatusDesc,
      head._CompanyCode._Address.AddressID                                          as AddressID,
      head._CompanyCode._Address.Person                                             as Person,
      _ContactFirstName.CompanyCodeParameterValue                                   as FirstName,
      _ContactLastName.CompanyCodeParameterValue                                    as LastName,
      head._CompanyCode._Address._DefaultPhoneNumber.PhoneNumber                    as PhoneNumber,
      cast(head._CompanyCode._Address._DefaultFaxNumber.FaxNumber as abap.char(31)) as FaxNumber,
      head._CompanyCode._Address._DefaultEmailAddress.EmailAddress                  as EmailAddress,
      head._CompanyCode._Address._DefaultURLAddress.URLFieldLength                  as URLFieldLength,
      lower(head._CompanyCode._Address._DefaultURLAddress.SearchURLAddress)         as WebsiteURL
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_ADDLCOMPANYCODEINFORMATION",
"I_ADDRESS",
"I_ADDRESSEMAILADDRESS",
"I_ADDRESSFAXNUMBER",
"I_ADDRESSHOMEPAGEURL",
"I_ADDRESSPHONENUMBER",
"I_COMPANYCODE",
"I_LU_SAFTGENERICSETTINGS",
"I_SAFTHEADER",
"I_SAFTPRODUCTVERSION"
],
"ASSOCIATED":
[
"I_ADDLCOMPANYCODEINFORMATION"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/