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.
One thing we have to remember about Data is that he doesn't have any organic tissues, including an intestinal tract, where bacteria is stored to convert consumed food into fecal matter. Therefore, he does not excrete like a normal biological humanoid. I always believed that he had a power cell or some internal furnace that disintegrated solids into molecules, which were expelled via exhalation, or solids were molecularised to serve as bio-lubricants, much like the liquids he consumed.