- Registrar coprrp007 en mbsERP.4pw, usando cofmrp007.4fd (el .per no define el combo de departamento que requiere busca_departamento()) - Enlazar la libreria FUNCIONES_IN (ya contiene departamento.4gl) en vez de duplicar el archivo, evitando conflicto de salida .42m - Agregar guarda NULL en departamento.4gl: ui.combobox.forname() puede no encontrar el combo durante el CONSTRUCT y causaba "Null pointer exception" al llamar .clear() - Sustituir seleccionarsalida()/configureoutput() (no definidas, API fgl_report_* no disponible) por om.XmlWriter.createFileWriter() hacia FGLSPOOL Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
19 lines
801 B
Plaintext
19 lines
801 B
Plaintext
FUNCTION busca_departamento()
|
|
DEFINE pdepartamento ui.combobox,
|
|
kdepartamento SMALLINT,kdescripcion CHAR(30)
|
|
|
|
LET pdepartamento = ui.combobox.forname("formonly.departamento")
|
|
IF pdepartamento IS NULL THEN
|
|
RETURN
|
|
END IF
|
|
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
|