Need help adding flanges on tube

I am struggling with this simple sheet metal product, I hope someone can show me a way to to this.

It's a tube with flanges at the end but in the rolled direction, I know of the limitations in SW with flanges when they are WITH the rolled direction but in my mind this shouldn't be a problem.

I tried many ways to finally achieve this result but the flatten doesn't work with it, right now I am out of ideas so please help me.

SolidworksSheet Metal