Skip to Content
0

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

Apr 12 at 09:23 PM

71

avatar image

All,

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.
ENDIF.
10 |10000 characters needed characters left characters exceeded

I would appreciate if anyone is able to provide some pointers.

0
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Raymond Giuseppi
Apr 17 at 01:47 PM
0

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.)

Show 3 Share
10 |10000 characters needed characters left characters exceeded

Thanks Raymond.

but the issue is a little different. We have a requirement to populate Tasks by default for which the above code is written. After I click on Task tab, i see that the task codes have been generated but if i keep hitting enter, the line duplicates. It does not make a call to this user exit code again.

0

In this case, no duplicate call of exit, you may require the "modification" note 415784 - QQMA0007, QQMA0025: Preassigning items, tasks ... But I'm not sure that this "default value" exit is suitable for your requirement, so you may raise an incident/message with OSS before implementing the note.

0

I guess, i will need to check with SAP. This note also did not resolve the issue.

0