‎2009 Feb 25 9:46 AM
Hi experts.
I am working on At Exit command and in my screen i have field validation and i have coded AT EXIT COMMAND in my PAI to execute when we exiting BACK/CANCEL/EXIT. I have taken Function type as "E' in GUI. but too i am not able to exit without field validation and when i debug the control is not coming to At exit Module. plz help me on this..
waiting for your suggestions.
Mahesh
‎2009 Feb 25 9:52 AM
‎2009 Feb 25 9:51 AM
At Exit-command must be the first statement in the flow logic under PAI. Have tou written it as the first statement?
‎2009 Feb 25 9:52 AM
‎2009 Feb 25 10:51 AM
Hi,
let me clarify from you..have u coded like this...
PROCESS AFTER INPUT.
loop at <int table>
endloop.
MODULE < module name> AT EXIT-COMMAND.
in between module and endmodule....
case sy-ucomm.
when 'BACK'.
ur code.
endcase.
Outside the loop plz use the user command module.
Hope this will help..
Plz let me know if ur coding is like this and still it is not working.
Regards,
Rohan.
‎2009 Feb 25 10:58 AM
‎2009 Feb 25 11:01 AM
Hi,
I am using the following way and it is working fine for me.
PROCESS AFTER INPUT.
MODULE user_exit_command AT EXIT-COMMAND.*&---------------------------------------------------------------------*
*& Module user_exit_command INPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
module user_exit_command input.
data: ok_code_0002 type sy-ucomm.
case ok_code_0002.
when 'BACK'.
clear ok_code_0002.
leave to screen 0.
when 'EXIT'.
clear ok_code_0002.
leave program.
when 'CANCEL'.
clear ok_code_0002.
* leave to transaction 'ZFSLSCB'.
endcase.
endmodule. " user_exit_command INPUTHope will help you to solve your problem,
Kind Regards,
Faisal
‎2009 Feb 25 11:01 AM
Hi Mahesh,
Please try following code.
PROCESS AFTER INPUT.
MODULE leave_dynpro AT EXIT-COMMAND.
CHAIN.
FIELD v_lifnr.
FIELD wv_ebeln.
MODULE check_ebeln ON CHAIN-REQUEST.
ENDCHAIN.
FIELD v_lifnr MODULE check_lifnr ON REQUEST.
CHAIN.
FIELD wv_lfsnr.
MODULE validate_delivery_no ON CHAIN-REQUEST.
ENDCHAIN.
MODULE user_command_0100.
PROCESS ON VALUE-REQUEST.
FIELD wv_lfsnr MODULE f4_vbeln.
&----
*& Module LEAVE_DYNPRO INPUT
&----
text
----
MODULE leave_dynpro INPUT.
PERFORM leave_dynpro.
ENDMODULE. " LEAVE_DYNPRO INPUT
Regards,
Anil
‎2009 Feb 25 11:04 AM
Hi Mahesh,
Use EXIT statement inside your module. Hope this will soove your issue.
‎2009 Feb 25 12:22 PM
hi,
thank you all of you for replying to me..
i have rewarded to all of you.
the problem is resolved.
thank you,
Mahesh