Just store the value of the Purchaseorddt::model()->findByAttributes part in a separate variable and replace that variable in the place of your CHtml::Data section.
Edit - Something on these lines would work. Do remember though that it is a better approach to do your queries in the controller or the model.
<?php $x = Purchaseorddt::model()->findByAttributes( array('pp_purordnum' => $pp_purordnum));
$y = $x['pp_purchasrate'];
$model->im_costprice = $y;
echo $form->textField($model,'im_costprice',array('id'=>'purchasrate')); ?>