[Old topic–answered to help o/p and others with this issue.]
The problem is that AFPDS resources aren’t directly related to SCS/DDS resources. For instance, SCS data expects to be (for the most part) in a fixed-space column/row location. AFPDS resources can be at any location on the page (they can appear inside and across the SCS row/column boundaries) and at various degrees of rotation. So, you can’t easily match the two up.
So, since the UNDERLINE keyword is pertaining to SCS/DDS data, it expects to travel across neat little fixed-space columns. Your AFPDS field won’t match it.
You may be able to do something using AFPDS functions to draw boxes or lines that might match up better to your field, but you’ll have to calculate the width somehow in code. Or, you could have a fixed underline location and use the POSITION keyword to center your AFPDS field across it. Just a thought.