Even though Data does not need food or drink, many times it has been shown that he does consume foods and drinks. What happens to the food after digestion? Given that he was created as a "fully functional android", should we assume that he gets rid of waste in the human way?
Data's physiology includes a functioning digestive system. This evidently includes the ability to transfer nutrients from his "stomach" to his limbs and outlying parts via his "nutrient distribution net".
History doesn't record how he deals with any waste, whether he poops, removes food manually from his stomach bag (perhaps by vomiting any waste or manually removing the bag) or whether he simply destroys it with power from his fuel cell.
From the Official Trek RPG Game
I seem to recall Data's brain being discribed as "positronic", a possible reference to Asimov's Robot stores.
Based on that, in "Caves of Steel", Daneel Olivaw shares a meal with Elijah Baley. He later opens a section of his chest/abdomen, and removes a plastic bag which he then empties into the recycling chute.