cancel
Showing results for 
Search instead for 
Did you mean: 

BAPI or FM to delete a QM task (Q1)

mike_mitchell
Explorer
0 Kudos

We have an objective to delete a task for a notification within the exit ZXQQMU20.  BAPI_ALM_NOTIF_DATA_DELETE appears to be of use only for a PM/CS notification where we have a quality notification.

An attempt to use this BAPI on a quality notification results in the procedure as follows:

Is anyone aware of another BAPI or function module to accomplish the task deletion?  Alternatively, what exactly needs to be done to customize and alter the entries for tables TQ8T and TQ80?

Thanks - Mike

Accepted Solutions (0)

Answers (3)

Answers (3)

0 Kudos

Hello Raymond,

I used these BAPI's to delete all open task when the approval task got rejected. But I there are some messages that comes from standard SAP like below "Inconsistent status".. my functional team wants me to suppress those standard messages. Is there a way?

raymond_giuseppi
Active Contributor
0 Kudos

Depending on notification type (QMEL-QMART -> TQ80-QMTYP) you have to use a different "family" of BAPI

  • 01 - BAPI_ALM_NOTIF*
  • 02 - BAPI_QUALNOT*
  • 03 - BAPI_SERVNOT*
  • etc.

Also sequence is incorrect, correct is

  1. BAPI_QUALNOT_DEL_DATA
  2. BAPI_QUALNOT_SAVE
  3. BAPI_TRANSACTION_COMMIT

You must also check return table at each step (only if WAIT set on last one)

Regards,

Raymond

jogeswararao_kavala
Active Contributor
0 Kudos

Hello Michael,

Use fm BAPI_QUALNOT_DEL_DATA. Here there is table NOTIFTASK.  I believe your issue will be resolved.

Good luck

KJogeswaraRao

mike_mitchell
Explorer
0 Kudos

Hello Jogeswara,

I had tried BAPI_QUALNOT_DEL_DATA in the past, and tried it again after your reply.  I am not having any luck getting the task of the notification to delete. 

When I test this BAPI from SE37, I follow it up right away with BAPI_QUALNOT_SAVE and BAPI_TRANSACTION_COMMIT.  I am not seeing any records being written to the return table either.

Thanks - Mike

busyaban7
Active Contributor
0 Kudos

Hi Mike,

Just an wild query - what was the system status (TSOS, TSRL or TSCO) for the task you are trying to delete?

As Jogeswara Sir suggested, please can you try using the proposed BAPI, in the sequence =>

BAPI_QUALNOT_DEL_DATA + BAPI_TRANSACTION_COMMIT + BAPI_QUALNOT_SAVE, for tasks with status TSOS + TSRL, and check if it's working there.

Thanks,

Arijit

mike_mitchell
Explorer
0 Kudos

Hi Arijit,

Just to confirm, the task does have a status of TSOS and from SE37 the order of testing is:

1. BAPI_QUALNOT_DEL_DATA

2. BAPI_TRANSACTION_COMMIT

3. BAPI_QUALNOT_SAVE

After these steps, the task is still not deleted.

Thanks - Mike

busyaban7
Active Contributor
0 Kudos

Hi Mike,

Just one more check - Please can you highlight the task in notification, and try manually deleting the added task using 'Delete" indicator, and save. After that please can you re-open the notification in QM02 and suggest if that is working.

The combination for BAPI's had been used is following the right sequence. So ideally, if the above case if working successfully and you are able to delete tasks with system status TSOS and TSRL, then your BAPI combination also should work, as suggested by Jogeswara Sir. In case if the task is TSCO, then BAPI may not work, and you may have to do a table level complete clearing form QMSM. Please test this process and take approvals, before you activate such standard table clearing.

As I am not form ABAP background, will suggest you to work with ABAP team and suggest, if there is any specific issues coming while implementing this process. With that specific input, we can research a bit more.

Thanks,

Arijit

mike_mitchell
Explorer
0 Kudos

Hi Arijit,

Just to clarify, tasks with a status of TSOS can be deleted from a notification without a problem with QM02.  If the task had a status of TSCO, I would not attempt to delete.

Unfortunately, the sequence of BAPI calls is still not working for me and I will continue to test a different way of loading the internal tables.  Troubleshooting remains difficult as I am not getting any records populated in the RETURN table.

Thanks - Mike

busyaban7
Active Contributor
0 Kudos

Hi Mike,

Thanks for sharing your test update and also for your trying the proposal manually (QM02) too.

In case of any specific table return related ABAP queries, please can you also try to explore forum for additional help.

Thanks,

Arijit