FUNCTION busca_departamento2() DEFINE pdepartamento ui.combobox, kdepartamento SMALLINT,kdescripcion CHAR(30) LET pdepartamento = ui.combobox.forname("formonly.depto") CALL pdepartamento.clear() DECLARE pagar CURSOR FOR SELECT departamento, nom_dpto FROM adtb00001 WHERE status_t is null ORDER BY nom_dpto FOREACH pagar INTO kdepartamento,kdescripcion CALL pdepartamento.additem(kdepartamento,kdescripcion) END FOREACH END FUNCTION