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

AT EXIT-COMMAND doesn't work

Former Member
0 Likes
953

Hi experts,

In screen painter I use AT EXIT-COMMAND to exit current screen as the following code. But it doesn't exit the screen if ok_code = 'create' while other ok_code work well. Can anyone tell me that's why?

Thanks!


module exit.
  if SY-UCOMM = 'EXIT' or SY-UCOMM = 'BACK'.
    LEAVE PROGRAM.
  elseif SY-UCOMM = 'CLEAR' or SY-UCOMM = 'CREATE'.
    CALL SCREEN 100.
endmodule.

1 ACCEPTED SOLUTION
Read only

JozsefSzikszai
Active Contributor
0 Likes
700

probably the create command is not defined as exit command?

5 REPLIES 5
Read only

JozsefSzikszai
Active Contributor
0 Likes
701

probably the create command is not defined as exit command?

Read only

Former Member
0 Likes
700

write this statement in PAI

and check weather sy-ucomm capturing the key r not

MODULE EXIT.

IF sy-ucomm = 'LEAV'

SET SCREEN 0.

LEAVE SCREEN.

ENDIF.

ENDMODULE.

Regards

Anbu B

Read only

Former Member
0 Likes
700

Did you Set the Function code as Type E then only it will tigger.

check this program,,.

DEMO_DYNPRO_AT_EXIT_COMMAND

Read only

0 Likes
700

Hi,

module exit.

if SY-UCOMM = 'EXIT' or SY-UCOMM = 'BACK'.

LEAVE LIST-PROSSESING." TO COME BACK

elseif SY-UCOMM = 'CLEAR' or SY-UCOMM = 'CREATE'.

REFRESH ITAB." FOR INTRNAL TABLE

CLEAR WA." FOR WORKAREA

CALL SCREEN 100.

endmodule.

NOW USE THIS .

Thanks & Regards,

D Tarun Kumar.

Read only

Former Member
0 Likes
700

Thanks for all you. You remind me...