2013年7月12日 星期五

Published 下午1:57 by with 0 comment

cannot be converted to a character-type field

Issue: cannot be converted to a character-type field.

DATABEGIN OF itab OCCURS 0.
        INCLUDE STRUCTURE empinfo.
DATAEND OF itab.


DATAld_string    TYPE string.
DATAls_record   LIKE LINE OF itab.

LOOP AT itab INTO ls_record.

  CALL METHOD cl_abap_container_utilities=>fill_container_c
    EXPORTING
      im_value               ls_record
*    IMPORTING
*      ex_container           = ld_string
*    EXCEPTIONS
*      illegal_parameter_type = 1
*      others                 = 2
          .
  IF sy-subrc <> 0.
*   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.

  WRITE :/ ls_record.
ENDLOOP.
      edit

0 意見:

張貼留言