Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Subscreen > Main screen > modify

igor_bevk
Explorer
0 Kudos

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

1 ACCEPTED SOLUTION

former_member188685
Active Contributor
0 Kudos

<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

4 REPLIES 4

former_member188685
Active Contributor
0 Kudos

<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

0 Kudos

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.

0 Kudos

can you explain little bit more what you are trying...

Regards

vijay

0 Kudos

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 ...