02-25-2008 6:33 AM
hi
in module pool programming, there is a mandatory field , but the user should not enter the value in the mandatory field, how to come out of the screen.
02-25-2008 6:35 AM
Hi,
For this, you need to program what is called AT EXIT-COMMAND code.
In your flow logic, you create a module as so:
MODULE md_exit_command AT EXIT-COMMAND.
Then in PF-status, you configure the Cancel (red button on toolbar) as exit button by setting Type of button as 'E'. Put OKCODE as 'CANC'.
Then, in the module
MODULE md_xit_command INPUT.
CASE OKCODE.
WHEN 'CANC'. LEAVE TO SCREEN 0. ENDCASE.
ENDMODULE.
What this does is, if there is any error , the exit command overrides this error and allows you to exit.
Cheers,
Aditya
02-25-2008 6:37 AM
Hi,
You can use the feature:
MODULE XYZ AT EXIT-COMMAND.
Double-click on XYZ and this will create a Module....End Module in the PAI of the screen. Inside this, you can code your logic to leave the screen, even if there are mandatory fields.
MODULE BACK INPUT.
LEAVE TO SCREEN 100.
ENDMODULE.
The above coding is just a heads on. You may have to add few logics as desired by the reqt.
Regards,
JLN
02-25-2008 6:40 AM
Hi,
1. For your BACK or CANCEL button on menu bar, give Button
Ftype "E".
2. In PAI : Write below Modules.
PROCESS AFTER INPUT.
MODULE CANCEL AT EXIT-COMMAND.
MODULE BACK AT EXIT-COMMAND.
double click on it.Inside of modules write below code.
MODULE CANCEL INPUT.
IF OK_CODE = 'CANCEL'.
CLEAR OK_CODE.
LEAVE PROGRAM.
ENDIF.
ENDMODULE.
MODULE BACK INPUT.
IF OK_CODE = 'BACK'.
CLEAR: OK_CODE, INPUT1, INPUT2.
LEAVE TO SCREEN 100.
ENDIF.
ENDMODULE.
02-25-2008 6:50 AM
hi
good
if it is mandatoray field than you can come out of the report directly clicking on the red button on the sap screen but i dont know how it will fulfill your requiremnet.
thanks
mrutyun^