Be careful. The difference between your output voltage and input voltage is ~21-18= ~3 volts. At full current, this voltage should be no less than 2.5 volts, or the regulator will not regulate. See the device data sheet's dropout voltage graph. At full current your ~21 volt input may drop too low to satisfy the 2.5 volt in/out voltage difference requirement.
Also, although, a meter may indicate 21 volts, if there is significant AC ripple on the input voltage, the instantanious input voltage may actually dip well below 21 volts and this will show up as a less than desireable output ripple.