2023 Mar 24 4:42 PM
Hello everybody,
I have this little program that does not compile:
TYPES: BEGIN OF ys_test,
mtype TYPE char3,
mval TYPE i.
TYPES: END OF ys_test.
DATA: lv_test TYPE ys_test.
DATA: wsl_ext TYPE bapiparex.
wsl_ext-valuepart1 = lv_test.
Errror is: "WSL_EXT-VALUEPART1" and "LV_TEST" cannot be converted to each other in a Unicode program. program.
I totally understand the typing problem, but would there be a way to force/convert this assignment?
Thanks for your help.
2023 Mar 27 2:38 PM
SAP provided for Unicode a method to handle this, cl_abap_container_utilities=>fill_container_c, which will also handle case when extension structure is wider than VALUEPART1.
2023 Mar 27 8:19 AM
Hi tafkap95,
Try this.
wsl_ext-valuepart1 = conv #( lv_test ).
I hope this may work.
2023 Mar 27 12:30 PM
2023 Mar 27 2:38 PM
SAP provided for Unicode a method to handle this, cl_abap_container_utilities=>fill_container_c, which will also handle case when extension structure is wider than VALUEPART1.