on 02-19-2014 7:40 AM
Hi Gurus, I am new to BSP. In my requirement I need to validate PO and display error message on same page.
I have a stand alone class where I have done the validations. My question is how can I combine these two and display error message in case of error.
Please suggest if any previous discussions are available on this, because I could not able to find any....
BR
Siva
Hi Siva,
There are may ways to achieve this, and all depends on how you are developing your bsp app, ie. MVC or HTMLB.
in most cases these days people now choose the MVC approach, and in this method there are 3 ways you can do your validation, and its good practice to use all 3.
1. HTML - Set the "max length" of field and make the field type "number". ie
<input type="number" name="iEbeln" min="8" max="10">
2. Javascript - write a small function to validate your field ie;
var numbers = /^[0-9]+$/;
if(iEbeln.value.match(numbers)){
return true;
}
3. ABAP - on your call to get data based on PO, let the bapi or your background logic validate it.
Hope that helps..
Shaunny B
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
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.