‎2009 Nov 18 1:47 PM
Hi,
I m trying to modify input zfield added in a standard tcode. This zfield need to be kept mandatory. The problem is that if i give value to the mandatory field BACK,LEAVE, CANCEL button in status bar works properly, if i dont give value , im unable to go BACK or LEAVE or CANCEL the screen. Though i have written code to LEAVE PROGRAM, it doesnt work on screen 111??
Thanks.
‎2009 Nov 18 1:57 PM
To omit all mandatory checks and leave the program, you must first assign type function = E to given button i.e. EXIT, then create module in PAI
MODULE my_module AT EXIT-COMMAND.
Then in ABAP handle it as normal PAI module exiting your application
MODULE my_module INPUT.
LEAVE PROGRAM.
ENDMODULE.
Regards
Marcin
‎2009 Nov 18 2:11 PM
Hi,
This is standard tcode and i have assigned E to BACK, LEAVE and CANCEL. If i fill the field with value, i can EXIT sucessfully. If i dont fill value and try to leave from screen BACK, LEAVE and CANCEL doesnt work.
Thanks.
‎2009 Nov 18 2:51 PM
As marcin said,
MODULE my_module AT EXIT-COMMAND.
add the above statement as the first statement in your PAI.
I think so you are using sy-ucomm for your function.
‎2009 Nov 18 3:27 PM
Hi,
in program SAPLMEGUI , screen 14 line no 18 CALL SUBSCREEN SUB0. -- This statement doesnt get into exit SAPLXM06, screen 111 when the mandatory zfield is not entered with value.
it triggers the exit, when i fill the zfield with value, enabling BACK,LEAVE, CANCEL to work.
I have written LEAVE PROGRAM based on sy-ucomm value in module input at exit-command
still not working!
thanks.
‎2009 Nov 18 5:15 PM
HI Uma,
Put a check on sy-ucomm and execute you code only when it is not 'E'. else leave program.
Edited by: Harsh Bhalla on Nov 18, 2009 10:47 PM