Skip to Content
0

Update system status to Release if any Task released

May 25, 2017 at 09:09 AM

105

avatar image

Hi,

We have 03 requirement such that:

1) if any one Task is released then the Notification status to change to NOPR automatically rather then to click the Green flag to release the Notification.

2) Also is it possible that if user Releases any task then the User is prompted to do entry for User Statuses

3) Also can we set a code on Save that if any Task released and Notification is in OSNO state then system prompts user to set System Status or User Status

Thanks

Faisal

notif-task.png (13.6 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Peter Atkin May 25, 2017 at 09:55 AM
0

Faisal,

You could investigate the following user-exits:

  • QQMA0005 QM: Check Validity of Status Change
  • QQMA0014 QM/PM/SM: Checks before saving a notification
Share
10 |10000 characters needed characters left characters exceeded
K Jogeswara Rao May 25, 2017 at 10:59 AM
0

For your point1, try this code in the incldue ZXQQMU20 of exit QQMA0014.

IF sy-tcode = 'IW22' AND i_viqmel-phase = '1'.
  DATA: itab  TYPE TABLE OF qmsm,
        wa    TYPE qmsm,
        vstat TYPE j_stext.

  SELECT * FROM qmsm INTO TABLE itab WHERE qmnum = i_viqmel-qmnum.

  LOOP AT itab INTO wa.
    CALL FUNCTION 'STATUS_TEXT_EDIT'
      EXPORTING
        flg_user_stat = 'X'
        objnr         = wa-objnr
        only_active   = 'X'
        spras         = sy-langu
      IMPORTING
        line          = vstat.

    IF vstat = 'TSRL'.
      EXIT.
    ELSE.
    ENDIF.
  ENDLOOP.

  IF vstat = 'TSRL'.
    e_viqmel-phase = '3'.

    DATA: it_stat TYPE TABLE OF jstat,
          wa_stat TYPE jstat.
    wa_stat-stat =  'I0068'.
    wa_stat-inact = 'X'.
    APPEND wa_stat TO it_stat.

    wa_stat-stat =  'I0070'.
    wa_stat-inact = ' '.
    APPEND wa_stat TO it_stat.

    CALL FUNCTION 'STATUS_CHANGE_INTERN'
      EXPORTING
        objnr  = i_viqmel-objnr
      TABLES
        status = it_stat.
  ENDIF.

ENDIF.

Test well and come back.

Share
10 |10000 characters needed characters left characters exceeded
Faisal Khan May 26, 2017 at 04:37 AM
0

Thanks Jogeswara / Pete

I will check with my ABAP team on the code above which seems to fulfill the first requirement.

Any thoughts on my second requirement as third can be fulfilled by Pete suggestion of User Exits

Thanks

Faisal

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

As already suggested, please test and comment about the help extended so far, so that things could move further.

0

I will update on the work done so far and then get back to you. Thanks

0