This paper presents a new control strategy which is based on a switching table applied for Virtual Flux Direct Power Control (VF-DPC) of voltage source inverter based shunt active power filter (SAPF). This control method is applied to eliminate harmonic pollution and compensate the reactive power in the presence of nonlinear loads and unbalanced sources. Its main goal is to select switching states of the SAPF converter appropriately based on a look-up table established by hysteresis controllers acting on the instantaneous error between the commanded and VF-estimated values of active and reactive power. Our method aims to improve the electrical quantity behavior in steady and dynamic states while reducing the installing cost of the filter through eliminating the AC line voltage sensors. Facing to disturbances affecting the electrical network, a phase locked loop (PLL) has been integrated.The control strategy proposed for the active filter has been tested in the Matlab/Simulink environment.