顯示具有 SAP-ABAP-STRUCTURE 標籤的文章。 顯示所有文章
顯示具有 SAP-ABAP-STRUCTURE 標籤的文章。 顯示所有文章

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.

DATA: BEGIN OF itab OCCURS 0.
        INCLUDE STRUCTURE empinfo.
DATA: END OF itab.


DATA: ld_string    TYPE string.
DATA: ls_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.
Read More
      edit