I bought the official Samsung Book Cover Case for my Galaxy Tab 4 7". It does have magnets in it to support the wedge/propped up mode. The box even indicated the auto sleep/wake functionality. But it never did work.
I don't know about the 7 as I have an 8 but there is a check box under settings>general>accessories for the flip cover. On my tab if I put a magnet 1" from the top left ON the screen it shuts off. Hope this helps.
XDA Developers was founded by developers, for developers. It is now a valuable resource for people who want to make the most of their mobile devices, from customizing the look and feel to adding new functionality. Are you a developer?