Regarding validation of Inputfield
Dear Experts
I want to allow the user to enter only the digits.(Actually this inputfield is for "Year")
Please give me the sugeestions.
Urgent
Thanks
Hazrath.G
Hi Hazrath,
Say your attribute name is year of type integer.
You can convert it as String set it to your model attribute like this:
wdContext.current<modelnode>().set<attribute>(String.valueOf(wdContext.currentContextElement().getYear()));
More Info:
If you want set Min. and Max. values for this input, create a simple type attribute as other forum members specified (Say YEAR).
Properties:
Built-In Type - integer
Value Constraints:
Minimum Inclusive -- MINIMUM YEARS ALLOWED ( e.g.1988)
Maximum Inclusive -- MAXIMUM YEARS ALLOWED ( e.g.1988)
Now set the attribute type to this YEAR. Now all the validations are taken care by framework.
regards,
Siva
Similar Messages
-
Dear All,
I have a question regarding validation (tcode OB28).
While postinf a document I got to know that a validation rule is set on document type KX and KE that "Posting Date lower than Last Posted Document is not allowed".
I check in tcode OB28 about that validation rule. I could see the check and message field but prerequisite field was empty.
I couldn't find any where mentioned about document type KX and KE. Is it possible to keep prerequisite field empty, then how to set validation on specific document type.
Please help me in this case.
Thanks,
NidhiHi,
Make sure that in pre-requisites there is no user-exit mentioned, because the logic could be there. If it's empty, it basically says that there are no pre-requisites and the check will be performed in all cases. If you want to set it up for specific document types, you can set them as pre-requisites (obviously, it won't be empty anymore).
Regards,
Eli -
Doubt Regarding validation of IDOCS
Hi Gurus,
I have some doubts regarding IDOCS.
1. If we are sending a IDOC from XI to R/3, where does we do validations from R/3 side and how do we do that. Suppose if we are sending a Purchase order IDOC form XI to R/3, how to do validations for that particular IDOC for PO number and some other fields from R/3 side.
2. Do we need to do validations in a aABAP Program.
please clarify me these Questions. Thanks in advance..
santosh.Hi Santhosh,
If you want to do any validations in ur IDOC,then from XI just push the IDOC,dont post it.
(ie)Send the IDOC from XI in status 64 :IDoc ready to be transferred to application.
Once R/3 Received this status then thru your ABAP progream just get this IDOC no: and do the validations then Post the IDOC manually.
Thanks.
Note:Reward Points if you find useful. -
Regarding validation in oracle forms
I have a requirement that in oracle forms i need to validate that i enter the data in one record and the same data in next record also with the checkbox checked for both rows . And when i enter the same data in next record i.e 3rd record it should not allow to checkbox for 3rd record.This should be the frond end validation in oracle forms .
My requirment looks like this
A B C --> columns in oracle forms
1 ab ab --> checkbox checked
1 ab ab --> checkbox checked
1 ab ab ---> when i check the checkbox it should not allow as only any of the two rows only should be checked
Please help me out?
Regards
Prasadhello
Change/ modify the properties of the check box item;
for the check boxes :
1. Make the data type of the check box as number;
2. fill the functional a.)value when check = 1 b.) value when uncheck = 0;
3. add new item to summarize the value of the checkbox;
change properties of the new added item
datatype number;
calculation summary
summary function :- sum
summarize block :- your block
summarize item :- your check box item.
used :----> when checkbox change trigger
if nvl(:item_summry,0 > 2 and //double entry of data then
your code......
.... message..
raise..
else
your code.....
end if;
For Duplicate Item data entry :-
see this for the duplicate entry for item :-
duplicate records in a multi record block
modify my given code & modify the said link information to satisfied your requirement.
charles -
Regarding Validation on Charactersticites of given Configurable Material.
Hi All,
I am working on BDC in whcih I am getting the charactersticites of the configurable materials in Flat File. Now the Problem I am facing is that when a particular characterstic is not associated with that configurable material the program is not updating any of the charactersticites associated with that configurable material.
How can we check the validity of the given charactersticites for that configurable material ? Or is there any other logic how I can update the charactersticites for that configurable material.
Points would be rewarded....
Thanks in Advance.
With Regards
Jitendra Gujarathi.no clues
-
Doubts on interactive adobe forms regarding validations
Can we apply validation logic to an interactive Adobe form?
Regards
Cheenangshuk DasYes you can do.
U can do either in Interface -- Initilization part or if u r using webdynpro abap for interactive form, u can do validation in method i.e once the user enters the data and hit the button present in the screen, u can do validation in the method which u call for button i.e method which get triggered once the button is clicked.
Thanks
Sangeetha -
Hi Experts,
I have created 3 input fields in a view.
I set focus on First Inputfield
When i click Tab in keyboard the focus went to address bar.
I want to set the focus on next inputfield when i click tab .
Plz give me suggestionHazrath,
Keep all the input fields in a transparent container. Make sure the 'labelFor' property of the Labels for the input fields, point to one of the inputfields. (otherwise, tab focusses on label instead of inputfield.
Try and let me know.
Regards,
Rajit -
Regarding validating data using excel add-in
hi
i am new to essbase, please any help me regarding the steps to be followed for
validating data that is loaded in to a cube using excel add-inThere are no standard steps.
If you wish to just cross check the data which has been loaded in cube ,then Identify the level 0 combination of members in data source from where cube is picking up data (Oracle,flat file ..etc) and retrieve the same combination through excel addin and compare the data.
hope this will help ! -
Regarding validating XML against DTD
hello,
In my project I am receiving xml via HTTP post request
and this XML needs to be validated against a DTD in a remote server.
e.g. assume the xml to be
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE PUSH SYSTEM "http:\\whatever:xx\whatever\sms.dtd">
<PUSH ICP="Partenaire" ADM="UtilisateurChezPartenaire" VERSION="1.0">
</PUSH>
the java code uses Xerces parser
DOMParser parser = new DOMParser();
parser.setFeature("http://xml.org/sax/features/validation", true);
parser.setProperty(
"http://apache.org/xml/properties/schema/external-noNamespaceSchemaLocation",
"http:\\whatever:xx\whatever\sms.dtd"");
parser.parse("c://localcopy/sms.xml");this Works fine.
But in some case I receive xml file without any !DOCTYPE declaration
(but is still needs to be validated against the same DTD as its mentioned in the business rules)
in such case how can the XML be validated against the DTD.
am I extected to add the
<!DOCTYPE PUSH SYSTEM "http:\\whatever:xx\whatever\sms.dtd">
to every XML via some XSLT script or is there a direct way of
validating a xml that has no DOCTYPE reference to a DTD
(the assumption is the DTD location is known beforehand)ok, i managed to solve the problem my self, using Transformer makes the job easier.
here is the code for anyone who might run into the same problem.#
public void whatEver(){
try{
DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();
Document xmlDocument = dBuilder.parse(new FileInputStream("c://a.xml"));
DOMSource source = new DOMSource(xmlDocument);
//StringWriter writer = new StringWriter();
StreamResult result = new StreamResult("c://a.xml");
TransformerFactory tf = TransformerFactory.newInstance();
Transformer transformer = tf.newTransformer();
transformer.setOutputProperty(OutputKeys.DOCTYPE_SYSTEM, "./transformations/Push_Gateway.dtd");
//TransformerFactory transformerFactory = TransformerFactory.newInstance();
//Transformer newtransformer = transformerFactory.newTransformer();
transformer.transform(source, result);
catch(Exception e){
e.printStackTrace();
}the above code reads the a.xml file and adds/removes the DOCTYPE as specified in the transformer.setOutputProperty method and the same xml file is updated, this way different DTD could be referenced by the same xml and validated. this saves the process of adding/removing DOCTYPE via xslt. -
Ess display regarding validity
Dear All,
We are facing a problem regarding Leave data display message in employee service portal. Suppose an employee was having 12 PL quota accrued & 3 Deducted from the period 01.01.2007 to 31.12.9999 in R3, now it has been updated & is like 01.01.2007 to 31.12.9999 is leave accrued 21 & deducted 3.
Now the problem is the ESS is showing both the records while we want the latest one only.
Can you please help to solve the issue?
Thanks in advanceHi Raj Aitha ,
As Julius said , authorization object P_PERNR allows you to restrict the employees from maintaining self data.
With in the this object you need to maintain the info type field value. Check the below link for details :
http://help.sap.com/saphelp_47x200/helpdata/en/ec/f74492fa63f749afc3b3ff6b656b32/frameset.htm
Regards
Kanti -
Regarding validating data in editable ALV in OOPS
I'm using the data_changed event in my ALV grid to validate the user's
entry in the ALV grid. My code finds the errors when the user originaly
enters the wrong data, highlights the errors in the grid, and popups u the
list of error messages.
My problem occurs when the user only fixes some of the errors and leavs
some data errors still in the grid. The data_changed will check the lnes
the user has fixed. However if they neglect to fix one of the errors,the
code doesn't reread the entry since the data didn't change from the
original entry. The error still exist and I don't want to allow the uer
to continue until they have fixed all of the errors. Is there another
event or coding that I can use to ensure the user fixes all of the errrs.
I know I could loop through the ALV grid table outside of my methods, ut
that would require rewriting all the checking again which seems very
inefficient.
Thanks,
Phani.Check this link if it is useful:
F4 Help in ALV Grid (using CL_GUI_ALV_GRID)
Regards
Neha -
Regarding Validation and Substitution.
Hi all,
I need to write a new substitution and validation and these has to be triggered when MIRO/FB60/FB65 are saved.
Now the problem is that i have append my exit and the Form has been written and program had also customized.
But when I save the transactions mentioned my exit form is not triggering. Can any one suggest why this is not triggering ASAP.
Thanks
SAGAR.Hi,
you can create ur validation enchancement using GGB0 transcation and activate it using OB28 transcation code
it will works. -
Additional question regarding validating numeric fields
This is part of the code i obtained in order to check validation.
//var reg = /^\d+$/; // checks whether input contains ONLY digits
var reg = /\d+/; // checks whether input contains digits AND letters
However, i found that both options checks only wether input contains letters.
What is the function that checks if input contains only digits ?Hi,
This is an example of where FormCalc has an advantage over JavaScript. There are built in functions in FormCalc for getting the maximum and minimum values.
In the total mileage, you could set up two variables, one for Max and one for Min and then subtract them.
var maxMiles = Max(mileage[*])
var minMiles = Min(mileage[*])
$ = maxMiles - minMiles
This is based on the script being in the calculate event of the total field. Also it depends on how you have set up the table. If the rows have the same name: eg Row1[0], Row1[1], Row1[2],... Row1[30] and the mileage field is named the same in each row, then the script may look like:
var maxMiles = Max(Row1[*].mileage[*])
Hope that helps,
Niall
Assure Dynamics -
Need some help regarding validation of input in a text field
Hello everyone,
i am new to all this website designing stuff and is working on my first website (treausre hunt types) and expecting some guidance over here. :-)
I have successfully managed to validate the login page using server behaviour.
Let me explain what i need guidance with.
After login , the user is redirected to a page where a question is asked and he has to type the answer in the given text field and click on the submit button. Now i want to validate the given answer with the correct one and if it is answered correctly then the user is redirected to the next page.
the question is what and how am i supposed to do this? i am using adobe dreamweaver cc and wampserver as localhost.This becomes complicated to do it the way you want BUT YOU CAN do it - you just need to be a bit more efficient and get a template together.
Copy the 4 documents below and paste into seperate DW files to see how this works then look at the code and see if a pattern becomes noticeable to you. What we are doing is adding 1 to each level and checking the user has accumulated a score to that level - if not they are bumped down to the level which they have reached or in the case of not reaching any level to question 1.
question_1.php:
<?php
// Start the session
session_start();
?>
<?php
if (isset($_POST['submit'])) {
$answer = trim($_POST['answer']);
if(($answer == "Green" || $answer == "green")) {
$_SESSION['question'] = 2;
$correct = "<p>Correct Answer</p><p>You will automatically be taken to the next level</p>";
header( "refresh: 5; url=question_2.php" );
else {
$wrong = "<p>Wrong, please try again,</p>";
?>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Quiz</title>
<style>
p {
font-size: 20px;
color:#930;
margin: 0;
padding: 10px 0 8px 0;
</style>
</head>
<body>
<h3>Question 1.</h3>
<h2>What color is grass?</h2>
<form id="quiz" action="question_1.php" method="post">
<label for="answer">Answer<br>
<input type="text" name="answer" id="answer"></input>
<input type="submit" name="submit" value="Sumbit">
</label>
</form>
<?php
if(isset($wrong)) {
echo $wrong;
elseif(isset($correct)) {
echo $correct;
?>
</body>
</html>
question_2.php
<?php
// Start the session
session_start();
?>
<?php
// This sends the user to question 1 if SESSION question has not been set
if(!isset($_SESSION['question'])) {
header('Location: question_1.php');
// This sends the user back if SESSION question is LESS than 2
if($_SESSION['question'] < 2) {
header('Location: question_1.php');
if (isset($_POST['submit'])) {
$answer = trim($_POST['answer']);
if(($answer == "Blue" || $answer == "blue")) {
$_SESSION['question'] = $_SESSION['question']+1;
$correct = "<p>Correct Answer</p><p>You will automatically be taken to the next level</p>";
header( "refresh: 5; url=question_3.php" );
else {
$wrong = "<p>Wrong, please try again,</p>";
?>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Quiz</title>
<style>
p {
font-size: 20px;
color:#930;
margin: 0;
padding: 10px 0 8px 0;
</style>
</head>
<body>
<h3>Question 2.</h3>
<h2>What color is the sky?</h2>
<form id="quiz" action="question_2.php" method="post">
<label for="answer">Answer<br>
<input type="text" name="answer" id="answer"></input>
<input type="submit" name="submit" value="Sumbit">
</label>
</form>
<?php
if(isset($wrong)) {
echo $wrong;
elseif(isset($correct)) {
echo $correct;
?>
</body>
</html>
question_3.php
<?php
// Start the session
session_start();
?>
<?php
// This sends the user to question 1 if SESSION question has not been set
if(!isset($_SESSION['question'])) {
header('Location: question_1.php');
// This sends the user back if SESSION question is LESS than 3
if($_SESSION['question'] < 3) {
header('Location: question_2.php');
if (isset($_POST['submit'])) {
$answer = trim($_POST['answer']);
if(($answer == "Yellow" || $answer == "yellow")) {
$_SESSION['question'] = $_SESSION['question']+1;
$correct = "<p>Correct Answer</p><p>You will automatically be taken to the next level</p>";
header( "refresh: 5; url=question_4.php" );
else {
$wrong = "<p>Wrong, please try again,</p>";
?>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Quiz</title>
<style>
p {
font-size: 20px;
color:#930;
margin: 0;
padding: 10px 0 8px 0;
</style>
</head>
<body>
<h3>Question 3.</h3>
<h2>What color is the sun?</h2>
<form id="quiz" action="question_3.php" method="post">
<label for="answer">Answer<br>
<input type="text" name="answer" id="answer"></input>
<input type="submit" name="submit" value="Sumbit">
</label>
</form>
<?php
if(isset($wrong)) {
echo $wrong;
elseif(isset($correct)) {
echo $correct;
?>
</body>
</html>
question_4.php
<?php
// Start the session
session_start();
?>
<?php
// This sends the user to question 1 if SESSION question has not been set
if(!isset($_SESSION['question'])) {
header('Location: question_1.php');
// This sends the user back if SESSION question is LESS than 4
if($_SESSION['question'] < 4) {
header('Location: question_3.php');
if (isset($_POST['submit'])) {
$answer = trim($_POST['answer']);
if(($answer == 4 || $answer == 4)) {
$_SESSION['question'] = $_SESSION['question']+1;
$correct = "<p>Correct Answer</p><p>You will automatically be taken to the next level</p>";
header( "refresh: 5; url=question_5.php" );
else {
$wrong = "<p>Wrong, please try again,</p>";
?>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Quiz</title>
<style>
p {
font-size: 20px;
color:#930;
margin: 0;
padding: 10px 0 8px 0;
</style>
</head>
<body>
<h3>Question 4.</h3>
<h2>What is 2 + 2?</h2>
<form id="quiz" action="question_4.php" method="post">
<label for="answer">Answer<br>
<input type="text" name="answer" id="answer"></input>
<input type="submit" name="submit" value="Sumbit">
</label>
</form>
<?php
if(isset($wrong)) {
echo $wrong;
elseif(isset($correct)) {
echo $correct;
?>
</body>
</html> -
Query regarding validation in a BPEL process
Hi,
I need to validate an XML document( a BPEL variable) against a schema.I used the validate activity.But when the exception is thrown by the validate activity in case of an invalid document, it is only reporting the first error that it encounters.Also, it doesn't return the XPath of the element causing the problem.Is there any way in Oracle SOA Suite 11g in which I could validate an XML document (i.e. a BPEL variable) against a schema and extract the Xpath of all the erroneous elements?Or do I have to write a custom service for that.
Thanks in advance
Edited by: user11930797 on Dec 11, 2010 7:59 AM
Edited by: user11930797 on Dec 11, 2010 7:59 AM
Edited by: user11930797 on Dec 11, 2010 7:59 AMin OSB the validate action does what you are looking for... not of much use if you have SOA Suite alone...
Maybe you are looking for
-
Lost iPhone yesterday, battery died. Will I be able to find it?
My iPhone 5 died yesterday, and the last place I had it was on the train, searched all last night and today and I still can't find it, so I've either lost it at the station or someone's stolen it. I'm trying to use 'Find my iPhone' but I'm not sure i
-
How do you get rid of 'empty' pre-roll time in logic pro 9?
how do you get rid of the pre-roll time in logic pro 9? My project's start time is 8-bars before any material, or tempos, or anything... Can't move the start time back to ")" (zero) STUCK!! at -8 The song now has 20 seconds of dead air time i
-
Internal table manual modification
I understand this is probably going to be the stupidest question ever posted here. But I wanted to know how to manually add values to an internal table without doing a select statement. TYPES: BEGIN OF ty_ext, param(32) type c, row ty
-
Messages icon not appearing on iPad 1, although able to use when I search for the application
I have an iPad 2 that has messages installed after updating to ios5. My step daughters iPad 1 has the messages built in app but it does not appear on any home screen. If we search for the application it shows up and we are able to use it. Is there an
-
Default settings for .Mac gallery?
Is it possible to set settings like "Mosiac" and the grey background when I create a gallery? It seems to default to Grid and then of course visitors can select something else but I would like it to load as Mosiac by default. Thanks! Onno.