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

hi gurus

Former Member
0 Likes
854

What is the use of At-Exit-Command ????

can u give me an example....

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
824

What is the use of At-Exit-Command ????

can u give me an example....

5 REPLIES 5
Read only

Former Member
0 Likes
824

Hi

It exits/comes out of that screen forcibly even though there are some mandatory info which has to be given in the screen.

It forces the cursor to come out of the screen.

Write it in PAI of the screen flow logic

PROCESS AFTER INPUT.

  • Forced Exit from the transaction from screen

MODULE exit AT EXIT-COMMAND.

&----


*& Module exit INPUT

&----


  • Exit from the Transaction

----


MODULE exit INPUT.

CASE okcode.

WHEN 'EXIT' OR 'CANCEL'.

CLEAR okcode.

LEAVE PROGRAM.

ENDCASE.

ENDMODULE. " exit INPUT

Reward points if useful

Regards

Anji

Message was edited by:

Anji Reddy Vangala

Read only

Former Member
0 Likes
825
Read only

Former Member
0 Likes
824

Hi,

In the GUI definition, for this function code, set the function type to 'E' (exit command).

If the user chooses a function whose function code does not have type E, the MODULE <mod> AT EXIT-COMMAND statement is not executed.

sample code:

This exit-command module looks like below.

Module exitscreen input.

Case v_okcode_100.

When ‘EXIT’.

Leave to screen 0.

when ‘BACK’.

Leave to screen 0.

when ‘CANCEL’.

Leave to screen 0.

Endcase.

Endmodule

Please check this link for more info.

http://help.sap.com/saphelp_nw04/helpdata/en/9f/dbaa9535c111d1829f0000e829fbfe/content.htm

***do rewards if usefull

regards,

vijay

Read only

sreeramkumar_madisetty
Active Contributor
0 Likes
824
Read only

Former Member
0 Likes
824

check the program demo_dynpro_at_exit_command

used for BAck Exit And Cancel

Module with at exit cmmaand will always be executed first(because this is actually used for leaving to back screen or from the program itself).

No other modules are executed unnecessarily.

<b>Dont forget to award</b>

Sudheer