Skip to Content
avatar image
Former Member

version upgrade 4.6c to ecc6 unicode issue

Hi all,

i am working on uni code upgrade.

while doing syntax check i am getting this error message.

"G_ALVHD" and "ET_HU_HEADER" are not mutually convertible. In Unicode

programs, "G_ALVHD" must have the same structure layout as

"ET_HU_HEADER", independent of the length of a Unicode character.

i have checked the structure both the structure made from different DDIC structure.

i am not getting what should i do.

any help would be fine for me.

thanks

jairaj

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • avatar image
    Former Member
    Aug 19, 2007 at 01:09 AM

    In unicode you cannot code:

    structure1 = structure2.

    to move fields from one structure to another unless the two structures have identical definitions.

    Instead you must move the individual fields or use the "ASSIGN ... CASTING" or similar statements.

    Andrew

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 19, 2007 at 06:11 AM

    Hello Jairaj

    I assume that you had the following statements within your 4.6c coding:

      et_hu_header = g_alvhd.  " et_hu_header -> itab with header line
      APPEND et_hu_header.

    Now if the field contents of both structures are identical you could use the following methods:

    CL_ABAP_CONTAINER_UTILITIES=>FILL_CONTAINER_C

    CL_ABAP_CONTAINER_UTILITIES=>READ_CONTAINER_C

    data:
      ld_string  TYPE string,
      ls_record LIKE LINE OF et_hu_header.
    
      CALL METHOD CL_ABAP_CONTAINER_UTILITIES=>FILL_CONTAINER_C
        EXPORTING
          im_value = g_alvhd
        IMPORTING 
          ex_container = ld_string.
    
      CALL METHOD CL_ABAP_CONTAINER_UTILITIES=>READ_CONTAINER_C  
        EXPORTING
          im_container = ld_string
        IMPORTING
          ex_value = ls_record.
    
      APPEND ls_record TO et_hu_header.

    <i>Note</i>: This static methods can be used to solve <b>any </b>Unicode problem with structures that are no mutually convertibe.

    Regards

    Uwe

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 19, 2007 at 06:45 AM

    use move corresponding..

    move corresponding fields of one table to another...

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 19, 2007 at 08:02 AM

    Thanks all of you.

    Add comment
    10|10000 characters needed characters exceeded