Chosen Solution

Tablet discharge within a few minutes some times. Sometimes it takes hours to load the tablet completly and it even discharge while atached to the charging cable.

Replacing the battery should fix the discharge problem. Luckily, ifixit sells it. Galaxy Tab 4 10.1 Battery However, if it doesn’t charge well even after the battery replacement, your charging port/cable is bad or your charger isn’t powerful enough. First, get a brand new Samsung cable. Not a flimsy one you would get at a convenience store. Also, make sure your charger is at least 2.1A 5v. If neither of those fix it, you’ll have to replace the charge port. Hope this helps! Nexus 9 AC Power Adapter and Charging Cable

Are you using the original charger?