Samsung Galaxy Tab 10.1 does not offers USB charging OOB (out of box). However, folks at xda-developers forum figured out that it is just a software restriction and have developed a little hack that enables it. So, here is how to enable USB charging on your 10.1 Tab.
First, download a ROM with Pershoot kernel. After you are done installing the ROM, go to the Android marketplace and search for a free app called ScriptManager. Install it.
Then, download the script from here (mediafire). Start ScriptManager and browse for the script file you downloaded. Make sure to run it as root and run on boot. Execute it. In case it asks for superuser / root access, please allow it. That is it. Now, you can do USB charging.