Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Data objects in Unicode programs cannot be converted

Former Member
0 Likes
587

Hi experts,

i am an SAP BW consultant. However i am trying to enhance a standard datasource and i have written a customer exit code for that.

DATA : ZHR_EXTRCT TYPE HRMS_BIW_PY1,

L_TABIX TYPE SY-TABIX.

CASE I_DATASOURCE.

WHEN '0HR_PY_1'.

LOOP AT C_T_DATA INTO ZHR_EXTRCT.

L_TABIX = SY-TABIX.

SELECT ABWTG ENDDA BEGDA SUBTY FROM PA2001 INTO ZHR_EXTRCT

WHERE PERNR = ZHR_EXTRCT-PERNR

AND SUBTY = ZHR_EXTRCT-ZSUBTY.

ENDSELECT.

MODIFY C_T_DATA FROM ZHR_EXTRCT INDEX L_TABIX.

ENDLOOP.

WHEN OTHERS.

EXIT.

ENDCASE.

However, i am getting a short dump saying "Data objects in Unicode programs cannot be converted." and the arrow is pointed at the line LOOP AT C_T_DATA INTO ZHR_EXTRCT.

Can you please tell me if there is a data -type mismatch.

Thanks in advance.

2 REPLIES 2
Read only

Former Member
0 Likes
470

Hi,

You can do this by yourself, double click on C_T_DATA and check if it is referring to the same data type as that of "ZHR_EXTRCT" that is HRMS_BIW_PY1 (as you have declared "DATA : ZHR_EXTRCT TYPE HRMS_BIW_PY1,").

If you are not sure paste the part of the code where C_T_DATA is declared.

Regards,

Chen

Read only

Former Member
0 Likes
470

Type of C_T_DATA and ZHR_EXTRCT is not same and hence you are getting dump.

Please check.