I’ve debugged this exact scenario multiple times. The problem is a combination of BAdI filter assignment issues and workflow template linkage interruption. Let me explain the complete solution addressing all three critical areas.
First, fix your BAdI filter assignment. The filter you configured is too restrictive and doesn’t match the actual material type values passed during part creation. The correct filter assignment should be:
Filter Field: MTART (not MATNR)
Filter Value: FERT
Implementation: ZCL_PART_CLASS_VALIDATE
The MATNR field isn’t available at the BAdI execution point - you need to filter on MTART (material type) instead.
Second, verify the workflow template linkage hasn’t been overridden. Go to transaction SWDD and open your part approval workflow template. Check the triggering event definition - it should still reference ‘BO.PART.CREATED’. Then go to SE19, open your BAdI implementation, and ensure your class doesn’t have any code that suppresses the standard workflow event. Your CHECK_CLASSIFICATION method should look like this:
METHOD if_ex_part_approval~check_classification.
" Your validation logic here
IF classification_valid = abap_false.
RAISE EXCEPTION TYPE zcx_part_validation.
ENDIF.
" Critical: Call super to continue standard processing
super->if_ex_part_approval~check_classification( ).
ENDMETHOD.
The key is calling the super method at the end - this ensures the standard workflow trigger executes after your custom validation.
Third, check the SE19 implementation status more carefully. ‘Active’ status isn’t enough - you need to verify the implementation is actually being called. Go to SE19, select your BAdI implementation, and use ‘Test’ mode. Create a test part and watch the execution flow. You’ll likely see that the BAdI executes but then terminates without calling the super method, which breaks the workflow chain.
Additionally, verify your BAdI implementation is in the correct enhancement spot. The IF_EX_PART_APPROVAL BAdI should be in enhancement spot ‘PLM_PART_CREATION_CHECKS’. If it’s in a different spot, it won’t be called at the right time in the process flow.
After making these corrections, you need to reactivate both the BAdI implementation and the workflow template. Deactivate your BAdI in SE19, make the code changes, then reactivate. Then go to SWDD, open your workflow template, and use ‘Workflow > Activate’ even though it appears active - this refreshes the event linkage with the corrected BAdI.
The workflow should now trigger correctly after your BAdI validation completes. Test with a new part creation to confirm the entire chain works: part creation → BAdI validation → workflow trigger → approval process.