How To Work With File Path in Forms
Hi
I have one button on form i use it to call microsoft word when i finsh work i want to save my word file then open save DIALOG box to save that file
i want to take that path from save dialog box to text item in my form
how can i do this ?
If you are using Forms version 9.x or newer, you can use WebUtil to open Word on the client machine, Save the Word file, then do whatever you'd like with the path where the file was saved. If you are using an older version in client/server mode and not web, you would do something similar ony you would use OLE from within the form to call Word.
In short, we cannot offer much information because you did not provide enough detail about what you are doing, how you are doing it and which product and platform versions you are using.
WebUtil is included in Forms 10.1.2, so there is no need to download it. In version 9, you would need to manually download and configure it from here:
http://www.oracle.com/technology/products/forms/htdocs/webutil/webutil.htm
Similar Messages
-
How to work with file system in linux within a JSF app?
I use this line in my backing bean to log some events:
FileHandler fhxml = new FileHandler("../webapps/MyWebApp/Log/MyWebAppLog.xml", append);
fhxml.setFormatter(new XMLFormatter());That works fine in windows but when I deploy it in my Tomcat 6 in linux It doesn't work. How can I work with file system in linux?You should never use relative paths to access the filesystem. The path would be relative to the current working directory which is not per se the same in all environments. To convert a relative web path to an absolute file system path, you need ServletContext#getRealPath(). Use this absolute file system path in the java.io stuff. In a JSF application on top of Servlet API you can get the underlying ServletContext by ExternalContext#getContext().
Alternatively, if the file is located in one of the default paths of the classpath or if its path is added to the classpath, you can also just use ExternalContext#getResource() or even #getResourceAsStream() using just the file name. -
How to work with files in folders on Application/Presentation Server
Hi,
I am working on interface program in which files are populated in folders in application/presentation server in the format 'ABCsy-datumsy-uzeit.txt'(e.g.ABC20051022161450.txt,ABC20051022161455.txt ) in directory c:\temp.
I want to sort all these files and read in sorted manner.
can anybody help me out in this.
waiting for reply.
thanks & regards,
NitinHi,
This logic will work for files on presentation server,
DATA: l_count TYPE i,
l_filename TYPE string,
t_files TYPE string OCCURS 0 WITH HEADER LINE,
BEGIN OF t_files_sorted OCCURS 0,
file_prefix(3),
file_date LIKE sy-datum,
file_time LIKE sy-uzeit,
file_extension(4),
END OF t_files_sorted,
t_text TYPE TABLE OF w3html.
CALL METHOD cl_gui_frontend_services=>directory_list_files
EXPORTING
directory = 'C:\Temp'
FILTER = '*.txt'
files_only = 'X'
DIRECTORIES_ONLY =
CHANGING
file_table = t_files[]
count = l_count
EXCEPTIONS
cntl_error = 1
directory_list_files_failed = 2
wrong_parameter = 3
error_no_gui = 4
OTHERS = 5.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
LOOP AT t_files.
t_files_sorted = t_files.
APPEND t_files_sorted.
ENDLOOP.
SORT t_files_sorted BY file_date file_time.
LOOP AT t_files_sorted.
CONCATENATE 'C:\Temp\' t_files_sorted INTO l_filename.
CALL METHOD cl_gui_frontend_services=>gui_upload
EXPORTING
filename = l_filename
FILETYPE = 'ASC'
HAS_FIELD_SEPARATOR = SPACE
HEADER_LENGTH = 0
IMPORTING
FILELENGTH =
HEADER =
changing
data_tab = t_text[]
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_READ_ERROR = 2
NO_BATCH = 3
GUI_REFUSE_FILETRANSFER = 4
INVALID_TYPE = 5
NO_AUTHORITY = 6
UNKNOWN_ERROR = 7
BAD_DATA_FORMAT = 8
HEADER_NOT_ALLOWED = 9
SEPARATOR_NOT_ALLOWED = 10
HEADER_TOO_LONG = 11
UNKNOWN_DP_ERROR = 12
ACCESS_DENIED = 13
DP_OUT_OF_MEMORY = 14
DISK_FULL = 15
DP_TIMEOUT = 16
others = 17.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*****Your processing here..
ENDLOOP.
Also, use the FM that MAX has if you have to work with files on application server by replacing code in the above logic at appropriate places, like replace
cl_gui_frontend_services=>directory_list_files
with the corresponding fm
and replace cl_gui_frontend_services=>gui_upload
with OPEN DATASET...
CLOSE DATASET...
logic.
Hope this helps..
Sri
Message was edited by: Srikanth Pinnamaneni -
How to work with files in alsb 3.0
My requirements are 1)Take the file from calling system (How to do this) 2) perform logic on it 3) create a new response file in target/clinet system.
My requirements are 1)Take the file from calling system (How to do this) 2) perform logic on it 3) create a new response file in target/clinet system.
-
I have a Seagate expansion drive with files from my former pc. How do I transfer these files to my new iMac?
Drag them to the desired locations.
(93394) -
File browse : How to keep the file path in the file browse field?
Hello,
I have
1) file browse field called P2_FILE_PATH.
2) a select list with submit : P2_REGION
If i upload some file d:\abc.gif , then select some region in the P2_REGION,
P2_FILE_PATH will become empty. But in the session, i can find the blob value. but not the "d:\abc.gif "
Using the following script I could capture the value of P2_FILE_PATH in a field
P2_TEST.
onload="javascript:document.getElementById(P2_FILE_PATH').value = document.getElementById('P2_TEST').value;"
P2_TEST contains d:\abc.gif .
How to retain the file path, though some other field is selected and submitted?
Thanks in advance.
Regards,
ArchanaHello Archana,
You can't do what you want because of some HTML security restrictions – nothing to do with APEX. As you found out, You can capture the value of this item. You can't set it. After submitting the page, the browser is the one to clear the item.
The only workaround is to work with AJAX and not submit the page until the end of the user input phase.
Regards,
Arie. -
How to use XSJS file path in Controller.js file
Hi Experts,
Regarding How to use XSJS file path in Controller.js file.
I have gone through the SAP HANA Extended Application Services (Thomas Jung http://scn.sap.com/community/developer-center/hana/blog/2012/11/29/sap-hana-extended-application-services article.)
Seems to be there is no information about the same. May be the article is targetted for Beginners and above. As I am a learner I am not able to do the same.
var aUrl = '../../logic/demo_main.xsjs? (highlighted)
Suppose my XSJS file is at http://ipaddress:8000/newtest/Func.XSJS.
Can I use like below
var aUrl = 'http://ipaddress:8000/newtest/Func.xsjs?
or
var aUrl = '../../newtest/Func.xsjs?
I tried with multiple options but not able to get the expected output.
Can you please provide more details on this?Dear Thomas,
I am a abap developer , recently we meet a problem on our webdynpro report performnace issue. As in the development, we use SALV_WD_TABLE to design a ALV. and verything work correctly in our DEV system.
But after when our QAS system, there are more records for the ALV, one of them has 21000 records. And in the layout, we have a column as checkbox.
If we click any one checkbox, then the layout will respond almost 1~2 minutes. With debug I found the most time cost in the standard program.
And with search I found that you have solution to solve it as 1,000,000 rows.
So is it possible to provide some idea or solution to us?
Many thanks for your help!
BR
Vincent Chen -
Hi,
I want to create a small program in Xcode which create a excel speedsheet with fiew sheet and put data into sheet using
VisualBasicforApplication.framework.
What can i do, so that i can create/write excel files in xcode on Mac OS X?
Please help me as soon as possible.
ThanksOriginally Posted by skoltogyan
How to work with database in the Teaming ?
I need create some web-forms and store it in the database on the server.
Any example - how i can do this with Teaming ?
Please, Help me.
Serg
Hi Serg,
Not sure what you are looking for and I'm also no dev...
Maybe this link will help : Episode X: Teaming Templates | Novell User Communities -
How to run batch file from oracle forms 9i
Hi everyone.
i have a data in csv file. i want to upload it to my database. i am using sql loader for it.
i have made a batch file which run the sql loader and transfer my data to database.
How to run batch file from oracle forms 9i.
when i press the button, nothing uploads in my database. (when i simply run the batch file it works).
here is my code
Begin
HOST('C:\temp\batchfile.bat');
message('done');
end;
Thanks in advance
regards
sajidthis is my log file, when i run manually.
SQL*Loader: Release 10.2.0.1.0 - Production on Thu Jul 1 23:27:53 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Control File: file_to_upload.ctl
There are 2 data files:
Data File: sk.csv
Bad File: sk.bad
Discard File: none specified
(Allow all discards)
Data File: sk1.csv
Bad File: sk1.bad
Discard File: none specified
(Allow all discards)
Number to load: ALL
Number to skip: 0
Errors allowed: 50
Bind array: 64 rows, maximum of 256000 bytes
Continuation: none specified
Path used: Conventional
Table KHAN, loaded from every logical record.
Insert option in effect for this table: APPEND
Column Name Position Len Term Encl Datatype
SR FIRST * , O(") CHARACTER
DATES NEXT * , O(") CHARACTER
AGENT NEXT * , O(") CHARACTER
COUNTRY NEXT * , O(") CHARACTER
TRANSACTIONS NEXT * , O(") CHARACTER
PKR NEXT * , O(") CHARACTER
USD NEXT * , O(") CHARACTER
BANK NEXT * , O(") CHARACTER
Table KHAN:
11088 Rows successfully loaded.
0 Rows not loaded due to data errors.
0 Rows not loaded because all WHEN clauses were failed.
0 Rows not loaded because all fields were null.
Space allocated for bind array: 132096 bytes(64 rows)
Read buffer bytes: 1048576
Total logical records skipped: 0
Total logical records read: 11088
Total logical records rejected: 0
Total logical records discarded: 0
Run began on Thu Jul 01 23:27:53 2010
Run ended on Thu Jul 01 23:27:54 2010
Elapsed time was: 00:00:00.63
CPU time was: 00:00:00.17 -
Managing spaces when working with files
Hi, how can I work with files on windows on paths thats have blank spaces like "Documents and Settings", I used getResource().getFile() and writting the path but it always fails!
The FileOutputStream always thorws the exception FIleNotFoundException.
I tried the path with blank spaces and tried with %20 but always is the same.Are you saying that OutputStream os = new FileOutputStream("C:/Documents
and
Settings/AAD/workspace/MobileServer/bin/Configuracion/
conexiones.omt");throws an exception? If so, what exception?Exactly it throws an Exception.
java.io.FileNotFoundException: C:\Documents and Settings\AAD\workspace\MobileServer\bin\server\Configuracion\conexiones.omt (El sistema no puede hallar la ruta especificada)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
at java.io.FileOutputStream.<init>(FileOutputStream.java:70)
at server.tcp.GestionTCP.guardar(GestionTCP.java:118)
at server.tcp.GestionTCP.mouseReleased(GestionTCP.java:89)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:273)
at java.awt.Component.processMouseEvent(Component.java:6038)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3260)
at java.awt.Component.processEvent(Component.java:5803)
at java.awt.Container.processEvent(Container.java:2058)
at java.awt.Component.dispatchEventImpl(Component.java:4410)
at java.awt.Container.dispatchEventImpl(Container.java:2116)
at java.awt.Component.dispatchEvent(Component.java:4240)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3986)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916)
at java.awt.Container.dispatchEventImpl(Container.java:2102)
at java.awt.Window.dispatchEventImpl(Window.java:2429)
at java.awt.Component.dispatchEvent(Component.java:4240)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:121) -
JSR 296 - How to work with arguments?
Hi Everyone,
I am developing an application by using a JSR 296 Swing Application Framework but I don�t make any idea about how I could manage a line-command arguments.
Should I try through Application.getInstance().getContext().getResourceMap() or something like that?
My intention is to get access to arguments within the method startup(). However, note that they are not directly available for use unless I create a array member and explicitly assign them to this new member (I suppose it must have a suitable way for doing this instead of I mentioned):
I am using Netbeans 6.0 beta 1 to create this application, under the option File < New Project < Java Desktop Application
See below a snippet. As you can see, I would like to get a value of the first argument passed by user from line command.
* Main method launching the application.
public static void main(String[] args) {
launch(MyApplication.class, args);
@Override protected void startup() {
// here I would like to access the arguments
String firstArg = ?
// show main frame
show(new MyApplicationView(this));
}Does anyone know how to make it possible?
~Fernando
Edited by: [email protected] on Oct 17, 2007 10:08 AM
Edited by: [email protected] on Oct 17, 2007 3:18 PMOriginally Posted by skoltogyan
How to work with database in the Teaming ?
I need create some web-forms and store it in the database on the server.
Any example - how i can do this with Teaming ?
Please, Help me.
Serg
Hi Serg,
Not sure what you are looking for and I'm also no dev...
Maybe this link will help : Episode X: Teaming Templates | Novell User Communities -
How to get the file path in adf application
hii all,
i have a txt file that i am using in my adf application,
i am passing this txt file through a File Reader, for which i have to mention the file path.
The file is in web-content and when i am hard coding the complete file path i.e C:/JDeveloper/myApp/ViewController/public_html/log.txt
the application is working fine when run on integrated weblogic server.
My requirement is to access this file without giving the static file path, as in case i have to use this application on any other machine..
for that how to mention the file path-
i tried using FacesContext to get the context path :-
FacesContext.getCurrentInstance().getExternalContext().getRequestContextPath();
which gives me
\myApp-ViewController-context-root
after appending public_html\log.txt
I am using the following path to access the file :-
\myApp-ViewController-context-root\public_html\log.txt
again i am getting the java.io.FileNotFoundException
Does anyone know how to use file from inside the web-content without giving the complete path..???
ThanksHi,
If you put your file under public_html folder, you can use this code to access the file:
For example file is : log.txt
FacesContext.getCurrentInstance().getExternalContext().getRealPath('/log.txt').toString().trim();
Thanks.
- LSR -
How to deal with file(for example .xml)? what format of dir should be?
I'd like to operate the file in disk, and want to use relative directory?
How to deal with file dir? what format of dir should be?Hi Kamlesh,
Thanks for your response.
Actually, In the "Process External Bank Statement" window, i see that there are few entries which is for the previous year and which has not been reconciled. I have never worked practically on BRS and hence, i am scared to make any changes in the clients database without being confident on what i am doing. I need to reconcile for one of their Bank a/c for the month of April '08. I have the copy of the statements for the month ending 31st Mar 08 and 30th Apr 08. The closing balances are as below:
31/03/08 - 2300000.00
30/04/08 - 3100000.00
Now my OB for Bank a/c for April '08 in SAP is 2300000.00 Dr.
When i go to External Bank Reconciliation - Selection Criteria Screen (Manual Reconciliation), here are the detail that i enter:
Last Balance: INR -7,000,000.00000 (Grayed out by the system)
Ending Balance: INR -3,100,000.00000 (Entered by me)
End Date: 30/04/08 (Entered by me)
"Reconciliation Bank Statement" Screen opens up and shows the below balances in the screen:
Cleared Book Balance: INR -7,000,000.00000
Statement Ending Balance: INR -3,100,000.00000
Difference: INR 3,800,000.00000
As per the Bank statement, i have found all the transactions listed out here for the month of Apr '08 but, i also found that the open transactions for the previous month from April '08 have been lying in "Process External Bank Statement" window.
Could you please help me solve my issue as to what needs to be done or could you also get me some links from where i can get few documents for processing External Bank Reconciliations?
That will be of a great help for me. I need steps as to what needs to be done first and then the next so that i can arrive at the correct closing balance for the month April '08.
Thanks in Advance....
Regards,
Kaushal -
I worked with files in LR that were originally on my C drive, then were moved to an external HD for storage. I now want to do some more work on those files (which have the same file name as on the C drive). I plugged the drive into my computer and it shows in LR under folders as the F drive and the little green light is on, but LR is showing only the first 6 files and not the remaining 200 or so. How do I expand the F folder to expose all files?
I worked with files in LR that were originally on my C drive, then were moved to an external HD for storage. I now want to do some more work on those files (which have the same file name as on the C drive). I plugged the drive into my computer and it shows in LR under folders as the F drive and the little green light is on, but LR is showing only the first 6 files and not the remaining 200 or so. How do I expand the F folder to expose all files?
-
How to give the file path in adf application
Hii all,
I want to use castor xml framework in adf application..
for which i have to un- marshaller the xml file..
by using following method-
Person person = (Person)
Unmarshaller.unmarshal(Person.class,
new FileReader("src/com/person.xml"));
if i use this method in a java class inside a main method directly it works fine,
but when i try to initiate the java class through a jspx page deployed on integrated server..
it gives the file not found exception..
how to define the file path so it can be properly used even when application is deployed on server.
Thanksduplicate {thread:id=2418158} ?
I guess the path you are using is wrong. It works on your mashiene as the src path is available. When you run the app on a server (jspx file) there is no src path as long as you don't include it in your WAR wich you should not do anyway.
If you need to access such data you can create a folder in your webroot folder and the the resources from there as /xml_folder_name or if the xml files shouldn't be visible from the outside put the folder under hte web-inf folder.
Timo
Edited by: Timo Hahn on 23.07.2012 16:20
Maybe you are looking for
-
Download file CS5 Win Standard
Can someone please help me with the download file for CS5 (standard). I bought a new laptop and this does not take CDs.
-
Difference in Trial balance A/c (WIP) & FBL3N
Hi All Account balance difference The Inventory WIP(GL Code xxxxx) value as per Trial balance and as per statement of a/c (fbl3n) is not tallying. The same gl shows different values in fbl3n,fs10n & trial balance statement fs10n balance and trial bal
-
Console errors and machine slowing down.
My machine is getting really slow, so I had a look in the console. I can not understand this but maybe some of you can. is here any indication as to why? this started since the update to 10.92. thanks. 01/03/2014 09:17:58.762 ReportCrash[28344]: Sa
-
HT4199 Has anyone else had issues connecting to wireless after upgrading to IOS 6?
I Upgraded to IOS 6 today on my iPhone and iPad and am now unable to connect to wireless. It keeps goin to a "page not found" on apple.com when I Gould either put a password in or be directed to the Internet. Help!?!? My laptop works on my router so
-
Editing Autofill List for Custom Metadata Fields
I have 13,000+ photographs cataloged in Aperture 2.1 In an effort to better manage these photographs, I have added custom metadata for my own use. The fields let me know whether I have printed for my portfolio, watermarked, added to my web site, stat