Hello Vicky,
Fetch the value range table values using select query and keep those values into one internal table(it_tab_values) .
In GET_DEFINITION method, assign these internal table (it_tab_values) values to the fixed values property of that particular field. Please refer the below code.
Data: ls_field type fpmgb_s_formfield_descr,
lt_field type fpmgb_t_formfield_descr,
** Assign value range to field
IF ls_field-name eq 'XXXX'.
ls_field-fixed_values = it_tab_values.
ENDIF.
append ls_field to lt_field.
et_field_description = lt_field.
hope it will helps you.
Regards,
Naga