Skip to Content
0
Former Member
Nov 27, 2006 at 01:47 PM

Unicode problem

129 Views

Hello guys,

I am trying to figure out SM30 table events. I have lots of coding samples from the forum, but most of them doesn't work, because of a unicode short-dump.

I am trying to implement a Before save event (01) in this form:

FORM update_user_date_time.

DATA: f_index LIKE sy-tabix.

DATA: BEGIN OF l_total.

INCLUDE STRUCTURE zztable.

INCLUDE STRUCTURE vimtbflags.

DATA END OF l_total.

DATA: s_record TYPE zztable.

LOOP AT total INTO l_total.

IF l_total-vim_action = aendern OR

l_total-vim_action = neuer_eintrag.

MOVE-CORRESPONDING l_total TO s_record.

s_record-zz_user = sy-uname.

s_record-zz_date = sy-datum.

s_record-zz_time = sy-uzeit.

READ TABLE extract WITH KEY l_total.

IF sy-subrc EQ 0.

f_index = sy-tabix.

ELSE.

CLEAR f_index.

ENDIF.

MOVE-CORRESPONDING s_record TO l_total.

MODIFY total FROM l_total.

CHECK f_index GT 0.

MODIFY extract INDEX f_index FROM l_total.

ENDIF.

ENDLOOP.

ENDFORM. " UPDATE_USER_DATE_TIME

The short dump is this:

Runtime Error UC_OBJECTS_NOT_CONVERTIBLE

Date and Time 27.11.2006 14:28:10

ShrtText

Data objects in a Unicode program are not convertible.

on this line:

>>>>> LOOP AT total INTO l_total.

Can someone help me please?

Thank you!