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

How to refresh the select screen when program 'Back' to the select screen?

Former Member
0 Likes
4,331

Hi Experts,

I have met a very strange issue. After running a report, when user click 'Back' Button, he want the selection screen empty not what he just input. I thought it is easy, I just clear the options value in the program, but it will still display on the screen. I found a solution as you will see below program (set <fs> = '01') , it doesn't work in SE38 run, but in Tcode run it still doesn't work. I got confused, so could you please help with it? Thank you!

I just created an explame for this issue.

*************************************

REPORT zrc_test.

TABLES: mara.

DATA: l TYPE c.

SELECT-OPTIONS: s_matnr FOR mara-matnr NO INTERVALS.

SELECT-OPTIONS: s_ersda FOR mara-ersda NO INTERVALS.

INITIALIZATION.

CLEAR s_matnr.

REFRESH s_matnr.

s_ersda-option = 'EQ'.

s_ersda-sign = 'I'.

s_ersda-low = sy-datum.

APPEND s_ersda.

AT SELECTION-SCREEN OUTPUT.

CLEAR l.

START-OF-SELECTION.

CLEAR s_matnr.

REFRESH s_matnr.

WRITE: 'XXXX'.

FIELD-SYMBOLS : <fs> .

ASSIGN ('(RSDBRUNT)MEMKEY-INT_MODE') TO <fs> .

IF sy-subrc = 0 .

<fs> = '01' .

ENDIF.

Hi Experts,

I have met a very strange issue. After running a report, when user click 'Back' Button, he want the selection screen empty not what he just input. I thought it is easy, I just clear the options value in the program, but it will still display on the screen. I found a solution as you will see below program (set <fs> = '01') , it doesn't work in SE38 run, but in Tcode run it still doesn't work. I got confused, so could you please help with it? Thank you!

I just created an explame for this issue.

*************************************

REPORT zrc_test.

TABLES: mara.

DATA: l TYPE c.

SELECT-OPTIONS: s_matnr FOR mara-matnr NO INTERVALS.

SELECT-OPTIONS: s_ersda FOR mara-ersda NO INTERVALS.

INITIALIZATION.

CLEAR s_matnr.

REFRESH s_matnr.

s_ersda-option = 'EQ'.

s_ersda-sign = 'I'.

s_ersda-low = sy-datum.

APPEND s_ersda.

AT SELECTION-SCREEN OUTPUT.

CLEAR l.

START-OF-SELECTION.

CLEAR s_matnr.

REFRESH s_matnr.

WRITE: 'XXXX'.

FIELD-SYMBOLS : <fs> .

ASSIGN ('(RSDBRUNT)MEMKEY-INT_MODE') TO <fs> .

IF sy-subrc = 0 .

<fs> = '01' .

ENDIF.

3 REPLIES 3
Read only

Former Member
0 Likes
1,101

Hi,

In the END-OF-SELECTION after doing all the processing Refresh the screen Parameter.

END-OF-SELECTION
" After all the processing Logic
Refresh : s_matnr ,  s_ersda.

Read only

Former Member
0 Likes
1,101

Try this..

AT SELECTION-SCREEN OUTPUT.

CLEAR l.

CLEAR s_matnr.

REFRESH: s_matnr,

s_ersda.

Hope this helps...

Read only

Former Member
0 Likes
1,101

Hi

When you hit the Back button, the first screen is displayed where you have the Select-Options.

So the PBO is executed. Meaning the Initialization event is executed.

When I executed your code and hit the Back button the s_matnr field was empty but the s_ersda field had the date.

So in Initialization you can use a flag and if condition to check if date must be displayed or not.

Hope this helps

Regards,

Jayanthi.K