UC_OBJECTS_NOT_CHARLIKE exception using CREATE_ICON function
I'm doing an upgrade (my first upgrade) from 4.6C to ECC 5.0, and I have a problem with my Z report.
Before the upgrade the program worked fine, when calling the CREATE_ICON function and passing the result to an icon-type variable.
Now the program throws an UC_OBJECTS_NOT_CHARLIKE exception. The call looks like this:
CALL FUNCTION 'ICON_CREATE'
name = addi_zusatztext_icon
text = ''
info = addi_zusatztext_qit
add_stdinf = 'X'
RESULT = tb0002-icon
icon_not_found = 1
outputfield_too_short = 2
OTHERS = 3.
where tb0002-icon is an icon type variable.
If I store the result in a string variable, the function seems to work fine, but... what should I do with the resulting code?
Thanks in advance,
Durairaj Athavan Raja replied
check the FM documentation from SE37
<i>Notes In the EXPORTING parameter RESULT, enter the screen field name of
the output field or pushbutton. The ABAP field should refer to ICONS-TEXT.
Ensure that the defined length in the Screen Painter is the same as in
ICONS-TEXT. You can set the visible length such that the icon (IMPORTING
parmaeter NAME) and the icon text (IMPORTING parameter TEXT) are both
DATA: <variable for result> LIKE icons-text.