‎2008 Jul 04 10:49 AM
hi Exprets!!
i am working on the screen programing and i have screen 9001 and in that i have set of fields to be inputed. i have used chain--endchain in PAI for those fields. but problem is when i process the report the screen i designed is not going back until i fill all the details of the input fields. how to avoid this.its getting struck at that screen.
plz reply me..
mahesh
‎2008 Jul 04 10:57 AM
Hi,
Try this piece of code.
MODULE exit_command INPUT.
IF g_ok_code = 'BACK' OR
g_ok_code = 'RW' OR
g_ok_code = 'EXIT'.
IF sy-dynnr = 9000.
LEAVE PROGRAM.
ELSE .
LEAVE TO SCREEN 0.
ENDIF.
ENDIF.
ENDMODULE.Hope this will solve ur problem.
plz reward if useful.
thanks,
dhanashri.
‎2008 Jul 04 10:50 AM
Hi , You need to code to which screen u need to go when back or exit is pressed in PAI. in the Module User_command. Else it will keep calling the same screen again and again.
Murali.
‎2008 Jul 04 10:55 AM
‎2008 Jul 04 10:57 AM
Hi,
Try this piece of code.
MODULE exit_command INPUT.
IF g_ok_code = 'BACK' OR
g_ok_code = 'RW' OR
g_ok_code = 'EXIT'.
IF sy-dynnr = 9000.
LEAVE PROGRAM.
ELSE .
LEAVE TO SCREEN 0.
ENDIF.
ENDIF.
ENDMODULE.Hope this will solve ur problem.
plz reward if useful.
thanks,
dhanashri.
‎2008 Jul 04 11:04 AM
hi......
In
MODULE screen_9001 AT EXIT-COMMAND.
you can write loic for back,cancel and exit.
when you use E-type of functions the validations are not checked and it will come out of the screen.
in the above module you can write set creen 0.
leave screen.
or directly write leave program.
‎2008 Sep 30 1:42 PM