‎2009 Sep 04 12:29 PM
Hello all,
I am having a screen in my module pool program. There are some mandatory fields in that screen. I have a button 'clear'. but when I am trying to clear those fields its asking me to fill all the details. But I want it to be done even if some fields are not filled.
waiting for the help.
Bhaskar
‎2009 Sep 04 12:40 PM
Give the button Function code as Exit function.
Regards
Karthik D
‎2009 Sep 04 12:40 PM
Give the button Function code as Exit function.
Regards
Karthik D
‎2009 Sep 04 1:00 PM
Thanks for the suggestion. I have already done that. Still not working
‎2009 Sep 04 1:03 PM
Hi,
Remove the mandatory functionality. Check the fields for initial values using code.
Thanks,
Sri.
‎2009 Sep 04 1:16 PM
@sri and ragavendra
I have tried it. But still giving the custom message which I have written when I am trying to clear. Is ther any other way ?
‎2009 Sep 04 1:25 PM
Hi,
Create a module AT EXIT-COMMAND.
MODULE clear AT EXIT-COMMAND.Now in F01 write the code for clearing there.
CASE sy-ucomm.
WHEN 'F_CLEAR'.
CLEAR : field1,
field2,
field3.
ENDCASE.Hope it helps.
Thanks,
Sri.
‎2009 Sep 04 1:33 PM
‎2009 Sep 04 1:06 PM
Hi
Remove the Mandorty option for the field and use the recommanded options.for validation implement the code.
Regards,
raghu
‎2009 Sep 04 1:33 PM
Instead of making them mandatory you can make them recommended . It will provide this tick mark in field, suggesting the user that he/she should enter value there but will allow to leave them unfilled.
To do that go to field attributes -> tab Progam -> dropdown Input -> choose recommened
I have tried it. But still giving the custom message which I have written when I am trying to clear. Is ther any other way ?
Where did you place your custom message? Can you show us your code both in program na screen flow?
Regards
Marcin
‎2009 Sep 04 1:47 PM
Marcin,
I have written the code for clearing the fields in PAI like
case sy-ucomm.
when 'fcsave'
" save the data.
when 'fcclear'.
clear : zlogin-userid,
zlogin-pswd.
endcase.
Thank u very much for the answer.
‎2009 Sep 04 1:52 PM
No problem, but I think 10 points in this case should go to Sri , as he gave you the answer you needed, right?
I will be still satisfied with 6 though
Regards
Marcin
‎2009 Sep 04 1:58 PM