2018 Dec 05 3:59 PM
Hello,
I rapport with selection screen I add
AT SELECTION-SCREEN ON EXIT-COMMAND
leave programe
The problem is that this screen event is triggered even when
user hits 'Get variant' button and than instead to show variants
flow foes out of program waht should happen only after
cancel , back or exit.
Please advice
2018 Dec 06 7:35 AM
Hello ,
When I said not workin properly that means CANCEL / BACK / EXIT do not have expected funcionality and
action after user hit those buttons was - continue execution of program (like F8)
Although in your code I found solution the 'sscrfields' structure needs to be declared as table.
That solved my issue
Thank you
2018 Dec 05 5:12 PM
You don't need to code anything special for leaving a selection screen, just take the statement out. Is there something special you are trying to achieve by capturing the exit event?
2018 Dec 05 10:02 PM
It is a question of some program with three transactions. Cancel/ back and Exit buttons before I set ‘ON EXIT’, didn’t work properly. After I set ‘On EXIT’ they are working properly but Get layout button leaves the program as well,Which is not expected.
2018 Dec 06 12:40 AM
If its selection screen, those button work as normal, you dont have to add ON EXIT to make it leave program. what do you mean 'didnt work properly', could you more detail? anw, I code a simple program and dont have any issue with on exit event:
TABLES sscrfields.
SELECTION-SCREEN BEGIN OF SCREEN 1100.
PARAMETERS: p_carrid TYPE s_carr_id,
p_cityfr TYPE s_from_cit.
SELECTION-SCREEN: FUNCTION KEY 1,
FUNCTION KEY 2.
SELECTION-SCREEN END OF SCREEN 1100.
AT SELECTION-SCREEN ON EXIT-COMMAND.
MESSAGE 'out' TYPE 'I'.
AT SELECTION-SCREEN.
CASE sscrfields-ucomm.
WHEN'FC01'.
p_carrid = 'LH'.
p_cityfr = 'Frankfurt'.
WHEN 'FC02'.
p_carrid = 'UA'.
p_cityfr = 'Chicago'.
ENDCASE.
START-OF-SELECTION.
sscrfields-functxt_01 = 'LH'.
sscrfields-functxt_02 = 'UA'.
CALL SELECTION-SCREEN 1100.
2018 Dec 06 7:35 AM
Hello ,
When I said not workin properly that means CANCEL / BACK / EXIT do not have expected funcionality and
action after user hit those buttons was - continue execution of program (like F8)
Although in your code I found solution the 'sscrfields' structure needs to be declared as table.
That solved my issue
Thank you