Skip to Content
0
Jan 16, 2023 at 05:39 AM

How to cast RAW to CHAR in OpenSQL

880 Views Last edit Jan 16, 2023 at 01:11 PM 2 rev

Hi,

I am new to OpenSQL in S/4HANA Cloud and I need to convert a field that is in the RAW datatype to one that is either CHAR or STRING or equivalent.

The below is my code

SELECT CAST( sap_uuid AS SSTRING ) AS out1
FROM YY1_CURRENTDATE
INTO ( @currentdate-uuid_char )
UP TO 1 ROWS.

but I keep on getting the following error message: The expression that starts with "SAP_UUID" cannot be cast to the DDIC type "SSTR/CHAR"

any help or whether this is even possible is appreciated.