Skip to Content

QM01 - Auto populate Tasks in Task Tab based on QN Type


I have a requirement in which tasks needs to be auto-populated when user creates a notification in QM01.

I implemented the user exit QQMA0007 and put the following code.

This works fine for the first time but when user clicks on another tab and comes back to Task tab, the same entry keeps on repeating. Also, it appears that i have missed to populate some of the fields.

Appreciate if anyone has a solution to this.

DATA : lw_viqmsm TYPE wqmsm.
CLEAR : lw_viqmsm.

READ TABLE t_viqmsm INTO lw_viqmsm WITH KEY mncod = '102'.

IF sy-subrc NE 0.
  lw_viqmsm-QSMNUM = '0001'.
  lw_viqmsm-MANUM  = '0001'.
  lw_viqmsm-mncod = '102'.
  lw_viqmsm-parvw = 'VU'.
  lw_viqmsm-parnr = sy-uname.

  APPEND lw_viqmsm TO t_viqmsm.
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Apr 17, 2018 at 01:47 PM

    Memorize in some static variable that the exit already run, in this case exit. (Was described in a very old note 449549 - QQMA0007/QQMA0025: User exit run through twice.)

    Add comment
    10|10000 characters needed characters exceeded