How can i validate a path
hi experts,
how can i validate a path... i tried to use cl_gui_frontend_services=>directory_exist
but it gives me an error
for a local path and an app server path??
thx in advance
Hi Carlos,
you follow the below coding, where you will get to separate validation
for presentation server & application server file path.
FORM present_validation .
DATA: lw_check TYPE c,
lw_file TYPE string.
IF po_psv IS INITIAL.
IF sy-ucomm = 'ONLI' OR sy-ucomm = space.
MESSAGE 'Please input the file name' TYPE lc_e.
ENDIF.
ELSE.
lw_file = po_psv.
lw_check = cl_gui_frontend_services=>file_exist( lw_file ).
IF lw_check IS INITIAL.
MESSAGE 'Please input the correct file path' TYPE lc_e.
ENDIF.
ENDIF.
ENDFORM. " PRESENT_VALIDATION
FORM application_validation .
DATA: lw_file TYPE string.
lw_file = po_asv.
IF po_asv IS INITIAL.
IF sy-ucomm = 'ONLI' OR sy-ucomm = space.
MESSAGE 'Please input the file name' TYPE lc_e.
ENDIF.
ELSE.
OPEN DATASET lw_file FOR INPUT IN TEXT MODE ENCODING DEFAULT.
IF sy-subrc NE 0.
MESSAGE 'Please input the correct file path' TYPE lc_e.
ENDIF.
ENDIF.
ENDFORM. " APPLICATION_VALIDATION
Hope this can solve your problems.
Regards,
Tutun
Similar Messages
-
How can I validate an X509Certificate ?
I'm not really sure of what makes a certain cetificate different from a certificate that I create in my comupter... I mean, how can I validate that a certain certificate belongs to the entity it says it belongs to?
Is my question clear enough?
I hope someone can help me with this...Hello,
You do not validate certificates per say, they are either valid or they are not.
Certificates contain a certificate chain/path leading back to a certification authority. Your computer/java has a list of trusted authorities. If the afore mentioned path does not lead back to one of them, authenticity (of software/documents) amongst other things can not be gauranteed. In this case, you would contact the publisher of the cert and verify it is them by comparing keys.
Yes you can create you own certificate and distribute it, but you will be the one to handle all requests to verify that the pub.key in the cert is actually yours.
I hope this has cleared it up... and is accurate for that matter (if anyone cares to point out).
Warm regards,
Darren -
Can any one suggest me how can I use relative path inside SSIS pacakge to access config file ?
Can any one suggest me how can I use relative path inside SSIS pacakge to access config file ? Please help me as its urgent.THanks for your help in advance.
Hi Jay,
SSIS can only recognize the absolute path of a XML Configuration file, the relative path is not supported. Furthermore, if the XML Configuration file is already generated, we can use the Environment variable package configuration type instead so that
SSIS runtime automatically looks for the configuration file from the path defined in the environment variable. This is convenient when we need to deploy a package to different environment. We only need to define the environment variable for package configurations
once on each server, and then the variable can be used by all the packages on this server.
Regards,
Mike Yin
TechNet Community Support -
How can I script moving paths from one file to another?
Hello. I have 1 image with various color correction layers. The other is the exact same size but only contains paths. How can I script moving paths from one file to another? Thanks, in advance, for any help you can offer. Thanks!
Thanks! This one actually worked for me. Thanks for your help.
http://forums.adobe.com/message/3305389#3305389 -
How can i set a path for my deployment files in weblogic server 10.3
Hi
How can i set the path for my WAR ,JAR files while deploying.i am using the wls10.3 version.
is there any scripts for this ,please provide me.
my Application is ADF 11g application.By "path", I assume you mean "classpath".
The simplest way is simply to include the jars you need inside the web application or web module's WEB-INF/lib directory, EJB module's META-INF/lib directory, or EAR lib directory.
If that's not practical, if you use NodeManager to start your servers, you can go to the "Server Start" tab in the server definition in the WebLogic console and edit the "Classpath" field, which defaults to no value. You can specify a classpath value there. Note that if you specify a value there, it REPLACES the default classpath for the server, it doesn't add to it. If you need to just add to it (a much more likely scenario), if the value references the value "$CLASSPATH" in it, that will reference the original classpath value that the server would have had.
So, for instance, if you wanted to include the MQ jars in the server classpath, you could set a value like this:
/usr/java/mq/lib/mq.jar:/usr/java/mq/lib/mqstuff.jar:$CLASSPATH -
How can i get the path to config folder placed inside the jar file?
Hi i have developed an RCP application using eclipse.
In my application config directory is there.
When i export my RCP application as JNLP Project the jar file is created which contains config folder inside it.
When i download the application using java web start , how can i get the path to config folder placed inside the jar file?
Will the config folder exists in local cache in my system?
Help needed.
-Deepak-- This works in CS6:
tell application "Adobe InDesign CS6"
set myDocument to active document
set selectedRectangles to selection of myDocument
set theGraphicsLink to file path of item link of (graphic 1 of (item 1 of selectedRectangles))
--> "Macintosh HD:folder/folder/filename.tif"
end tell -
How can i set class path in ubuntu JAVA_HOME ?
how can i set class path in ubuntu <JAVA_HOME>?
Note that on *nix
environment variable names are case sensitive.
Also, you are again being vague; is it [this it|http://java.sun.com/j2se/1.5.0/docs/tooldocs/solaris/javac.html] or [that it|http://java.sun.com/j2se/1.5.0/docs/tooldocs/solaris/java.html] -
How can I get the path of an existing file????
Hi.
I'm a newbie in Jsp development, so this question may appear trivial.
How can I get the path into a String of an exixting file ..like ...
String thepath = path_of("my file.txt");
Thanks for your help.Try
application.getRealPath("myFile.txt") -
How can I validate my warranty with a refurbished iphone?
On August 28th I visited Miami and I went to the Apple Store to replace my Iphone 4 broken out of warranty with a Refurbished Iphone.
The problem is that the refurbished Iphone replacement never worked! I tried to verify my coverage status but it is out of warranty. I know that there are 90 days of warranty. However, how can I validate this warranty because the IMEI is not accepted to chat or contact Apple Support? Somebody can help me?
Thank youSILsam wrote:
I've already checked it, however the device does not have coverage. It was a refurbished iphone 4 and theoretically it has 90 days of warranty.
According to your original post, your limited warranty is scheduled to expire on November 28th. That service replacement warranty was never intended to include live support via chat or phone conversations with an AppleCare advisor. -
How can I specify the path in Form Builder 9.0
Hi, everyone,
could anybody tell me how can I specify the path in Form Buidler 9.0? there is problems when I want to attach library in form builder. thanks to Kuldeep RAwat and Natalia Vidal, I know I should specify the path, but I still don't know how to specify, how can I do?
besides, when I run a form, sometime there will be a warnig:
Please acknowledge message
what's that meaning?
thank you very much for your great helpShay Shmeltzer thank you very much for your so quickly response. I have modified the file and my form can run now!
but, when I open my form, it always suggest me:
FRM-10102: Cannot attach PL/SQL library TalbotStandard. This library attachment will be lost if the module is saved.
so everytime I open my form, I must attach the library manully. I don't know the reason. do you know that or anybody else knows that? thank you very much!
have a good weekend :-) -
How can I validate a date field in Portal Forms
I have a date field in portal forms that I want to perform validation on to make sure it's in the proper format before being accepted (mm/dd/yyyy). How can I validate against that field?
Hi Ben,
I took the time to test and revise. This is code that will validate a date entry (format MM/DD/YYYY). Just paste this in the "Before the start of the form..." window of the Additional PL/SQL code section of the form. Then add validateDate(); into the onBlur event window of the field in question. Replace the CYCLE_END_DATE with the field name in question.
HTP.P('
<SCRIPT LANGUAGE=javascript>
function validateDate() {
var ddObj;
var mmObj;
var yyObj;
var day;
var mon;
var year;
var field_val;
var field_name;
for (var j=0; j < document.forms[0].elements.length; j++) {
field_name = document.forms[0].elements[j].name;
field_val = document.forms[0].elements[j].value;
if (field_name.substring(field_name.indexOf(''DEFAULT.'') + 8, field_name.lastIndexOf(''.01'')) == ''CYCLE_END_DATE'') {
var delimPos = field_val.search(/\//i);
if (delimPos < 0)
alert(''Invalid date entry! Please enter in MM/DD/YYYY format. '' +
''e.g, Dec 21, 2003 would be entered as 12/21/2003'');
else
if (field_val.length != 10)
alert(''Invalid date entry! Please Please enter in MM/DD/YYYY format. '' +
''e.g, Jan 1, 2003 would be entered as 01/01/2003'');
else {
month = field_val.substring(0, field_val.indexOf(''/''));
day = field_val.substring(field_val.indexOf(''/'') + 1, field_val.lastIndexOf(''/''));
year = field_val.substring(field_val.lastIndexOf(''/'') + 1, 10);
/* Need to subtract 1 from value because in Javascript, January begins with 0
and ends with 11 for December */
month = month - 1;
ddObj = new Date(year, month, day);
mmObj = new Date(year, month, day);
yyObj = new Date(year, month, day);
if (ddObj.getDate(ddObj.setDate(day)) != day)
alert(''Invalid day!'');
if (mmObj.getMonth(mmObj.setMonth(month)) != month)
alert(''Invalid month!'');
if (mmObj.getYear(mmObj.setYear(year)) != year)
alert(''Invalid year!'');
</SCRIPT>
'); -
How can i validate the field directline under personal information of ESS?
Hi all,
How can i validate the field directline under personal information--> communication data of ESS?The thing is we don't have NWDI setup in our organization.Is there any possibility of doing it under SPRO trn.
Thanks and Regards,
samHi,
This is probably a wrong forum that you have posted your question to.
Regards,
Siddhesh -
How can i validate(compare) two date type attribute in EO.
Hi All,
jdev version 11.1.2.1.0
i have created one EO where two date type attribute ToDate and FromDate now i want to add validation rule.
which validate that difference b/w ToDate and FromDate not more than 3 month.
How can i validate this?You can create script expression
Something like
if((toDate.getTime()-fromDate.getTime())/(1000 * 60 * 60 * 24)>30)
return true;
else
return false;-Arun
P.S : Above example calculates based on number of Days (30). If you want 3 months, you need to put a logic - Simply 90 days? What about the months with 31 days and 28/29 days? etc. -
How can i validate an untouched cell and change bground color if error
Hi ,
three questions
1. I can validate data in cells in setValueAt method but the cell data will be validated only if user click on that cell.
how can i validate another cell if user does not even touch it.
2. and if error how can i change background color.
3. i have JTextField for column as cell editor/renderer. To change the data user have to double click on cell. How can I make it to click once to edit the value in the cell.
Thanks in advance for help.how can i validate another cell if user does not even touch it.
Why would you want to validate a cell if a user doesn't change it?for example user clicked Add row, and i added a row in the table with blank information...so .all cells in the new row have blanks, so if user does not enter the data in the second column... which he did not touch...i want to catch it and produce error
How can I make it to click once to edit the value in the cell.
Something like this:
DefaultCellEditor dce = (DefaultCellEditor)table.getDefaultEditor(Object.class);
dce.setClickCountToStart(3);Thank you..
Read this section from the Swing tutorial on "How to Use Tables" for more information:
http://java.sun.com/docs/books/tutorial/uiswing/components/table.html -
How can i validate input number into a Field of type char in oracle form?
hi.....
can any one help me.....please...!!!?!!
How can i validate input number into a Field of type char in oracle form?i have tried doing that, but still the field except numbersthere was an error in that code. it should have been
var_num:=to_number(var_char);however, it appears that you want the entry NOT to be a number. if this is the case then try
begin
if to_number(:block.item) = 0 then null; end if;
message('The entry cannot be numeric');
raise form_trigger_failure
exception
when value_error then
/* this is where you put the code you want to be run when the
entry is non-numeric */
end;
Maybe you are looking for
-
Need Sample source code for Forum in jsp
Hi.. Please tell me the website which is having the sample source code for simple forum... I have to implement it into my project... kindly help me out... thanx in advance kumar
-
I have around 1TB to backup. I have a 2 TB backup drive. Time machine fills it in the first pass. It just makes no sense at all. Every hour, time machine mysteriously finds a few hundred more gigs to backup even though i have not used the computer. N
-
10.4.11 and HP F4280 Printer Failure
PLEASE HELP! I just had my Powermac 10.3.9 upgraded to a 10.4.11 and my HP F4280 printer won't print now as it used to. It shows that it's printing but nothing happens. It also displays that the documents "were" printed, even though they weren't. I t
-
Frequent WLan disconnections on Equium M40X-230
My laptop suffers frequent disconnections from the internet and it is getting very annoying. Situation is the laptop connects wirelessly to the net via a Belkin router. The router is working ok, and I use Aol for ISP. Our second laptop, also a Toshib
-
Hi, Can anyone help, I have some rows that I am trying to display as columns. The sample data is below: create table c( ID NUMBER, SCHEDULE_NO NUMBER, TERM_NO NUMBER, FREQUENCY VARCHAR2(20), RENTAL_AMOUNT NUMBER, RENTAL_OS NUMBER); INSERT INTO C VALU