Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Badi works only in debugging mode,not in direct execution

Former Member
0 Kudos

Hi all,

I have a requirement to update system and user status in QM01 tcode. When the user enters the notification and clicks on black-white flag in QM01,the system and user status should get updated.

The same requirment was done in QM02 and its working fine,since we can fetch value from the tables.

But in QM01, we cannot do that because new notification is always captured.I am using BADI NOTIF_EVENT_POST.

In this badi ,i have written and logic.Its working fine in debugging mode.

But when i try to update the status without debugging,it is not working.I have used Commit work and wait.I have tried with FM in update task.Still it is not working.

Pls help.

1 ACCEPTED SOLUTION

ziolkowskib
Active Contributor
0 Kudos

I believe that your notification is not yet created when your BADI is called. It works works for you in change mode because the object is already there but while creation it is executed a bit too early.

6 REPLIES 6

ziolkowskib
Active Contributor
0 Kudos

I believe that your notification is not yet created when your BADI is called. It works works for you in change mode because the object is already there but while creation it is executed a bit too early.

0 Kudos

Is there any way to do it?

0 Kudos

You could try to use workflow events (transaction SWEQADM). When you click black-white flag event CLOSED is raised of BUS2078. You could attach your custom FM under that event - it is called after document is created hence you should not encounter the current error.

Do you have any experience with workflow events?

former_member185116
Active Participant
0 Kudos

hi ,

which status are you trying to change.

can you elaborate on this ..

0 Kudos

i want to update the system status to TECO when the black-white flag is clicked.

0 Kudos

since TECO is a system status unless the notification is created ,

i dont think you can set the status in QM01..