Check Variant Consistency Report
Execute the report: RSVARDOC_NEW Give the program to be checked (FG Master Program for example): ZPROG_XYZ and execute to see which variants needs adjustments.
This is blog is about the works I came across my SAP ABAP career.