Medications, if they're water-soluble, may well have excess excreted in the urine. Some medications are broken down by the body and the by-products instead will be spilled into the urine. Others may actually come out unchanged over time.

I don't know a lot of examples, but Vitamin-B12, for example, comes out unchanged in the urine in excess of the body's needs.

Good question.