on 08-22-2007 4:09 PM
Hi All
I am having a requirement like on bsp page user will enter employee id and press the submit button , then it should validated from database that the id is correct .
And if it's not correct then one pop up window will come with message please enter right employee id how i can achive this ?
regards
Sunanda Mandavi
thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Amandeep
I had put below code for submit button option .
<htmlb:button id = "Send"
text = "SEND"
tooltip = "Press to send information"
onClick = "onInputProcessing(Submit)"
onClientClick = "javascript:validate();"
design = "emphasized" />
and for validation
<% IF lv_empid IS NOT INITIAL. %>
<script language="javascript">
function validate() {
alert('please enter valid id')
}
</script>
<% ENDIF. %>
but i am not getting any popup message .
Regards
Sunanda
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Thanks for the response but this event will take place after clicking on the submit button .
Regards
Sunanda
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
<b>Layout</b>
<%@page language="abap" %>
<%@extension name="htmlb" prefix="htmlb" %>
<htmlb:content design="design2003" >
<htmlb:page title="Check Pernr " >
<htmlb:form>
<htmlb:textView text = "Personnel No."
design = "EMPHASIZED" />
<htmlb:inputField id = "pernr"
value = "<%= lv_pernr %>" />
<%
if lv_no_pernr = 'X'.
%>
<script language="Javascript">
alert ("Personnel no. is not Valid")
</script>
<%endif.%>
</htmlb:form>
</htmlb:page>
</htmlb:content>
<b>ONINPUTPROCESSING</b>
DATA: l_pernr TYPE persno.
DATA: data TYPE REF TO cl_htmlb_inputfield.
data ?= cl_htmlb_manager=>get_data( request = runtime->server->request
name = 'inputField'
id = 'pernr' ).
IF data IS NOT INITIAL.
l_pernr = data->value.
ENDIF.
CLEAR lv_no_pernr.
SELECT SINGLE pernr FROM pa0000 INTO l_pernr WHERE pernr EQ lv_pernr.
IF sy-subrc NE 0.
lv_no_pernr = 'X'.
ENDIF.
<b>PAGE ATTRIBUTES</b>
lv_no_pernr TYPE FLAG
lv_pernr TYPE PERSNO
hope this helps.
A
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
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.