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

MODULE AT EXIT-COMMAND not triggered

Former Member
0 Likes
6,657

Hi,

I have placed module USER_COMMAND_9000 at exit-command in PAI but it will never be called whenever I click on button Entr, Back, Exit and Canc. I have activated the interface and everything else, also set the function key. Below is my code.


PROCESS BEFORE OUTPUT.
 MODULE STATUS_9000.

PROCESS AFTER INPUT.
 MODULE USER_COMMAND_9000 AT EXIT-COMMAND.


MODULE STATUS_9000 OUTPUT.
  SET PF-STATUS 'STATUS_9000'.
  SET TITLEBAR 'TITLE_9000'.

ENDMODULE.                 " STATUS_9000  OUTPUT

MODULE USER_COMMAND_9000 INPUT.
  CASE sy-ucomm.
    WHEN 'ENTR'.
      PERFORM populate_output.

    WHEN 'BACK'.
      LEAVE TO SCREEN 0.

    WHEN 'EXIT'.
      LEAVE PROGRAM.

    WHEN 'CANC'.
      LEAVE TO SCREEN 0.

  ENDCASE.

ENDMODULE.                 " USER_COMMAND_9000  INPUT

1 ACCEPTED SOLUTION
Read only

kesavadas_thekkillath
Active Contributor
1,477

have you set the button function to 'Exit function' in PF status ?

5 REPLIES 5
Read only

sridhar_meesala
Active Contributor
0 Likes
1,477

Hi,

Do the following.

In the screen flow logic.

PROCESS BEFORE OUTPUT.
 MODULE STATUS_1000.
PROCESS AFTER INPUT.
 MODULE exit AT EXIT-COMMAND.
 MODULE USER_COMMAND_1000.

Now in F01,

MODULE exit INPUT.

 CASE sy-ucomm.
     WHEN 'ENTR'.
       PERFORM populate_output.
 
     WHEN 'BACK'.
       LEAVE TO SCREEN 0.
 
     WHEN 'EXIT'.
       LEAVE PROGRAM.
 
     WHEN 'CANC'.
       LEAVE TO SCREEN 0.
  ENDCASE.
endmodule.                 " exit  INPUT

Thanks,

Sri.

Read only

kesavadas_thekkillath
Active Contributor
1,478

have you set the button function to 'Exit function' in PF status ?

Read only

0 Likes
1,477

Thanks Keshu. I have indeed forgotten to set function type to E.

Read only

Former Member
0 Likes
1,477

hi ,

change

MODULE USER_COMMAND_9000 AT EXIT-COMMAND.

to

MODULE USER_COMMAND_9000

and check .

br,

vijay.

Read only

faisalatsap
Active Contributor
0 Likes
1,477

Hi,

Follow the Steps Bellow.

--> Open T-Code SE41

--> Give your Program name and Status Name

--> Than Change

--> Expand the Function Keys and Double Click on Back, Exit or Cancel

--> In the Displayed Dialog Box In the 2nd Option Functional Type

--> Select E

now test Hope will solve out your problem,

Please Reply if Still not Solve.

Regards,

Faisal