cds

How can I convert STRING to CHAR in an ABAP CDS view?


I have a STRING field (standard /AIF/ALERTS-KEYFIELDSTRING), but I need it as CHAR in an ABAP CDS view (no table function) for further functions. I am aware it will cut off anything after a set number of characters, but I am fine with that.

Neither of these work:

cast(KEYFIELDSTRING as abap.char(100)) as c_keyfieldstring
  
substring(KEYFIELDSTRING, 1, 100) as c_keyfieldstring

Solution

  • As far as I know Sting (CLOB) are not supported in CDS. You cannot do casting , left, etc.