Application Development 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: 

regarding exit from the module pool screen

Former Member
0 Kudos

h experts,

i have developed a module pool report in which in the selection screen i have four fields which are mandatory ,when i execute the program without entering in the selection screen it do not allow to come out of the module pool screen ...what i want that without entering any input in the selection screen if i press exit button push button it will allow to come out of the screen for this what sud i do plz help me....

1 ACCEPTED SOLUTION

former_member404244
Active Contributor
0 Kudos

Hi,

U need to write the AT EXIT-COMMAND command.

In PAI

MODULE EXIT_XXXX AT EXIT-COMMAND.

Now u have write the code as.

IF SY-UCOMM = 'EXIT'.

LEAVE TO SCREEN 0.

ENDIF.

Now go to EXIT button on the toolbar.U have to make As type E.

Regards,

Nagaraj

6 REPLIES 6

0 Kudos

HI,

In your PAI add a module as follows

MODULE EXIT_XXXX AT EXIT-COMMAND.

MODULE EXIT_XXXX.

if ok_code = 'EXIT'.

LEAVE PROGRAM.

ENDIF.

ENDMODULE.

EXIT button on the toolbar has FUNCTION TYPE 'E' only function type's can enter a module with addition AT EXIT-COMMAND.

Regards,

Sesh

.

former_member404244
Active Contributor
0 Kudos

Hi,

U need to write the AT EXIT-COMMAND command.

In PAI

MODULE EXIT_XXXX AT EXIT-COMMAND.

Now u have write the code as.

IF SY-UCOMM = 'EXIT'.

LEAVE TO SCREEN 0.

ENDIF.

Now go to EXIT button on the toolbar.U have to make As type E.

Regards,

Nagaraj

Former Member
0 Kudos

hi,

try this code,

module exit_prg at exit-command.

module exit_prg input.

if sy-ucomm = 'CANCEL'.

leave program.

endif.

endmodule. " for this cancel you should give <b>e</b> function type at pf-status.

reward points if useful,

regards,

seshu.

Former Member
0 Kudos

In the PAI of the screen you have to code a module with exit command as first module.

syntax is 'MODULE MMMMM AT EXIT-COMMAND'

In this module the code is there to leave screen for ok codes cancel, exit etc.

This code will be executed prior to checking mandatory fields on the screen.

Former Member
0 Kudos

Hi

keep a button called <b>EXIT</b> on the screen

Make the function type of that field as <b>E</b>

in Flow logic write

PROCESS AFTER INPUT.

  • Forced Exit from the transaction from screen

MODULE exit AT EXIT-COMMAND.

double click on exit module and

then in PAI write

&----


*

*& Module exit INPUT

&----


  • Exit from the Transaction

----


MODULE exit INPUT.

CASE okcode.

WHEN 'EXIT' OR 'CANCEL'.

CLEAR okcode.

LEAVE PROGRAM.

ENDCASE.

ENDMODULE. " exit INPUT

<b>Reward points for useful Answers</b>

Regards

Anji

Former Member
0 Kudos

HI.

your question:when i execute the program without entering in the selection screen it do not allow to come out of the module pool screen

if filed1 is not initial.

call screen NO

else .

message 'Enter all mandotry fields' type 'E'.

end if

your question:what i want that without entering any input in the selection screen if i press exit button push button it will allow to come out of the screen

In PAI

MODULE EXIT_XXXX AT EXIT-COMMAND.

Now u have write the code as.

IF SY-UCOMM = 'EXIT'.

if field1<manditory field> is initial.

LEAVE TO SCREEN 0.

else.

message 'You may loos your inputs' type 'E'

ENDIF.

reward all helpfull answers.

regrds.

Jay