2007 Sep 23 3:23 PM
Hi Experts,
I am new to ABAP.Can anyone please clearly(step by step) explain how to exit from the screen without entering the value to mandatory field?
I just created one screen with two fields namely : I/O field(make it as mandatory) and pushbutton(Exit).
Without entering the value to I/O field, if I click the Exit button then it should leave the program.
Can anyone please explain how to do this?
Thanks in Advance,
Regards,
Raghu
2007 Sep 23 3:49 PM
Hi,
Go to PF Status, double click on the button, in the Function Attributes, assign "E" for "Functional Type" option. It means that it is an Exit Command.
Exit Commands will bypass the mandatory fields.
In PAI in OK Code write, "LEAVE SCREEN" or "LEAVE PROGRAM" based on your requirement.
Reward if answer is useful.
Regards,
Hema
2007 Sep 24 2:09 AM
The missing bit is that in your screen flow you will need something like:
process after input.
module at_exit_command at exit-command. "leave from here!
The "at exit-command" part tells SAP to check any "E" type exits before applying the mandatory screen validations.
Jonathan
2007 Sep 24 7:47 AM
HII
write a module in pai
module <b>exit</b> at exit command.
double click on exit.
write inside.
IF ok_code = 'EXIT'.
SET SCREEN 0.
LEAVE PROGRAM.
ENDIF.
REWARD IF HRLPFUL
VIVEKANAND
2007 Sep 24 9:47 AM
hi,
Double click on your button(EXit) , then there is a field FctType near FctCode
select there <b>E</b>
And in the PAI.
Write one new module,
<b>Module AT_EXIT_COMMAND at EXIT-COMMAND</b>.
and in this module's defination, write
<b>leave program</b>.
thanks
Dharmishta
2007 Sep 26 6:08 AM
Hi,
Thanks for answering me.I liked your answer.I want to reward your answer.Can you please let me know how to reward your answer
2007 Sep 24 10:05 AM
hi,
Assign Function code 'E' to that button in pf-status.
Made one module in PAI.
<b>Module exit_0001 at EXIT_COMMAND.</b>
<b>Module exit_0001 Input.</b>
Leave program.
<b>Endmodule.</b>
Hope it would b helpful.
REward if useful.
Message was edited by:
Dhwani shah
Message was edited by:
Dhwani shah
2007 Sep 26 5:34 AM
Hi,
Yes, Jonathan is right.
I forgot to include At Exit Command Module. Sorry.
Regards,
Hema