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: 

Auto refresh sub screen

Former Member
0 Kudos

Hi Everyone,

I need to refresh a sub screen for every 5 seconds. I have used CL_GUI_TIMER to refresh the screen, but I want to refresh subscreen only and the main screen should not have any effect.

Please provide your suggestions.

Thanks.

1 ACCEPTED SOLUTION

MarcinPciak
Active Contributor
0 Kudos

PBO is common for all screen elements namely main screen, sub screen, all fields, GUI controls etc. You can partly separate PBO modules (one for main screen one for subscreen) but you can't affect the flow. This would mean you have to impact Runtime Environment which is conducted by system.

Regards

Marcin

10 REPLIES 10

MarcinPciak
Active Contributor
0 Kudos

PBO is common for all screen elements namely main screen, sub screen, all fields, GUI controls etc. You can partly separate PBO modules (one for main screen one for subscreen) but you can't affect the flow. This would mean you have to impact Runtime Environment which is conducted by system.

Regards

Marcin

0 Kudos

Hi Marcin,

Actually in the main screen i have a input field and on refreshing it is not allowing me to type in the message. That is the reason I want ot refresh only the subscreen. So now how can I restrict only the input field from getting refreshed while the rest of the screen refreshes.

Thank you.

0 Kudos

Sorry, but I am not following this

i have a input field and on refreshing it is not allowing me to type in the message

What kind of message you want to type in? If you have a corresponding data object defined globally in program, then data transport b/w screen field and this data object will take automatically, so the field will not get refreshed (understand by me as cleared out here).

Regards

Marcin

0 Kudos

Hi Marcin,

Sorry for not being clear before.

Actually I have an input field on the screen and I need to enter some value into it and then press ENTER key to trigger some action. As I said I am auto refreshing the screen every 5 seconds, once the screen is getting refreshed the value which I entered in the input field is getting cleared before I press the ENTER key and when I need to enter long text into that it is very difficult. Could you please suggest on this.

Thank you.

0 Kudos

No problem.

I am only can think of extending that time, so that user will have more time to enter long text fully. Anyhow he can reach the interim time b/w two refreshes so this doesn't assure he will be able to type it fully.

As any action on screen will entail whole screen refresh the other approach would be focusing on this subscreen's content. I guess you have some control there. If this is i.e. ALV you may thing of direct refresh of its content. Otherwise I doubt there is any easy or direct way of achieving this, if any.

Regards

Marcin

0 Kudos

Hi Marcin,

Unfortuantely I am not allowed to extend the time interval. Is there any popup which allows me to enter the text but doesn't interrupt the auto refresh of the screen.

As a second option I have tried the following,

1. 'POPUP_GET_VALUES', but this is not refreshing the screen untill I enter the value in the popup and press ENTER.

2. text editor in a container, but again on refresh the text is not cleared but the cursor is not placed in the editor which is again not acceptable.

Thank you.

Any help ?

Edited by: my name is already in use on May 30, 2011 11:22 AM

0 Kudos

Hi Marcin,

Is there any popup which allows me to enter the text but doesn't interrupt the auto refresh of the screen.

You dont have any popup FM for this but you can do this by creating your own dialog screen.

1. Create a report which calls this screen.

2. Assign a tcode for that report.

3. Then in your main screen call the FM TH_CREATE_FOREIGN_MODE passing sy-uname and the tcode created above.

I have tried it and working fine. You too try this and let me know in case you face any problem.

Thank you,

Sri.

0 Kudos

Hi Sri,

I am able to get the screen to enter the value and the main screen is refreshing. But how to pass the value entered in that screen to the main screen ?

Thanks.

0 Kudos

Hi,

You need to use IMPORT and EXPORT statements to do that.

In your second screen, in PAI when you press enter key export the value to a memory ID.

Now in the main screen PBO import that value. Since you are refreshing the main screen every time that value gets imported. Then display that value in the main screen.

Thanks,

Sri.

Former Member
0 Kudos

Hi...

How do you refresh the screen??

I'm using cl_gui_timer, as well... but i didn't manage to trigger the pai, pbo from there...

How did you do??

Thanks.

-


Ok, I did more research on forum, and found out how to refresh.

Using cl_gui_cfw=>set_new_ok_code( EXPORTING new_code = 'YOUR_OK_CODE_HERE' ).

It will trigger PAI and PBO.

Edited by: Eric Shimabukuro on Aug 17, 2011 7:24 PM