How to validate: only characters
Hi
I need to validate a textfield that can only contain
characters (doesn't mather what case and how many). How do I do
that?
Thanks
Hi walkerm,
Spry doesn't have provide an "alphabeticCharacters"
validation, but you could use in this case a custom validation
function that you will write yourself.
function myValidation(){
//do your validation here
var textfield1 = new
Spry.Widget.ValidationTextField("textfield1", "custom",
{validation: myValidation});
Please check the 8th sample on
this
page on Adobe Labs.
Similar Messages
-
How to validate only Time.
Hi,
Check the code to validate only time:
DATA : l_tstamp TYPE timestamp,
l_tstamp_out TYPE timestamp.
GET TIME STAMP FIELD l_tstamp.
TRY.
CALL METHOD cl_abap_tstmp=>add
EXPORTING
tstmp = l_tstamp
secs = 3600 <<<===--- 1 hour = 3600 seconds
RECEIVING
r_tstmp = l_tstamp_out.
CATCH cx_parameter_invalid_range .
WRITE 'invalid range'.
EXIT.
CATCH cx_parameter_invalid_type .
WRITE 'invalid type'.
EXIT.
ENDTRY.
WRITE l_tstamp time zone 'UTC '.
SKIP.
WRITE l_tstamp_out time zone 'UTC '.
Regards
Kannaiah -
How to validate tiny characters!
Hi,
I wanted to creat a validation in my aplication on P22_USERNAME, so that the username had only tiny characters, plus "_ and ." and numbers !
So i have creat a validation on this is item that validate a regular expression like:
^[-a-z0-9._]
So i have insert by hand all values that i can use.
Is there any expression that make the same job?
Thank's in advance
PepeHello,
I'm not sure I understand the problem, are you saying the Regular Expression method doesn't work for you?
John.
http://jes.blogs.shellprompt.net
http://apex-evangelists.com -
How to validate that only one check box is checked in detail block
Hi All,
I am using oracle Forms 10G on windows.
I need help on how to validate that only one check box is checked in detail block. I have multiple records in the detail block and I have check boxes for each record in the detail block.
I have a button to select the values from the detail records where the check box is checked. But I want to make sure that only one record is check not more than one.
How do I validate this on a push button trigger?
ThanksWhen I've done this kind of thing, I create a Form level variable of TYPE number and then add or subtract to this variable as I check and uncheck the checkboxes. If the value of the variable is 1, then you know that only one checkbox is selected. If the value is greater than 1, then you know the user has selected more than one check box. You could also add code to your When-Checkbox-Changed trigger to test the variable and instruct the user to un-check selected record before selecing a new record.
With respect to the Form level variable, you can use a GLOBAL, PARAMETER or Program Unit package specification. I prefer to use the PU Package Spec as this method has a smaller memory footprint. For example, in the Program Unit node of the object navigator create the following;
/* Form variables package spec */
PACKAGE Form_Vars IS
CheckBox_Cnt NUMBER := 0;
END;Now in your When-Checkbox-Changed trigger...
BEGIN
IF ( Form_Vars.CheckBox_Cnt = 0 ) THEN
Form_Vars.CheckBox_Cnt := Form_Vars.CheckBox_Cnt + 1;
ELSE
/* it's assumed the value is greater than 0 */
Message('Please uncheck selec ted record before choosing a new record.');
RAISE Form_Trigger_Failure;
END IF;
END;Hope this helps,
Craig B-)
If someone's response is helpful or correct, please mark it accordingly.
Edited by: CraigB on Feb 3, 2011 10:15 AM -
How to validate an text field item using javascript for numbers only.
hi,
how to validate an text field item using javascript for numbers only.please help me on this urgent
please mail me solun if posible on [email protected]Hi,
Page HTML header
<script>
function onlyNum(evt) {
// Usage: onKeyPress="return onlyNum(event)"
evt = (evt) ? evt : window.event;
var charCode = (evt.which) ? evt.which : evt.keyCode;
if (charCode > 31 && (charCode < 48 || charCode > 57)) {
var status = 'This field accepts numbers only!';
alert(status);
return false;
var status = '';
return true;
</script>Item HTML Form Element Attributes
onKeyPress="return onlyNum(event)"Br,Jari -
How to validate the input field
Hi,
I have a input form which is draged from input port of a RFC.
in this input form i have two input fields nad submit button.
on of this input field should always take the character values only. it should not take any numeric value
and other input field should always take numeric value only.
i.e how to validate this two input fields.
regards
srinivasHi,
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,
Tamil K -
How to validate numbers in char field.
Hello all,
I have one database column with char data type. This field should allow insert only
numbers [ zero to nine] and plus symbol .. how to validate this?
Pls help me..
I.m using oracle 9i database. So it does not allow REG-EXP and WITH methods.. So give some
sql coding to do thisAs this forum is for issues with the SQL Developer tool, you'll probably get more answers in the SQL And PL/SQL forum.
Regards,
K. -
How to show Greek characters in Italic style
How to show Greek characters in Italic style
Hi all, I'm tryng to resolve a problem with the Greek characters
I need to display labels in two languages, english or greek inside my report.
At the beginning of the report I have a placeholder with the xml code : *<?param@begin:p_language?>*, so I can understand inside my report if the user chose the Greek or English, and then I have many placeholders (labels) which have to be written in Greek or English.
If the language chosen is English, I don't have any problem to show my labels bold or italic in every fonts
Inside the placeholder I wrote the following code:
*<?xdofx:if $p_language = 'Ελληνικά' then 'Οργανισμός' else if $p_language = 'Αγγλικά' then 'Organization' end if?>*
I can chose font, style and bold/not bold directly from Word and when I run the report in pdf I see exactly what I chose.
If the language chosen is Greek....I see always the label in Arial, NOT BOLD and NOT ITALIC...
In order to see Greek characters BOLD:
a) I added (under the ADMIN tab/Runtime Configuration/Font Mappings/ ) a font named Arial and I addeda target Font named Arialbd.ttf under the directory: D:\Oracle\Oracle_Homes\BIP_101341\jdk\jre\lib\fonts
b) I changed the font (from word) to Arial
Now, ONLY with tha ARIAL font I can see my labels in greek bold, but I can't still see them in italic style.....
So, I tried to force these condition inside the placeholder with the following code:
*<?if:$p_language = 'Ελληνικά'?><xsl:attribute xdofo:ctx="inlines" name="font">Times New Roman</xsl:attribute><xsl:attribute xdofo:ctx="inlines" name="font-style">Italic</xsl:attribute><xsl:attribute xdofo:ctx="inlines" name="color">red</xsl:attribute><xsl:attribute xdofo:ctx="inlines" name="font-weight">bold</xsl:attribute>Οργανισμός<?end if?>*
...but I continue to see the labels in Greek only bold, red but not in Italic Style......
Also adding another font called Arialbi.ttf (Arial bold Italic)...I can't see my labels in Greek bold with Italic Style....
Anybody had the same problem with another alphabet different from the latin one ???
Any help will be appreciated
Thanks in advance
AlexHi Chris,
Thanks for your reply.However I still have some problems.
I couldnt get jpdk 3.0.9.0.4 version the latest version that I
got was jpdk 3.0.9.0.2.
I tried the 3.0.9.0.2 version and it gave me the below error.
Error-
sun.io.MalformedInputException
at sun.io.ByteToCharUTF8.convert(ByteToCharUTF8.java,
Compiled Code)
at java.io.InputStreamReader.convertInto
(InputStreamReader.java, Compiled Code)
at java.io.InputStreamReader.fill
(InputStreamReader.java, Compiled Code)
at java.io.InputStreamReader.read
(InputStreamReader.java, Compiled Code)..........
Can you guide me regarding this ???
Regards,
Mandar. -
How to escape special characters in Simple Transformation
Hi Experts,
I have got a problem to get a well formed xml document from the below simple transformation. The content of maktx contains
special characters like & <, which are not allowed in a well formed XML-Document. But the result of the Simple Transformation
contains this charcters even after the transformation as you can the in the result below. Has anyone a hint how to escape the
characters included in the maktx.
The transformation for maktx, should be something like
Before: Material & < TEST
After: Material & < TEST
Report wihich calls the simple transformation
types:
BEGIN OF t_mat,
matnr type matnr,
maktx type maktx,
end of t_mat.
Data:
mat type t_mat,
xml_stream type xstring.
START-OF-SELECTION.
mat-matnr = '4711'.
mat-maktx = 'Material & < Test'.
CALL TRANSFORMATION ztest_st2
SOURCE mat = mat
RESULT XML xml_stream.
CALL FUNCTION 'DISPLAY_XML_STRING'
EXPORTING xml_string = xml_stream.
Simple Transformation
<?sap.transform simple?>
<tt:transform xmlns:tt="http://www.sap.com/transformation-templates">
<tt:root name="MAT"/>
<tt:template>
<Leistungsschild>
<CHARACT> MATNR </CHARACT>
<CHARACT_DESCR> Materialnummer </CHARACT_DESCR>
<VALUE tt:value-ref="MAT.MATNR"/>
<CHARACT> MAKTX </CHARACT>
<CHARACT_DESCR> Materialkurztext </CHARACT_DESCR>
<VALUE tt:value-ref="MAT.MAKTX" />
</Leistungsschild>
</tt:template>
</tt:transform>
RESULT
<?xml version="1.0" encoding="utf-8" ?>
<Leistungsschild>
<CHARACT>MATNR</CHARACT>
<CHARACT_DESCR>Materialnummer</CHARACT_DESCR>
<VALUE>4711</VALUE>
<CHARACT>MAKTX</CHARACT>
<CHARACT_DESCR>Materialkurztext</CHARACT_DESCR>
<VALUE>Material & < Test</VALUE> </Leistungsschild>Hi Sandra,
First of all thaks for your quick answer to my problem.
I see what you mean and get the same result, if I am using data-type string instead of xstring. But the recommendation in the XML-Books of SAP is to use XSTRING to save memory and circumflex problems between Codepages, when writing the XML-Stream to a filesystem.
As you can see in the code abvoe I am using a SAP-FM to display the XML-Stream and this FM works only with XSTRING´s,
that is one reason why I don´t understand that it displays it in the wrong way.
Even the Debugger shows me for the XSTRING the wrong result. Does all that mean that the escaping will not be applyed if you are working with XSTING´s?? -
How to write special characters in PDF using iText
How to write special characters encoded with UTF-8 in PDF using iText.
Regards,
Pandharinath.I don't know what your problem is but that's almost certainly the wrong question to ask about it. Java (including iText) uses only Unicode characters. (You may consider some of them to be "special" if you like but Unicode doesn't.) And when it does that, they aren't encoded in UTF-8 or any other encoding.
So can you describe your problem? That question doesn't make sense. -
How to Validate a User on the click of a button in Oracle APEX
Hi,
How to Validate a User on the click of a button in Oracle APEX.
say for e.g: I want to allow only a specific user to go beyond after clicking on a button and restrict all the other Users. Any ideas please.
Thanks in Advance,
AfWell , the actual idea was to hide the button for specific users and show the button only for some specific users... is this possible...?
@ AndyH: yeah, what you have suggested also fits well for my requirement... Could you please let me know how can i achieve it...
Regards,
Af -
How to validate a date in message mapping
Hi experts,
how to validate a date in message mapping. For ex: if date comes as 2008/02/31, then file it shold not get processed.how to achieve this in message mapping. Please help .
Thanks&Regards,
Reyaz HussainHi,
There are few simple ways for date validation as follow,
1.If you would like to handle it in XI only, then in message mapping you could verify about it with the help of generating smart exception.
For e.g in mapping there is one Date conversion API i.e. somthing DateTransformation It converts the incoming date format to required format. Here give the date format i.e expected from Sender File.
If in case the format miss-matched then it will create the exception.
You could handle this exception with the use of [Alert notification|http://help.sap.com/saphelp_nw04/helpdata/en/2c/abb2e7ff6311d194c000a0c93033f7/frameset.htm] and could be even able to notify to sender system about it.
2. The another solution is easy for SAP synchornous communication --If you are passing the file data to SAP, then you could use below function modules to verify date format in receiver RFC/BAPI or inbound IDOC program. If the sy-subrc is not 0 then don't process further.
CONVERT_DATE_FORMAT
ISU_DATE_FORMAT_CHECK
Thanks
Swarup -
How to validate Quantity field in TV - Inputfield ?
Hello All,
I'm using a table view to show the output .
IN this table view I made 2 fields as Input fields.
Both the fields are Quantity fields.
Now when the user enters a value in this Quantity field I want to validate it with respect to it's units .
How can I do that ?
In my case if the user enters correct value it works but when he enters a wrong value my BSP is going for a dump.
I tried to debug the<b> LIPS table</b> to verify how SAP was handling this checking for the field <b>LFIMG</b>. But there there is a statement called chain --endchain.
SO there is no chance for debugging.
My code is as follows :-
LOOP AT gt_final INTO wa_final.
CLEAR: gv_row,lv_qty,lv_string,gv_len,gv_cell_id1.
gv_row = sy-tabix.
gv_len = STRLEN( gv_row ).
gv_len = gv_len - 1.
* Modify the Third Column
CONCATENATE 'INB01_TV_ID' '_' gv_row(gv_len) '_' '3' INTO gv_cell_id1 .
lv_string = request->get_form_field( name = gv_cell_id1 ).
WRITE lv_string TO lv_qty UNIT wa_final-units.
CLEAR :wa_final-del_quantity.
wa_final-del_quantity = lv_qty.
MODIFY gt_final FROM wa_final TRANSPORTING del_quantity.
ENDLOOP.
Can anyone tell me how to validate the entry for the Quantity filed ?
Regards,
Deepu.K
I have one more Question .
Whenever BSP goes for a dump in this case I want to handle this by a message .
Is it possible ?
Message was edited by:
deepu kHello Raja,
I want to validate the entry in the QUantity field with respect to the Unit of the Quantity.
I.e say for example I have a unit as PC (pieces) then the quantity must be only of thousands,lakks and so..on......but not in points i.e a piece quantity must be full either 200 ,2 lakhs or 2 pieces but not 2.5 pieces.
SO now if the user enters 2.5 it's a wrong value as the quantity for the Unit PIECES can't have half-piece. (2.5 = 2 + 0.5) .SO i want to validate this .
I hope I'm clear.
How should I do ?
Regards,
Deepu.k -
How to validate a program in background
hello folks,
i need to validate my program, my program should run only in background
in case if it runs in foreground it should give error message. how to validate my
program.
can any one just tell the procedure how to do it.
any help will be greatly appreciated,
thanks in advance.
regards,
cnuHello CNU,
following snippet should do.
Regards
Klaus
if ( 'X' ne sy-Batch ).
message e000 with 'Only in Batch'(BTC).
endif. -
How to validate a filed in a search help which is created in se11
hi
i got a requirement that validate a search help. i created a ztable with 3 fileds for that one i have to create a search help so help me to how to validate fields in a search help.
regards
krishnaHello Krishna,
What do you mean by validating a field? Usually you use a search help to display possible values for a certain input field based on values in another table. You can restrict the values that are displayed by certain conditions if you need to.
If you want to allow only values based on complex conditions or authorizations of the user, you can always create a search help exit and in there you have complete control over what the user is allowed to see in the search help and what he is allowed to select.
Function Module F4IF_SHLP_EXIT_EXAMPLE gives you an idea what you can do in a search help exit.
Regards,
Michael
Maybe you are looking for
-
How do i install fonts on 0s 10.7.4?
how do i install fonts on 0s 10.7.4?
-
you know about ipad have siri
-
Can't mount 3rd party DAS storage and Xsan volume simutaneously
Xsan client(MacPro) equipped an Apple FC HBA card can't mount SGI TP9300 DAS storage and Xsan volume simutaneously when powering on or restarting. Among 2 FC ports, one port is used for Xsan volume using Xserve RAID, and the other port is used for SG
-
Hi All, I had installed P6 8.3 with weblogic 10.3.6. My Adminserver is running. But when i am starting my managed server P6, P6 server is getting started but P6 application is failing to start and giving above error. but my p6help web application is
-
how does ipad transfer to a dvd