cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Restricting BADI Error Message Trigger During PM Notification Workflow Approval Process

sella007
Explorer
0 Likes
265

I have implemented an approval workflow for the PM Notification process in the system. The workflow allows users to manually change the notification status, but only after the approval is granted. If approval is not granted, I have set up a mechanism to trigger an error message through a BADI (Business Add-In), which helps to prevent any changes to the notification status until the approval process is completed.

Once the approval is granted, I use a custom ABAP class to automatically change the status of the notification. The class is designed to invoke a BAPI (Business Application Programming Interface) to update the status of the notification based on the workflow approval. This is done through a workflow task, which ensures that the status change is carried out as part of the approval process.

However, the issue I am facing is that the BADI error message is still being triggered within the custom class, even when the workflow is in progress and the status is being changed automatically after approval. This error message is preventing the system from updating the notification status, even though the workflow has already been approved. The BADI logic is interfering with the workflow's task of changing the status automatically.

What I need to do now is to restrict the BADI from triggering once the workflow has been initiated and is in progress. The BADI error message should only be triggered if the workflow has not been approved or if it's outside the workflow process. Essentially, I need to implement a check to ensure that the error message is not triggered during the workflow approval process, allowing the status change to happen seamlessly as part of the workflow task.

The ideal solution would be to check the workflow status within the BADI or custom class, ensuring that the status change can happen without interference when the workflow is running. This way, the workflow process will remain smooth, and the status change will only be prevented when appropriate conditions are met.

Accepted Solutions (0)

Answers (0)