Avoiding Manadatory Field Validation
Hello,
I require to populate a few fields based on a value selected from a dropdown. However, I am using a custom screen with all manadatory fields, hence getting stuck with mandatory field validation.
I tried using AT EXIT-COMMAND in PAI, but then the selected value is not passed, and hence the population of screen fields is not happening.
Any suggestion for me?
Regards
Prasenjit Mitra
Pune, India
HI Prasenjit
The manadatory validation has the more priority so it will not allow any other statements to process.
Instead fo going for Obligatory addition for that parameter you can validate it manually in the PAI event like
If <parameter> is initial.
message e001(zer). --->show error message
else
<code>
endif
HI
the problem is you can use AT EXIT-COMMAND but you cant pass the value at the same time. so i suggest you to use the validation using coding by which you can pass the value
regards
kishore
Message was edited by: Harikishore Sreenivasulu
Similar Messages
-
Advanced Field Validation Needed ASAP
This app is great but you really need to add some more detailed field validation options. There isn't even a phone number field validation. Users can put in the data any way they want and that is unacceptable. For $144 per year I expect to be able to validate the field content.
I'm bumping this back up to the top.
Field validation is a basic function of any professional form. For example the phone numbers submitted by form users need to be in a standard format. Without validation they can be submitted as xxxxxxxxxx, (xxx) xxx-xxxx, xxx-xxx-xxxx, etc. When the responses are viewed that column will be a mess. I was hoping to avoid the step of saving the responses as an MS Excel file but that is the only way I can see to format the phone numbers.
Please tell me how I can create a form field that forces users to enter a phone number in a specific format WITHOUT some kind of field validation. -
Trying to create a Field Validation Expression and need help
I have a picklist field and another field that are in question. I want to set some sort of rule that forces the second field to be populated only If specific values are selected from the picklist field.
I was going the route of a field validation Rule, but everything i've tried so far does not produce the results i am trying to achieve.
The first type of expression i tried was:
([<plProduction_Print_Account_Category_ITAG>] <> LookupValue("OCC_CUST_LOV_ACCOUNT_1", "No Production Print") AND ([<stSIC_Code_ITAG>] IS NULL))
This is generating the field validation error message when i select any of the correct values from the picklist. the problem is still the second field, which will generate the error if a value is entered into the second field, regardless of the picklist value selected. Switching the "IS NULL" to "IS NOT NULL" only reverses the problem on the second field, causing the error to generate when the second field is updated to a NULL or blank value.
I also tried :
= 'No Production Print' AND [<stSIC_Code_ITAG>] IS NOT NULL
and got similar results.
([<plProduction_Print_Account_Category_ITAG>] = LookupValue("OCC_CUST_LOV_ACCOUNT_1", "No Production Print"))
Similar results as well.
Does this need to be an IIF statement? Do I need to make this a workflow expression instead? i could really use some help as I have tried everything i can think of and admit, i'm not the expression guru!!!. Any assistance would be appreciated.
TeknoManYes we have the same request and we used the following expression. Example we have a field "Método de pago" ( [<plMtodo_de_pago_ITAG<]), it's values are "CHEQUE and DEPOSITO" if we select DEPOSITO three more fields were requiered Route, Sucursal de banco and Clabe so we have to put this validation in the four fields including Metodo de pago.
[<plMtodo_de_pago_ITAG>] <> "DEPOSITO" OR ([<Route>] IS NOT NULL AND [<nSucursal_de_banco_ITAG>] IS NOT NULL AND [<stCLABE_ITAG>] IS NOT NULL)
well in the field CLABE we put the following [<plMtodo_de_pago_ITAG>] <> "DEPOSITO" OR ([<Route>] IS NOT NULL AND [<nSucursal_de_banco_ITAG>] IS NOT NULL AND [<stCLABE_ITAG>] IS NOT NULL AND Len([<stCLABE_ITAG>])=18) this was because the len of the value must be 18 characters.
I hope this works for you
Regards Catalina Valadez
Edited by: CatalinaV on 12/03/2009 10:54 AM
Edited by: CatalinaV on 12/03/2009 10:55 AM -
How can I do field validation on the last two characters of a text field?
I have a text field. The user is required to enter the last two characters as numbers. I want to apply validation on this field. How can i achieve the same?
EX: If the user enter ABCDE, an error messgae stating the last two digit should be numeric.
I tried using the below in the field validation which did not work.
(0+Right([<ExternalSystemId>],2)) > 0 AND (0+Right([<ExternalSystemId>],2)) < 99.
Any ideas would help?Try this-
FindOneOf(Right([<Field1>],"2"),"abcdefghijklmnopqrstuvwxyz")=0
rgds,
Amit -
Mandatory field validation on Page links.
We have created a Portal application where we included different applications as taskflows. We have also created a tabbed interface which helps us to communicate from one task flow to another taskflow. When we are in one page of taskflow and try to move to another page of different taskflow using tabbed interface we receive mandatory field validation error which prevents us to move to any other page until we fill all the mandatory fields. We need to move to different page of taskflow by using the tabbed interface even without filling all the necessary mandatory fields. Can anyone help us to resolve this issue as this is very important for our project.
<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 -
Field Validation on Read Only Field
I'm trying to create a pop up error box if a field contains null values. The problem is that the field I'm trying to do the validation on is a read-only field. It's the Account field on the Contact Object or Module. It won't allow me to include validation. The goal here is to have a POP UP ERROR box come up if someone does not select a value for that field. Making it required doesn't generate a popup box, it only has a small "required" text next to the field which can be easily missed by a user. Any ideas?
Hi !
I found the way to do what you wan't, but it sounds a bit strange for me...
You have to put a field validation on the Account Id field. I made some tests to know what is in the AccountId field when it's blank and i see that the value is "No Match Row Id" !!
So your validation rule must be simply
*<> "No Match Row Id"*
It worked for me, the error message appears... But I think this is something we have to report to Oracle...
Hope this will help, feel free to ask more !
Max -
How can avoid mandatory fields in data transfer
hai
please respond me
how can avoid mandatory fields in data transfer like bdchi,
u have to pass values for mandatory fields in bdc method, u have to prepare u r bdc data such a way that all the mandatory fields are filled, other wise it will give error -
Field validation - make field required based on value of another field
Hi,
I tried to enter the field validation into both LeadSource and stSource_Detail field, however, when the LeadSource is not "Customer" or "Staff" and Source Detail is not empty, the validation message will prompt. Below is my field validation:
IIf(([<LeadSource>]=LookupValue("OCCAM_LEAD_SOURCE", "Customer") OR [<LeadSource>]=LookupValue("OCCAM_LEAD_SOURCE", "Staff")) AND [<stSource_Detail_Staff_ID__Customer_ID_ITAG>] IS NULL,N,[<stSource_Detail_Staff_ID__Customer_ID_ITAG>])Field Validation statements must return only TRUE or FALSE. Rewrite your statement such that if your condition is valid, true is returned, and if not, false is returned.
Thom -
Field Validation on Custom Obj. 4: Value of one field making other Req.
Hello All,
I have been working on a field validation problem for a while. I have a custom Picklist on CO4. This picklist has two values YES and NO (a checkbox does not meet requirements). What I need to do is If Picklist='YES' then FieldA, FieldB, and FieldC are Required else they are not required. FieldA = Text (short), FieldB = Date, and FieldC = Currency. I've tried numerous ways to validate on Fields A, B, and C with statements like IIf(Picklist=LookupValue(Picklist,"YES"),FieldA<>NULL,FieldA) or IIf(FieldValue(Picklist)="YES",FieldA<>NULL,FieldA) etc... these were just my latest attempts at this point I'm jsut trying random things to try to get it working. I am probably using incorrect syntax (even though it passes the sytax checker). If anyone has any suggestion let me know. Also if I haven't made clear what it is I'm attempting to do let me know and I'll try to clarify.
Thanks,
ZHi,
if I understand correctly, you want this functionality:
If Picklist = NO => it doesn't matter what values are contained in Field A, B and C.
If Picklist = YES => Field A is not null and Field B is not null and Field C is not null
To trigger the validation when the picklist value changes then you have to configure the Field Validation for the Picklist:
[<Picklist>]=LookupValue("Picklist","NO") OR ( Len([<Field_A>])>0 AND Len([<Field_B>])>0 AND Len([<Field_C>])>0 )
You have to put the validation also on Field_A and Field_B and Field_C, because in case of an update of , let's say, Field_B, you should prevent that Field_B is blanked.
If someone updates only Field_B and he doesn't change the value of the Picklist, the validation expression put on the Picklist is not evaluated.
Simona -
Name of the table where can get the two fields Valid-From and Valid-to for
Hi gurus
I want name of the table where I can get the two fields Valid-From and Valid-To and their relation ship with the header table in BOM
Regards
KaisarYou can only get the Valid from date from the table STKO.
To get the valid to date, you have to take one day less than the valid-from date of the next record for the same BOM.
Alternatively use the Function module:
CSAP_MAT_BOM_READ
It will give both valid from and valid to dates in the tables parameter: T_STKO
Regards,
Ravi
Edited by: Ravi Kanth Talagana on Jul 2, 2008 4:37 PM -
Bypass Required Field Validation when needed in PDF Dynamic Form
I faced a tricky situation, where some fields are required, but we need to allow bypass required (mandatory) validation rule when saving the form, and require to fill such fields when submitting the form. In other words, provide flexible control when to turn On / Off this feature.
I wanted to implement a flexible solution, and I will post my findings here. Appreciate your feedback for improvements.
Steps:
1. Mark rquired fields as required.
2. Specify "Empty Message" as "This field cannot be left blank", or similar.
3. Specify "Validation Script Message" as "This field must have a proper value before submit", or similar.
4. Create a Global Form Level Variable something like "StopTotalValidation" and default as "1" means by default, Turn Off Validation for some cases.
5. For the fields which require this type of control, add the script (to be defined later) on the "validate" event:
myTools.validateForRequiredField(this);
6. Create a Script Object "myTools" and add the following script:
function initStringFunc() {
//call this function on Document Initialize
String.prototype.trim = function() {
return this.replace(/^\s+|\s+$/g,"");
String.prototype.ltrim = function() {
return this.replace(/^\s+/,"");
String.prototype.rtrim = function() {
return this.replace(/\s+$/,"");
String.prototype.isEmpty = function() {
return (this == null) || this.trim() == "";
function setNodeProperty(theNode, theProperty, newValue) {
if (theNode[theProperty] != newValue) {
theNode[theProperty] = newValue;
function isNodePropertyEmpty(theNode, theProperty) {
var result;
if (theNode == null || theNode[theProperty] == null) {
result = true;
} else {
result = theNode[theProperty].isEmpty();
return result;
function disableTotalValidation() {
StopTotalValidation.value = "1";
function enableTotalValidation() {
StopTotalValidation.value = "0";
function isTotalValidationOn() {
return StopTotalValidation.value != "1";
function isTotalValidationOff() {
return StopTotalValidation.value == "1";
const conRequired = "(required)";
function validateForRequiredField(theFld) {
// Bypass Required Field Validation when Global Validation is Off.
var result=false;
if (theFld) {
if (theFld.mandatory && theFld.mandatory == "error") {
if (myTools.isNodePropertyEmpty(theFld, "rawValue")) {
myTools.setNodeProperty(theFld, "rawValue", conRequired);
if (isTotalValidationOn()) {
if (isNodePropertyEmpty(theFld, "rawValue") || theFld.rawValue.toLowerCase() == conRequired.toLowerCase()) {
result = false;
} else {
result = true;
} else {
result = true;
} else {
result = false;
return result;
7. Now, on the click of "Save" button call the function "disableTotalValidation()" and on the click of "Submit" button call the function "enableTotalValidation()".
I have just finished implementing the above solution, and as per my initial testing, it is working fine.
I will post this to my Google Docs workspace, and provide updates their.
Tarek.Hi Tarek,
I see what you mean in relation to clarity if you used the form variable approach. It was only a suggestion. Like so many things in LC, there is more than one way to finding a solution to a problem.
The triple equal sign (===) is testing if the condition is equal, but to a higher standard. It is testing if the values are identical to each other. For example if you were testing if a textfield was empty, with Equality (==) you might have this:
if (this.rawValue == null || this.rawValue == "") {
// Some script
If you use Identity (===) you can do the same thing with less script:
if (this.rawValue === null) {
// Some script
It is also useful when testing the value of an object, but also the type (eg string, number, Boolean).
Lastly, it can be used for non-identity (!==).
In relation to createNode() etc, apart from John's blog, it is covered in the LC documents: http://www.adobe.com/support/documentation/en/livecycle/documentation.html. Look for the scripting guides and the guide to the XML Form Object Model.
Good luck,
Niall -
Hi All,
For SRM-MDM catalog workflow, I want to write a currency field validation to find out the catalog item data records where difference between the original price and the new price for the same catalog item data is greater than 1%.
So as a precursor to the final validation expression, I wrote a very primitive validation expression like:
IF((Contract Price.Amount - [Original].Contract Price.Amount)>1,FALSE,TRUE)
And I was expecting that this should return a FALSE boolean value whenever difference is greater than 1. But surprisingly, irrespective of the difference in the amount, it always returns a TRUE value.
I am wondering whether it is a problem with the validation expression or is it a bug? I am working on SAP MDM 5.5 SP04 Patch 02 (5.5.63.71).
Any suggestions would be appreciated.
Thanks,
SatyenHi Nisha,
Thank you for your reply.
As I had mentioned in my previous post, irrespective of whether, amount value is incremented or decremented, it always returns FALSE.
Syntactically and logically, your validation expression is correct but still it always return an error message (a FALSE value).
What do you reckon, is it a bug in the MDM software?
Regards,
Satyen -
How to "Hide signature field validity icon when signature is valid" in Acrobat 6 Standard?
I know how to "hide the signature field validity icon" in Acrobat 8 Pro, but just can't seem to find where to do it in Acrobat 6 Standard.
Thanks for any help!
.....SeanHi Sean,
That functionality didn't exist in version 6. I got to tell you though that version 6 is way past its end-of-life and you really should be using a newer version.
Steve -
I have custom picklist (department) which has value like 'Research','Sales','Production'
If the picklist value is Sales ,Owner field of SR can be null(owner field need not have value),I should be able to save record,
If picklist value is other than sales ,Owner field of SR should not be null(Owner field should have value),It should prompt msg saying select owner.
I wrote field validation on departmnet picklist
IFF((Fieldvalue('<picklistnmae>')<>'Open' AND [<Owner>] IS NULL),True,False)
but it show error msg for any status...
how to make owner field require based on picklist value chosenHi,
I think Owner cannot be null. If Owner is blank, Owner will be set as the person who create the record. Please chck it.
So the condition might be wrong. -
Field validation in table maintenance generator and input value grey out.
i have created ztable with 3 fields as em_no,em_no and addrnumber.
first two fields are custom fields but the third custom field need to validate the standard table adrc contains the value of the field addrnumber.
i need the query of field validation query which we write in create entry events in table maintenance generator and also if we give wrong value for addrnumber in sm30 maintain table, the input field need not to be grey out for next entry...
please help.Hi,
create method -
>before saving data.....write the logic between the method
go to utilities->table maintanance ,,,after creating generator ---go to envirnment->modification->events.
create event -.>.as zsave select event type 1(before saving data to table) write code in include....
consider data for field3 is 10 .
lv_new = ztbr(table name)-field3.
select field3 from ADRC(ZTABLE) into wa_new (TYPE ZTABLE) where field3 = lv_new.
if sy-subrc = 0.
working fine
else.
message i888(sabapdocu) with 'data invalid'.
endform.
This will help u...
Thank u.........
Maybe you are looking for
-
i want to update my phone, but i purchased many apps and music on the phone. it won't let me authorize my computer so i cannot update. i don't want to deauthorize all my computers. how can i find out which 5 computers i have authorized? also how can
-
User Exit / BAdI to update the External Patient ID.
Hello SAPients! I've been searching everywhere and I can't find a BAdI or User Exit to automatically update the External Patient Identification Number (NPAT-EXTNR). I've just found BAdIs to validate the correctness of the field but not a way to autom
-
Affichage des fichiers jpeg dans un site full Flash (question corrigée)
Bonjour, Dans un site full Flash qui représente une galerie photos avec des menus simples comment peut-on garantir que des fichiers jpeg ne soient déformées (+ grands en taille) par les navigateurs ? Comment peut-on garantir, quoiqu'il arrive, le re
-
Hello, I have a report that I'd like to enhance. It works fine currently, but I'd like to create a new field that is a concatination of two other fields. Here's the code that exists in my Region Source box of my Region Definition page. select R.RESOU
-
As part of my importing images procedure I have the freestanding dng converter (6.7.0.339) convert all my cr2 files to dng because, among other things, dng files are smaller than the cr2 files they derive from. Having downloaded and converted a batch