06-08-2006 7:59 AM
Hi,
I want to modify screen element (enable) on the main screen from the subscreen by using LOOP AT SCREEN.
I have a function which loops the screen and if the element is found it is enabled.
FORM EnableObject USING obj.
LOOP AT SCREEN.
IF SCREEN-NAME = obj.
SCREEN-INPUT = 1.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDFORM.
Now the problem is if i call this function from the subscreen i cant access elements on the main screen .. LOOP AT SCREEN is looping only on the subscreen elements.
How to access main screen elements too?
Thanks!!
Message was edited by: Egi Zaberl
06-08-2006 8:04 AM
<i>Now the problem is if i call this function from the subscreen i cant access elements on the main screen .. LOOP AT SCREEN is looping only on the subscreen elements.
How to access main screen elements too?</i>
then you should do that <b>under the PBO of main screen,</b> then you will get every thing .
Regards
vijay
06-08-2006 8:04 AM
<i>Now the problem is if i call this function from the subscreen i cant access elements on the main screen .. LOOP AT SCREEN is looping only on the subscreen elements.
How to access main screen elements too?</i>
then you should do that <b>under the PBO of main screen,</b> then you will get every thing .
Regards
vijay
06-08-2006 8:24 AM
I have created a check in the PBO if the user has clicked the button. It seems ok now.
Is this the right procedure or is there a better way of doing this?
DATA: dgclicked TYPE bool.
MODULE STATUS_0100 OUTPUT.
SET PF-STATUS 'SCR100'.
SET TITLEBAR 'SCR100'.
SubRepNumber = '0200'.
IF dgclicked = 'X'.
PERFORM EnableObject USING 'CMDDELETE'.
ELSE.
PERFORM DisableObject USING 'CMDDELETE'.
ENDIF.
PERFORM PrepareNew.
ENDMODULE.
FORM EditRecord USING recid.
dgclicked = 'X'.
* and some other code ...
ENDFORM.
* part of the code in the subscreen ...
CASE OK_CODE.
WHEN 'DBLCLC'.
clicked = 'X'.
PERFORM EditRecord USING VAL.
ENDCASE.
06-08-2006 8:51 AM
can you explain little bit more what you are trying...
Regards
vijay
06-08-2006 11:03 AM
I have a datagrid (table) in subscreen and when i doubleclick on it i want to show data from the database table for selected record in text fields in main screen.
And enable some buttons ...