Skip to Content
0
Aug 30, 2023 at 10:58 AM

Splitting Field with type String in custom cds views calculation field in S4HANA cloud

324 Views Last edit Aug 30, 2023 at 04:59 PM 2 rev

Dear SAP Experts,

We are using CDS views I_TimeSheetRecordLongText in SAP S4HANA Cloud. The field PlainLongText is of type string. We have to split the field and send only 250 characters in one field.

When we are using string functions in the calculated field we get the following error

"Function CAST: Type STRING of Parameter 1 not supported ( ACCP CHAR CLNT CUKY LANG RAW UNIT NUMC DEC INT1 IN )"

We have used substring, Ltrim, and Rtrim casting (but casting to abap.char is not available in the cloud) and getting the same error.

Please let me know if we can achieve this requirement using any other functions.

Thanks & Regards

Pavan M