With every purchase, the seller must guarantee the buyer, that goods sold lack any defects. In case that the customer realises that the purchase has a defect, he is entitled to two years of warranty. However, the entitlement of warranty is nullified if the goods show normal signs of regular wear and tear. The exchange because of a defect that is covered by the warranty, can be done without using the original packaging. Just keep in mind that a prove of purchase is usually required. In case that you do not possess the receipt any more, you are obliged to prove that you have bought the defect item in this specific store.
Exchange without defects within a certain time period is possible in Germany, however it is not a must. No store is obliged to exchange goods if there is no defect.