‎2007 Aug 23 5:50 AM
I want to maka a select of table febko based on condition that field AZIDT's first seven character is given in the select-options
i.e my selection should be based only on the seven characters of the field which is given by the user
Regards,
jaga.
‎2007 Aug 23 5:53 AM
Hi,
U can validate input fields using javascript.Write OnClientClick function for that submit button if ur using htmlb or onClick if u r using html.Refer the follows
http://help.sap.com/saphelp_nw70/helpdata/en/03/900e41a346ef6fe10000000a1550b0/frameset.htm
There are two ways to achieve ur task.
1.By checking for all alphabets.in this u need check all the alphabetic characters one by one.Refer the following
http://www.shiningstar.net/articles/articles/javascript/javascriptvalidations.asp?ID=ROLLA
http://www.shiningstar.net/articles/articles/javascript/checkNumeric.asp?ID=AW
2.By using regular expressions.its very easy and a single line code.here u need to specify single expression for whole alphabets.Refer this
http://aspzone.com/blogs/john/articles/173.aspx
Everything has been given for validating in javascript.i hope u also validating in javascript only.
For more details on "Regular expressions" search google.
Regards,
rewards point.
‎2007 Aug 23 5:53 AM
Hi,
You can get the first 7 char as follows.
DATA: val(15) type c value 'ABCDEFGHIJKLMNO'.
DATA: CHA(7) type c.
cha = val+0(7).
write: cha.
Regards,
Sesh
‎2007 Aug 23 5:54 AM
The Visual Composer is a composition tool, you can do the same in very different ways, this is not a fix tool with only one way to do it...
I'm sad you think that this forum do not help you, but maybe with playing a bit with the storyboard you will get the answer that you're looking for.
Also in you case you give us very small details, you asked how to validate an input and we answered you...(with drop-down list or by using validation rules)
Maybe you're asking for a formula but what kind of formula you want ? which datasources you want to use ? what kind of result are you expecting...
So, again, i think we give you the tricks, now you have to adapt it to use in the right way...
Kind Regards,
Luis
Nikhil Bansal
Posts: 331
Questions: 139
Registered: 12/20/06
Forum points: 10
Re: How to validate the input field
Posted: Jun 25, 2007 10:21 AM in response to: Luis Felipe Lanz Reply E-mail this post
Hi Luis,
My question was very simple.
I just want to check if the input field contains the characters 'a-z' or 'A-Z'. If any character is present then say onBlur or onSubmit there should be an error message.
Can you give me a formula for this requirements. Shall be glad if I get.
Regards
rewards point
‎2007 Aug 23 5:59 AM
Hi Jagadish,
select-options: s_option like .....
value = s_option(7).
and now use this value in select query instead of select option
<b>Regards,
Azhar</b>
‎2007 Aug 23 6:00 AM
data: val(8) type c.
concatenate s_field '*' into val.
select * from febko
where AZIDT cp val.
reward if helpful
‎2007 Aug 23 6:01 AM
Hi,
You want to select the AZIDT field values which is equal to first seven characters of select-options then it will useful for you.
First take all values of selection screen given by the user in to one internal table.
And take all values of first seven characters into another internal table .
In select statement take the forall entries of the second internal table and in where condition check the vales.
‎2007 Aug 23 6:06 AM
HI shyla ,
can you explain with the code
my table is febko and select option is s_azdit and field is azidt .
Regards,
jaga
‎2007 Aug 23 6:12 AM
Hi,
I think you need to use FOR ALL ENTRIES and check the value agisnt LOW and HIGH of select options.
Since you want to compare only first 7 char of a table field may be you have to do it after getting the data from the table into an internal table.
Regards,
Sesh
‎2007 Aug 23 6:03 AM
HI ,
i want to validate the first seven character of the feild azidt not the first seven character of the select option .
KIndly help.
Regards,
jaga