‎2015 Jun 15 7:56 AM
Hi,
I have developed a selection screen with a select-option for ‘time’. 00:00:00 is displayed by default while executing, bus no value has been taken to the select-option as usual. When I select some ‘time’, say 08:30:00 and 10:00:00 for the select-option, and executes, value is fetched correctly and getting output. The problem is that when I click back button from the output ALV screen, the previously selected time will be there (not a problem) and when I clear the time and press enter key, the time changes to 00:00:00 in both the fields, but a = mark is shown adjacent to the select-option. When I execute, the program takes it as select-option-HIGH = 000000 and LOW as 000000, resulting in wrong execution. My requirement is that when I press BACK, the select-options should be cleared. (Cannot use AT SCREEN-SELECTION OUTPUT as the enter key will also clear the time).
‎2015 Jun 15 8:31 AM
‎2015 Jun 15 8:31 AM
‎2015 Jun 15 9:05 AM
Hi,
clear the select option at the event "INITIALIZATION"
regards
Stefan Seeburger
‎2015 Jun 15 10:13 AM
‎2015 Jun 15 10:24 AM
‎2015 Jun 16 5:14 AM
‎2015 Jun 16 7:28 AM
Dear SAJAN
,
Use below Code , I tried it works.
SELECTION SECREEN BEGIN OF BLOCK b! WITH FRAME TITLE TEXT-001.
SELECT-OPTIONS : S_TIME FOR SY-UZEIT,
S_TIME1 FOR SY-UZEIT NO-DISPLAY. "
SELECTION SCREEN END OF BLOCK B1.
AT SELECTION SCREEN ON S_TIME.
LOOP AT s_time.
MOVE-CORRESPONDING s_time TO s_time1.
APPEND s_time1.
ENDLOOP.
IF SY-UCOMM = 'ONLI'.
CLEAR s_time.
REFRESH s_time[].
ENDIF.
START-OF-SELECTION.
write your code on the basis of S_TIME1.
regards,
Pradeep Mishra
‎2015 Jun 16 2:03 PM
‎2015 Jun 15 9:35 AM
Hi, that is really strange behavior. I tested it and I have same problem.
Can not find any program way to set values as it was when first run.
Write output is: ' 000000000000'.
SELECT-OPTIONS s_time FOR sy-uzeit.
START-OF-SELECTION.
WRITE: s_time.
Only way I found is manualy go to "Multiple selection" (button on right side of sel. opt.) and there trash icon.
Clearing s_time at INITIALIZATION does not work...
‎2015 Jun 15 9:36 AM
Refresh the select options at the start of the program under INITIALIZATION event.
REFRESH S_XXXX.
‎2015 Jun 15 9:53 AM
‎2015 Jun 15 10:15 AM
I have tested, but not working fine. The 'INITIALIZATION' event itself is not getting triggered in my program.
‎2015 Jun 15 10:54 AM
Dear Sajan,
Write your Code as fallows..
SELECT-OPTIONS : s_time for SY-UZEIT,
s_time1 for Sy-UZEIT NO-DISPLAY. " Use this for your data Selection.
AT SELECTION SCREEN.
Loop at S_TIME.
Move-Corresponding s_time to S_TIME1.
Append S_TIME1.
Endloop.
CLear S_TIME.
REFRESH S_TIME[].
Use S_TIME1 for further Data Selection.
Regards,
Pradeep Mishra.
‎2015 Jun 15 12:13 PM
Sorry, its not working when I use back button. The time values in the select-option is not even reset to 00:00:00.
‎2015 Jun 15 3:54 PM
Hi,
yea quite strange. i was sure the refresh should work. testet it myself and figured that the standard behaviour of selection screens is to keep the values if returning from execution.
(SE16 works the same)
but if you want another solution as the standard, check this treat. i did not test it myself, but sounds like it should work.
regards
Stefan Seeburger