cancel
Showing results for 
Search instead for 
Did you mean: 

QM01 - Auto create tasks

former_member188001
Active Participant
0 Kudos

All,

I have a requirement to create tasks when user creates notification in QM01.

I implemented user exit EXIT_SAPMIWO0_001 - Default Values When Creating a Notification

It worked fine but the task status TSOS is not getting populated. Any help is appreciated.

Regards,

Salil

Accepted Solutions (0)

Answers (1)

Answers (1)

AlbertSAP
Advisor
Advisor
0 Kudos

Hi Salil,

please ensure that in your custom codes no COMMIT or COMMIT WORK statement is executed before the standard commit and that no nested call of function module STATUS_BUFFER_REFRESH takes place, as it deletes all internal buffered status objects.

If you put breakpoints on these statements and function module then run your scenario, you should find the incorrectly used code, if there is any.

I wish you a nice day,
Albert



former_member188001
Active Participant
0 Kudos

Hi Albert,

Thanks a lot for the message. I debugged and found that none of the codes mentioned by you are called before the standard commit.

Actually, the status of the task has an impact on the overall QN status. Normally, when we create task manually, the task status gets sets to TSOS and the QN status gets set to OSTS.

Using the user exit to create task automatically, the task status does not get set at all due to which the overall QN status does not get set to OSTS. Moreover, after I save the QN, and go back in change mode, the task now shows the status TSOS wheras, the QN overall status still does not get set to OSTS. This is what is creating problem.

Regards,

Salil

AlbertSAP
Advisor
Advisor
0 Kudos

Hi Salil,

in this case deeper analysis of the code is necessary with developer expertise. One more thing I can suggest according to the function module documentation:

"Before you leave the function module exit, you must transfer the notification header record (I_VIQMEL) to the export parameter E_VIQMEL). This is the only way to ensure that the fields that remain unchanged can be correctly reconfirmed and that no inconsistency of data occurs."

Have a nice day,
Albert