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

Unicode conversion error

Former Member
0 Likes
574

HI Experts,

I am changing a program from non unicode to unicode.

form rellenar_error tables we structure YYF_ES001_ERR

wx structure YYF_ES001_DEF

using l_cod l_datos.

clear we.

we-cod = l_cod.

we-dat = l_datos. <-- Unicode Conversion error

append we.

endform.

the form is in a subroutine pool,. with multiple calls in main program.

The Error

The statement

"MOVE src TO dst"

requires that the operands "dst" and "src" are convertible.

we-dat is of type c

and l_datos has 3 fields: waers, wrbtr, wrbtr.

can anyone help me with the solution.

Edited by: MAHESH FADNAVIS on Dec 4, 2008 5:06 PM

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
515

Hi

we-dat is of type c but the length?

Anyway u move the data field by field, aomething like this:

move we-dat(3) to l_datos-waers, 
         we-dat+3(10) to l_datos-wrbtr, 
         we-dat+13(10) to l_datos-wrbtr.

Max

Edited by: max bianchi on Dec 4, 2008 5:08 PM

4 REPLIES 4
Read only

Former Member
0 Likes
520

Hi

we-dat is of type c but the length?

Anyway u move the data field by field, aomething like this:

move we-dat(3) to l_datos-waers, 
         we-dat+3(10) to l_datos-wrbtr, 
         we-dat+13(10) to l_datos-wrbtr.

Max

Edited by: max bianchi on Dec 4, 2008 5:08 PM

Read only

0 Likes
515

its other way round i need to pass data from L_datos to wa-dat.

and moreever there are multiple calla for this form and using three diff structure. with diff field names.

that where the actual problem is.

Read only

0 Likes
515

Hi

In this case u can use the field-symbols:

FIELD-SYMBOLS: <VALUE> TYPE ANY.
DATA: V_LEN TYPE I,
           V_OFFSET TYPE I.

DO.
  ASSIGN COMPONENT SY-INDEX OF STRUCTURE L_DATOS TO <VALUE>.
  IF SY-SUBRC <> 0. EXIT. ENDIF.
  MOVE VALUE TO WA-DAT+V_OFFSET.
  V_LEN = STRLEN( WA-DAT ).
  V_OFFSET = V_OFFSET + V_LEN.
ENDDO.

Max

Read only

0 Likes
515

Thanks max. it worked with condense we-dat addition.