Hi,
In the FORM routine for build_fieldcatalog, update the REF_TABNAME and REF_FIELDNAME of the fieldcatalog structure for all Quantity and Amount fields. You can use first 2 parameters in your PERFORM statement to fill the ref_tabname and ref_fieldname.
Can tell for which field u are updating the last parameter 'C'.
Thanks & Regards
Bala Krishna