P_PRODCMPLNCPHRSTXTWTHFALLBACK

CDS View

Helper view for text fallback with phrase texts

P_PRODCMPLNCPHRSTXTWTHFALLBACK is a CDS View in S/4HANA. Helper view for text fallback with phrase texts. 1 CDS views read from this table.

CDS Views using this table (1)

ViewTypeJoinVDMDescription
I_ProdCmplncPhrsTxtWthFallback view from COMPOSITE Text for every Phrase in every Language
@AbapCatalog: {
  sqlViewName: 'PPHRSTXTFB',
  compiler.compareFilter: true,
  preserveKey: true }

@AccessControl.authorizationCheck: #NOT_REQUIRED

@ClientHandling.algorithm: #SESSION_VARIABLE

@ObjectModel: {
  usageType: {
    serviceQuality: #A,
    sizeCategory:  #L,
    dataClass: #MASTER },
  representativeKey: 'ProdCmplncPhrsUUID' }

@VDM: {
  viewType: #COMPOSITE,
  private: true }
  
define view P_ProdCmplncPhrsTxtWthFallback
  as select from I_ProdCmplncPhrs as ProdCmplncPhrs
  association [0..1] to I_ProdCmplncPhrsText as _ProdCmplncPhrsTextILL     on  _ProdCmplncPhrsTextILL.ProdCmplncPhrsUUID = $projection.ProdCmplncPhrsUUID
                                                                           and _ProdCmplncPhrsTextILL.Language           = $session.system_language
  association [0..1] to I_ProdCmplncPhrsText as _ProdCmplncPhrsEnglishText on  _ProdCmplncPhrsEnglishText.ProdCmplncPhrsUUID = $projection.ProdCmplncPhrsUUID
                                                                           and _ProdCmplncPhrsEnglishText.Language           = 'E'

{
      /**** Keys ****/

  key ProdCmplncPhrs.ProdCmplncPhrsUUID             as ProdCmplncPhrsUUID,

      //      //Needed for VDM conformity - a text node needs the language as a key field - Is it an issue if we leave it out?

      //      @Semantics.language: true

      //  key cast($session.system_language as langu preserving type )                       as Language,



      /**** Content ****/

      @Semantics.text: true
      cast(
        case
           when _ProdCmplncPhrsTextILL.ProdCmplncPhrsText is not null
             then _ProdCmplncPhrsTextILL.ProdCmplncPhrsText
           when  _ProdCmplncPhrsTextILL.ProdCmplncPhrsText is null
            and _ProdCmplncPhrsEnglishText.ProdCmplncPhrsText is not null
             then _ProdCmplncPhrsEnglishText.ProdCmplncPhrsText
        end
      // There might be a bit of text which is cut of with this cast. We can't work around this, as the case can't result in anything longer.

      as ehfnd_phrs_text preserving type )          as ProdCmplncPhrsText,

      ProdCmplncPhrs                                as ProdCmplncPhrs,
      ProdCmplncPhrsCode                            as ProdCmplncPhrsCode,
      _ProdCmplncPhrsTextILL.ProdCmplncPhrsText     as ProdCmplncPhrsILLText,
      _ProdCmplncPhrsEnglishText.ProdCmplncPhrsText as ProdCmplncPhrsEnglishText
}