cancel
Showing results for 
Search instead for 
Did you mean: 

Need help in conversion

Former Member
0 Kudos

Hi all,

I<b> need help in converting the raw string to the char</b>. Below i mentioned the data types.

In table <b>crmd_order_index</b> there is a field <b>GUID of data type CRMT_OBJECT_GUID and domain SYSUUID which is RAW 16.</b>

and in the another table a thr is a field<b> SYSUUID of data type char 70</b>.

When i execute the code

<b>

SELECT roleid

FROM SRRELROLES

INTO gs_roleid

WHERE objkey = gs_guid

AND objtype = ‘BUS2010020’.</b>

it is throwin an error sayin dat

<b>" GS_GUID and OBJKEY is not mutually convertible in a unicode program.... "</b>

Please Reply me ASAP

Thanks,

Shiva shekar k

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

HI Shiva,

Try this code, shud work ..

data : GS_GUID type CRMT_OBJECT_GUID,

gs_role_guid type SWO_TYPEID.

gs_role_guid = gs_guid.

SELECT roleid

FROM SRRELROLES

INTO gs_roleid

WHERE objkey = gs_role_guid

AND objtype = ‘BUS2010020’.

Shud solve ur problem.

Siva

Former Member
0 Kudos

You can try something like this, it might solve the issue:

data: NEW_GUID type SWO_TYPEID. "the type of SRRELROLES-OBJKEY

FIELD-SYMBOLS: <unicode_x1> TYPE x,

<unicode_x2> TYPE x.

DEFINE move_casting.

assign &1 to <unicode_x1> casting.

assign &2 to <unicode_x2> casting.

move <unicode_x1> to <unicode_x2>.

END-OF-DEFINITION.

move_casting gs_guid NEW_GUID.

SELECT roleid

FROM SRRELROLES

INTO gs_roleid

WHERE objkey = NEW_GUID

AND objtype = ‘BUS2010020’.

PaulW
Employee
Employee
0 Kudos

Hi,

what is the data type of gs_guid ?

Normally it should be no problem to assign a raw16 to a char based type.

Paul