Skip to Content

Update system status to Release if any Task released

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)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • May 25, 2017 at 09:55 AM

    Faisal,

    You could investigate the following user-exits:

    • QQMA0005 QM: Check Validity of Status Change
    • QQMA0014 QM/PM/SM: Checks before saving a notification
    Add comment
    10|10000 characters needed characters exceeded

  • May 25, 2017 at 10:59 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • May 26, 2017 at 04:37 AM

    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

    Add comment
    10|10000 characters needed characters exceeded