Hi,
I have a inputfield say: t_comp_code where I want the user to enter the Company Code.Then I want to check the Company Code master table to see if the entry exists or not. This I want to do oBlur of the field and then output an error message in an alert box via Javascript.
How do I achieve reading an internal table & then calling the Javascript function if sy-subrc = 0?
And where do I select all values of the master table?
As I am new to BSP I am having problems visualizing this.
Please help.
Regards
Tejaswini
check out onClientClick you can activate Javascript there for a button element or so.
As for giving a variable to JavaScript you have to set the variable in your event handler then pass it to your page layout
<script> alert(<%=myvalue%>); </script>
If you set a page attribute called myvalue TYPE STRING and in OnCreate set
myvalue = 'hello'.
Do that on a test page and you will get a good idea how passing to JavaScript can work.
As for reading tables and so you can do that in the Event Handlers or in the page layout with ABAP.
Add a comment