on 08-29-2007 1:21 PM
Hi Experts,
I have a code on BSP Page like this :
<htmlb:label text = "*<%= otr(BBP_SUS_UI/FIRSTNAME) %>"
for = "FIRSTNAME" />
</td>
<td>
<htmlb:inputField id = "FIRSTNAME"
width = "250"
disabled = "<%= disable_change %>"
doValidate = "true"
value = "//co_model/firstname" />
</td>
</tr>
<tr>
<td>
My requirement is to create an ERROR message, there is any entry in this field for NON CHARACTER type, when I will press SAVE Button.
Thanks in advance,
Study SAP
when you presss button save you can do both client and server side validation. If client side. you will have to impliment a java script function to achive this. on server side. on INOUTPROCESSINg or DO_HANDLe_EVENT you can check the field contents and raise a custom error message.
client side validation.. <a href="http://smartwebby.com/DHTML/phone_no_validation.asp">Sample code 1</a>
<a href="http://www.codetoad.com/javascript/isnumeric.asp">Sample code 2</a>
Server side Validation
if //co_model/firstname NA '0123456789'.
* no error
else.
*issue error message.
endif.
hope this helps.
Amandeep.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Amandeep,
I have created message for Warning message :
The code is like this,
<%
IF co_model->firstname CA '+-=<>()'.
%>
<script language = "Javascript">
alert ("First name is not correct")
</script>
<%ENDIF.%>
Now I need to change this warning message to Error Message, so that data on BSP Page will not be saved.
Please help, it is urgent,
Thanks in advance,
Study SAP
Thanks Amandeep,
when I am using this retunr statement as below :
<%
IF co_model->firstname CA '+-=<>()'.
%>
<%
RETURN.
%>
<%ENDIF.%>
It is not stopping me to save the data.
---> For change in the method, the method is SAVE method and it is standard BSP Application, give me idea to change this method ?
when I am going in the coding, it is not allowing me to make any change and asking for access key for changing this.
Thanks in advance,
Study SAP
Message was edited by:
Study Sap
You don't have to use RETURN in the View. Please use is either on DO_HANDLE_EVENT or ONINPUTPROCESSING.. when you hit SAVE the control goes to the server and if there is any error in the field you have use RETURN just before you call your SAVE Method.
Amandeep.
<i><b>Please don't post your questions TWICE. Please Read the engagement Rules of SDN</b></i>
Hi,
Check my reply on the other thread....
Please don't post duplicate posts as mentioned by Amandeep.
Thanks,
Tatvagna Shah.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.