cancel
Showing results for 
Search instead for 
Did you mean: 

Casting a RAW field type in CDS views

VijayCR
Active Contributor
0 Kudos

Hello Experts,

I am trying to read a RAW field from a table in the CDS view and trying to read the offset based on the SUBSTRING function.

How ever i need to do a CAST operation in order to do substring operation.

I get an error message saying that CAST operation is not supported for the RAW data type.Can you please suggest how to achieve in SAP HANA ?

Thanks,

Vijay.

Accepted Solutions (1)

Accepted Solutions (1)

VijayCR
Active Contributor

Its not possible alternatively used an AMDP class to do the conversion in ABAP

Answers (2)

Answers (2)

073520
Discoverer

Use the function Bintohex to cast from Raw to Char:

https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abencds_f1_sql_functions_byte.htm

After that you can use the substring function.

Thomas_Welzel
Explorer
0 Kudos

And with NW 7.4?

0 Kudos

Thomas, found out how to cast in NW 7.4? I had the same problem but I don't know how to fix it