Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Edited records in TMG to be updated with userid of who are editing.

Former Member
0 Kudos

this might be small problem for you:

I have 2 step table maintenance generator.

there is one column called "Changed By"..

When ever user tried to edit few records in table maintenance generator,

and saves... those records to be updated by his userid under "Changed by" column

So My question is where and how can i trace those particular records got edited or where

can I write coding for this to updated along with userids in that respective column ?

YOUR HELP IS HIGHLY APPRECIATED.

THANKS IN ADVANCE.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

The dump is at ( because of difference in structures of total and totals):

23 loop at total.

24 if <action> = 'U'.

>> move total to total_s.

================================

Runtime Errors UC_OBJECTS_NOT_CONVERTIBLE

Date and Time 05/05/2009 17:25:17

Short text

Data objects in Unicode programs cannot be converted.

What happened?

Error in the ABAP Application Program

The current ABAP program "SAPLZTQM_VBATCH_COPY" had to be terminated because it

has

come across a statement that unfortunately cannot be executed.

Error analysis

The statement

"MOVE src TO dst"

requires that the operands "dst" and "src" are convertible.

Since this statement is in a Unicode program, the special conversion

rules for Unicode programs apply.

In this case, these rules were violated.

Trigger Location of Runtime Error

Program SAPLZTQM_VBATCH_COPY

Include LZTQM_VBATCH_COPYF01

Row 25

Module type (FORM)

Module Name FILL_SY_FIELDS

6 REPLIES 6

Former Member
0 Kudos

Former Member
0 Kudos

Rob,

I used the code

data: f_index like sy-tabix. "Index to note the lines found

data begin of total_s.

include structure ZTQM_VBATCH_COPY.

data action.

data mark.

data end of total_s.

loop at total.

if <action> = 'U'.

move total to total_s.

The program is dumping here.

Could you please say

0 Kudos

It's userspeak to say that the program "dumped". Programmers need some details.

rob

Former Member
0 Kudos

The dump is at ( because of difference in structures of total and totals):

23 loop at total.

24 if <action> = 'U'.

>> move total to total_s.

================================

Runtime Errors UC_OBJECTS_NOT_CONVERTIBLE

Date and Time 05/05/2009 17:25:17

Short text

Data objects in Unicode programs cannot be converted.

What happened?

Error in the ABAP Application Program

The current ABAP program "SAPLZTQM_VBATCH_COPY" had to be terminated because it

has

come across a statement that unfortunately cannot be executed.

Error analysis

The statement

"MOVE src TO dst"

requires that the operands "dst" and "src" are convertible.

Since this statement is in a Unicode program, the special conversion

rules for Unicode programs apply.

In this case, these rules were violated.

Trigger Location of Runtime Error

Program SAPLZTQM_VBATCH_COPY

Include LZTQM_VBATCH_COPYF01

Row 25

Module type (FORM)

Module Name FILL_SY_FIELDS

0 Kudos

OK - unicode. See if this is any better:

form fill_sy_fields.

  data: f_index like sy-tabix. "Index to note the lines found

  types begin of total_s.
          include structure zzhb6_sal_inc_rl.
          include structure vimtbflags.
  types end of total_s.

  field-symbols: <fs_itab> type total_s.

  data itab type total_s.

  loop at total assigning <fs_itab> casting.
    if <action> = 'U'.
*      MOVE total TO total_s.
      read table extract with key <vim_xtotal_key>.
      if sy-subrc eq 0.
        f_index = sy-tabix.
*        extract_s = extract.
      else.
        clear f_index.
      endif.
*       (make desired changes to the line TOTAL)
      <fs_itab>-zzfchdate = sy-datum.
      <fs_itab>-zzfchusr  = sy-uname.
      itab = <fs_itab>.
*      MOVE total_s TO total.
*      MODIFY total.
      check f_index gt 0.
      extract = total.
      modify extract index f_index.
    elseif <action> = 'N'.
*      MOVE total TO total_s.
      read table extract with key <vim_xtotal_key>.
      if sy-subrc eq 0.
        f_index = sy-tabix.
*        extract_s = extract.
      else.
        clear f_index.
      endif.
*       (make desired changes to the line TOTAL)
      <fs_itab>-zzfcredate = sy-datum.
      <fs_itab>-zzfcreusr  = sy-uname.
      clear <fs_itab>-zzfchdate.
      clear <fs_itab>-zzfchusr.
*      MOVE total_s TO total.
*      MODIFY total.
      itab = <fs_itab>.
      check f_index gt 0.
      extract = total.
      modify extract index f_index.
    elseif total is initial.
*      MOVE total TO total_s.
      read table extract with key <vim_xtotal_key>.
      if sy-subrc eq 0.
        f_index = sy-tabix.
*        extract_s = extract.
      else.
        clear f_index.
      endif.
*       (make desired changes to the line TOTAL)
      delete total.
      check f_index gt 0.
      delete extract index f_index.
    endif.
  endloop.

  sy-subrc = 0.

endform.                    " FILL_SY_FIELDS

Rob

Former Member
0 Kudos

Thanks for your help .

i am sorry Rob - notworking still. The problem is.

<fs_itab>-CHANGED_BY = sy-uname.

itab = <fs_itab>.              <<<< here the value to be changed is appearing.

check f_index gt 0.

extract = total.                 <<< here the above value doesn't passed

Because of structre difference ..I am bit struck up how to pass the sy-uname >>>>?

modify extract index f_index.