The sinc function has as Fourier transform the rectangular function. However, this is only one function that produces the rectangular function as amplitude response. Supposing that you are only interested in the amplitude (absolute value) component of the Fourier transform being equal to the rectangular function (so the phase can be anything), what would be a general solution?
So, in equation:
$$ |h(\omega)| = \left|\int_{-\infty}^{\infty} f(t)e^{-2{\pi}i{\omega}t}\, dt\right|=A \cdot rect\left(\frac{\omega}{B}\right) $$
With A and B real scale and rate parameters, (real) $ \omega $ angular frequency, and $ \left| g \right| $ the absolute value of complex value $ g $.
Does this have a general solution in closed form? Or, alternatively, a way to approach the problem numerically?
PS: this question was first asked on the mathematics stack exchange, but as was pointed out, may fit better on the DSP stack exchange.