Application Development and Automation 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: 
Read only

Refresh a subscreen

Former Member
0 Likes
3,466

Hello,

how can I refresh / redraw a subscreen after an event on the main screen?

Thanks,

Manuel

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,058

Just allow the logic in the PAI to flow around to the PBO again whereupon you can refresh any data you need to before the main screen and subscreen are displayed again.

Jonathan

8 REPLIES 8
Read only

Former Member
0 Likes
2,059

Just allow the logic in the PAI to flow around to the PBO again whereupon you can refresh any data you need to before the main screen and subscreen are displayed again.

Jonathan

Read only

0 Likes
2,058

Hello,

how can I do that without using the statement CALL SCREEN 100 (same screen that is already being displayed)?

On the subscreen I use textboxes that are linked to a structure of the program.So the first time the screen loads automatically the data that is present in the structure. On the double_click event of the ALV grid I change the content of the structure, but the textboxes on the subscreen do not refresh.

Therefore, even though the contents of the structure has changed, the contents of the textboxes remains the old.

Thanks for your help. Points will obviously be rewarded.

Manuel

Read only

0 Likes
2,058

Sorry for delay - been a busy week. I didn't realise from your initial posting that you had controls in your screen -> within the "double click" of your ALV, you could look at using logic like


  l_ucomm  = 'ZREFRESH'.
  call method cl_gui_cfw=>set_new_ok_code
    exporting
      new_code = l_ucomm
    importing
      rc       = l_rc.

to force the program to move out of the ALV control and back into your screen's PAI and user_command whereupon you simply react to sy-ucomm = 'ZREFRESH' (set above) and allow the flow back to PBO and refill the text boxes with the appropriate text.

Jonathan

Read only

0 Likes
2,058

Hi,

Just use clear and refresh statements for all screen fields you have used. like;

clear sfight-connid.

refresh sflight-carrid.

clear <fieldname>.

like that. No need to calll it again.

Regards,

Renjith Michael.

Read only

0 Likes
2,058

Hi.

For all who look for a solution, Jonathan Coleman's idea works great exactly how he described it, so you are encouraged to use it.

Thank you Jonathan.

Read only

0 Likes
2,058

Hi Jonathan

I 'm having the same problem, but this still not the perfect for the issue, because:

this action actually equals to "call screen 0", which will force refresh the whole screen, but it will cause some lost information for the other screen we didn't plan to refresh, for example, the selected status, the scrollbar position... etc

Of course, these data can be preserved and restored after the refresh, but it is not an elegant way.

Is there a solution for just refresh the "target subscreen" instead of the whole one?

Thanks.

BR

Leon

Read only

0 Likes
2,058

hi

I have just stared to program with ABAP. Hope it is not too late to give an answer,

To refresh you could try

LEAVE TO SCREEN (Dynpro number) .

it works fine in my program to refresh the subscreen.

sudhir

Read only

Kanagaraja_L
Active Contributor
0 Likes
2,058

Call method CL_ALV>->REFRESH_TABLE_DISPLAY with

I_STABLE-ROW = 'X'

I_STABLE-COL = 'X'.

Check and Let me know the status.

Kanagaraja L