2009 Jan 23 4:08 AM
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.
2009 Jan 23 4:11 AM
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.
2009 Jan 23 4:23 AM
Try this..
AT SELECTION-SCREEN OUTPUT.
CLEAR l.
CLEAR s_matnr.
REFRESH: s_matnr,
s_ersda.
Hope this helps...
2009 Jan 23 4:36 AM
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
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |