I don't know if it can help, but you can run procedure from one window to another one.
Example:
Your first window run the second window, sending the handle in parameter :
1ST-WINDOW.W
---------------------
.
.
RUN 2nD-WINDOW.W (INPUT THIS-PROCEDURE).
.
.
PROCEDURE Proc_name_in_1st_window:
DEFINE INPUT PARAMETER ip_param AS CHAR.
.
.
your code here
.
.
END PROCEDURE.
Now you can control your procedure in 1ST-WINDOW from the second window :
2nd-WINDOW.W
---------------------
DEFINE INPUT PARAMETER Win_name AS HANDLE NO-UNDO.
ON (Any_trigger_needed) DO:
IF VALID-HANDLE (Win_Name) THEN RUN Proc_name_in_1st_window IN Win_Name (your_parameter_here).
END.
In this example it means that the main window is the 2nd-Window, but you need to launch the 1st-window first and then launch the 2nd one.