F4 help popup to browse file path in web dynpro
I need F4 help popup to browse file path in Web dynpro (for example C:\dir\file.xls). Popup should come like FM "F4_FILENAME" in report programming.
Am i need to create another window or is there any other standard functionality there for this help.
Please give your view to achieve this.
Thanks
Gokul
Hello Arun & Abhi,
File upload UI element has showing File browse pop up. But i want to download file from an internal table to Excel. User need to give file path so that the directory selection needs to be done. And also the user will select the directory and type the file name (File so far not exist) for download.
If i add UI element 'File Download' I am getting a link and i cant browse directory and give file.
Give your suggesions.
Thanks
Gokul
Similar Messages
-
Dialog Widget with "Browse file path" button
I want to be able to browse to a file and register the resulting path, all from a dialog widget. How can I do this?
Is there a way of calling the standard windows file browser from a button, to then return the APath?
ThanksNo one an idea? Especially for the "Browse file" dialog?
-
Hello,
How could I start writing an applet for viewing files on my web server? I looked around the forum and on the net but couldn't find anything very helpful. Any resources or links are also much welcome.
Thanks,
LDThanks for your reply Andy,
All I want to do now is have something user friendly so that they could browse a tree folder and download some files on my web server. I don't really know if I should stick with Java or opt out and go try using JavaScript or other scripts - what's your view on this?
I wrote some code in Java that creates a folder tree, starting from the folder where the applet is placed. Then I would have a table showing all the files etc...In my IDE it works fine but on the server it either doesn't show anything or complains about security issues (I tried different methods).
(My web server is just a common commercial web server. When there's no index.html on a particular folder on the server and I locate it in my web browser, it does show a listing of all that is in there.)
Here's my code:
Thanks for your help,
LD
import java.applet.Applet;
import java.awt.BorderLayout;
import java.io.File;
import java.io.FileFilter;
import javax.swing.JOptionPane;
import javax.swing.JScrollPane;
import javax.swing.JTree;
import javax.swing.UIManager;
import javax.swing.tree.DefaultMutableTreeNode;
public class WebServerFileBrowser extends Applet
private JTree dirTree;
private JScrollPane treeSPane;
String root;
/** Initializes the applet WebServerFileBrowser */
public void init()
try {
java.awt.EventQueue.invokeAndWait(new Runnable()
public void run()
// Set applet's look and feel as the system's
try {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
} catch (Exception ex) {
ex.printStackTrace();
//End of settings
initComponents();
} catch (Exception ex) {
ex.printStackTrace();
private void populateDirTree()
// System.out.println(getCodeBase());
// root = "D:\\TestDir";
try {
// Getting the root directory which is the directory where the applet is located
File rootDir = new File (".");
root = rootDir.getCanonicalPath();
File topDir = new File(root); // The top/root directory
DefaultMutableTreeNode treeTop = new DefaultMutableTreeNode(new Folder(topDir)); // The top node of the directory tree
growDirTreeNodes(treeTop, topDir);
dirTree = new JTree(treeTop); // After the directory tree nodes are fully grown, add them into the directory tree
} catch (Exception ex) {
ex.printStackTrace();
JOptionPane.showMessageDialog(this, root);
// Implementing the concept of recurrence, the directory tree is grown top down
private void growDirTreeNodes(DefaultMutableTreeNode node, File dir)
File[] dirs = getDirList(dir);
for (int i = 0; i < dirs.length; i++) {
node.add(new DefaultMutableTreeNode(new Folder(dirs)));
growDirTreeNodes(((DefaultMutableTreeNode) node.getChildAt(i)), dirs[i]);
// This method is used to return an array of child directories that are in a parent directory
private File[] getDirList(File dir)
File[] dirs = dir.listFiles(new FileFilter()
public boolean accept(File file)
return file.isDirectory();
return dirs;
private void initComponents()
setLayout(new BorderLayout());
populateDirTree();
treeSPane = new JScrollPane(dirTree);
add(treeSPane);
* This sub class represents a folder which is equivalent to a directory
* Main reason for this class' existence is to override the toString() method
* so that when added into the dirTree, the nodes show the name of the folder
* and not the full path of that directory
class Folder
private String name;
private File dir;
public Folder(File dir)
this.dir = dir;
name = dir.getName();
public String getName()
return name;
public File getDir()
return dir;
public String toString()
return name; -
Help required with downloading files from inside WEB-INF folder
I am working on a web application and I have an upload script which uploads different files to a foler called 'uploads' . To stop users from accessing the folder content I have put it in the /WEB-INF/.
In my JSP file, I used to link to the uploaded files like this before for users to download them :
if(filesListIterator.hasNext()
files = (FilesBean)filesListIterator.next();
<tr><td><a target="_new" href="<%=files.getFileName()%>">"<%=files.getFileName()%></a></td></tr>
}I need to know how to alter the above link to make it access/download files from the /WEB-INF/uploads/ while still restricting direct access to the files.
Thanks
Message was edited by:
topiwalAnything under WEB-INF is not directly accessible via the browser/ client. You could try defining the JSP/ Servlet inside web.xml deployment descriptor and see if you can access the file from there.
I think a better way to accomplish this would be to keep the file outside WEB-INF , and use other techniques to protect the folder that contains the file - for example password-protection, or defining a .htaccess file and serving a 403 Forbidden error. -
File Upload in Web Dynpro ABAP not using File Upload UI element
Hi all ,
I have searching for a way to upload a file using the file open dialog ( or even by manually specifying the path/file name) without using the file upload UI Element in ABAP web Dynpro . The File Upload UI element works for smaller files however with large file sizes 64 MB , the system seems to be running of memory (SYSTEM_NO_ROLL) . This is due to a known fact that the UI element makes a duplicate copy of the whole copy while it does the upload.
I have been looking at the ACFUPDOWNLOAD as a way to solve this problem but cannot seem to figure out how it works , even the sample program provided by SAP does not work. I am working with a regular abap server and not kpro( knowledge mananagement provider) or portal .
Any help would be greatly appreciated.
thanks,
Ali.If you are on NetWeaver 7.01, you can try both the ACFUpDownload UI element or try creating your own FileUpload in Adobe Flex with Flash Islands. ACFUpDownload requires the KPRO by default (which is why the same application isn't working for you), but you can write your own handler class to act as the KPRO receiver. Here is an eLearning on the topic:
https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/109b9b52-bc00-2c10-8786-e4c5e96d7e04
and source code:
https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/70645070-bb00-2c10-f086-f126721acdb4
If you want an eLearning on the FlashIslands approach, you can find it here as well:
https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/50d42644-91ef-2b10-228c-9e0ae75b274e
and Source Code:
https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/f044b62c-90ef-2b10-64a6-9ec25294d133
However in both of these approaches you still have to be careful with how you handle large files. The problem is that they are processed often a single binary string. This makes the processing easy, but requires total amount of session memory at least as large as the file being uploaded. In NetWeaver 7.02 ABAP adds the concept of Streams and Locators to help with the partial processing of large files. This feature doesn't come until later this year, but if you are interested you can learn about it here:
https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/80f983df-213e-2c10-ba89-b5a12ef178e8 -
Hi all,
I need to upload file from user local computer into Web Dynpro context, but standard FileUpload component doesn't look very "attractive" to me. There are 3 main reasons:
1. when user don't use Browse functionality, but he/she types directly for example == "xxxx" (not valid absolute windows path) into input field of FU Component and then click Upload, application freeze - and loading that 'file' forever.....
2. don't know how to specify custom file types in showed FileChooser (predefined are AllFiles, Pictures, HTML)
3. Browse label is not internationalized, no possibility to change that text (and that button also looks "different" )
How can I eliminate these minuses, or is here alternative solution for file uploading file in WD? My customer environment is NW 2004.
Regards,
JurajDynpro UI elements has limitations. But we can use them the way we want within these limitations.
1. when user don't use Browse functionality, but he/she types directly for example == "xxxx" (not valid absolute windows path) into input field of FU Component and then click Upload, application freeze - and loading that 'file' forever.....
If there is a fixed place to hold the documents, we can prefix the path upto the filename.
2. don't know how to specify custom file types in showed FileChooser (predefined are AllFiles, Pictures, HTML)
we can get the MIME type from the resource. And further processing can be restricted.
3. Browse label is not internationalized, no possibility to change that text (and that button also looks "different" )
I Agree that we can't change "Browse", but still we can have the orientation, if your browser is Arabic, it got aligned at right hand side.
thread:
nikhil
Edited by: Nikhil ßos on Jul 3, 2008 1:07 PM -
Help needed with Network UI (JNET) in WEB DYNPRO for JAVA
Hi all,
We are using Network UI element in our Web Dynpro Java. All is ok, but we have a problem with 'PRINT_PREVIEW' button. If you do click on this button, another window is open with a page preview, but always is shown the first XML loaded, in other words, if you load a XML and change it, print preview don´t show this changes.
There are some information about Network UI in SDN but nothing about our problem.
Can somebody help me?, we need show refresh data in print preview page.
Thanks for all in advance.
Gabriel Garcia.Hi Ayyapparaj,
We are generating all XML (Type Repository, Data, etc...) and passing this new file to Network UI Datasource property.
Thanks for your response.
Gabriel Garcia. -
Display file content in Web Dynpro ABAP
Hello,
we would like to be able to display any file after having uploaded files using FileUpload ui element in a web dynpro abap application.
for microsoft word excel files, the OfficeControl ui element can be used and for pdf documents the InteractiveForm ui element can be used.
for other formats such as '.tif', '.jpg', '.txt'..... we did not find out how to be able to display the file contents
Does anybody know if and how this could be achieved?
Cheers
AnaChris,
You may be right. Also it requires some configuration in SAP KPro ( document class etc).
Please see SAP [Help |http://help.sap.com/printdocu/core/print46c/en/data/pdf/BCSRVBDS/BDS_STRUCTURE.pdf]on Business Document Services.
At page 64 of this document under topic 'Display Documents' 'Feature it says. "If it is not possible to display the document in place, an appropriate viewer that is available on the
PC is started and the document is displayed u201Cout placeu201C -
Why doesn't Search across files work in web dynpro perspective?
Hello,
I rely on the Files Tab of the Search popup a lot to search for occurence of text in files.
So far, I've been doing all J2EE development and the Search functionality works great in the J2EE perspective. What I do is select the Development Component (DC) in Package explorer view and then bring up the search box. On there I select File tab and the "selected resource" radio button. I leave the File Name patterns as "*" so it'll search all files.
However, when I try that in the Web Dynpro perspective it doesn't find any hits. I know I can do a search across the whole workspace but that'll return too many hits in other DCs.
Anyone have an idea how to do this in Web Dynpro perspective?I remember that I once opened an OSS message on this issue. What version has your IDE?
Armin -
"Add To Browser Favorites" for ABAP Web Dynpro
Hi All,
In the Portal Environment, the end user has an option to "Add To Browser Favorites". This will trigger the "Add a Favorite" window in the Internet Explorer and the user can save the favorite as needed. Do we have a similar cabapility in ABAP Web Dynpro if the Web Dynpro is not delivered through an SAP Portal?
Thanks in advance for your help.
JohnJohn Breen wrote:
Hi All,
>
> In the Portal Environment, the end user has an option to "Add To Browser Favorites". This will trigger the "Add a Favorite" window in the Internet Explorer and the user can save the favorite as needed. Do we have a similar cabapility in ABAP Web Dynpro if the Web Dynpro is not delivered through an SAP Portal?
>
> Thanks in advance for your help.
>
> John
No. There is no similiar option in the Web Dynpro framework, nor can you access JavaScript in order to interact with the web browser and supply this feature. Browser Favorites can be maintained by the NetWeaver Portal Framework or in the NetWeaver Business Client by the surrounding frame. In the case of the NWBC, it isn't actually browser favorites but a separate set of favorites merged with Easy Access Menu favorites. -
Browser Hangs iFbA in Web Dynpro Abap
Hi Support,
I'm developing an Abap Web Dynpro with Adobe Interactive Form inside.
I have setting these parameters: InteractiveForm.enabled = true, InteractiveForm.readonly = false.
Web Dynpro Page open correctly with iFbA but when I click one button in WD Page the event freeze Browser.
My system is ECC sp06, SAPKB70009 and SAPKA70009, but I can't patch the
system.
I implemented these Note:
1- Note 981638 - Dynamic forms are not supported in Web Dynpro ABAP
2- Note 1018060 - Adobe: Locale has invalid country/language combination
3- Note 999997 - Setting usage rights unnecessary with Adobe integration
Help meHi Enrico,
As per my understanding, you are able to view the interactiveform in your webdynpro and when you click on the button, it is getting hanged?
Have u created an event (onSubmit) in your webdynpro? set a break point in your submit event and see whether the request is reaching up to there or not?
And also.. set your form layout type as ZCL layout and activate it once.
Let me know if you still face the problem.
Regards,
Ravi.D -
How to run sql scripts using batch file for a web dynpro data dictionary
Hi,
I want to develop a sql script to be executed on the server alongwith the installation of a product to pre-populate web dynpro data dictionary tables required for the application.
I further require to make the scripts independent of the database name,so that it can be run at any client environment.
Your help will be appreciated and rewarded.See shoblock's answer
call sql script from unix
masterfile.sql:
@file1 &1
@file2 &2
@file3 &3
@file4 &4
then just call the master script:
sqlplus userid/password @masterfile <p1> <p2> <p3> <p4> -
Search help that populates two fields on a WEB dynpro page
Hi there,
I have created a search help based on a single table ( QPCD ) with two exporting parameters CODEGRUPPE and CODE. When the user selects a their desired entry i would like it to poulate the relevant two fields on the web dynpro screen. I know in a normal dialog screen you could get this to happen automatically, but when implementing it into a web dynpro from abap screen it only returns the first value into the field that the search help was called from. Anyone know how i could get both fields populated?
Thanks in advance
Regards
Martcheck http://help.sap.com/saphelp_nw04s/helpdata/en/5d/395e4254139041e10000000a1550b0/frameset.htm
It is not that hard.
Create a new webdynpro component and implement IWD_VALUE_HELP in this component.
go to the component controller of you new component and add a new attribute:
listener type ref to IF_WD_VALUE_HELP_LISTENER.
in the method set_value_help_listener add the line:
wd_this->listener = listener.
then you can create as much views and things you need for your search help.
To set a selected value just add a method to your component controller which takes the values as import parameters. if you only want to set the value for the attribute it was requested for:
wd_this->listener->F4_CONTEXT_ELEMENT->set_attribute(
name = wd_this->listener->F4_ATTRIBUTE_INFO-name
value = <value>
This is the save way
But you can also call
wd_this->listener->F4_CONTEXT_ELEMENT->set_attribute(
name = 'CODEGRUPPE'
value = <value_codegruppe>
wd_this->listener->F4_CONTEXT_ELEMENT->set_attribute(
name = 'CODE'
value = <value_code>
But keep in mind that if the structure of the element changes, this could lead to short dump if the name of the attribute changes or the attribute was deleted.
if you want to close the search help window call wd_this->listener->close( ).
Hope this helps.
Cheers,
Sascha -
Using 'A Variable' in "Help URL" instead of file path
Hi,
When we edit 'Title' Tab of analysis we get options such as:
1. Title
2. Logo
3. Subtitle
4. Started Time
5. Help URL
In "Help URL" we can refer a file from an exposed directory (bydefault it's analyticRes). Syntax for refering a file is as follows:
fmap: Filename OR
fmap: Custom Folder Name/Filename
But, I want to check if A Variable (eg: Repository) can be used instead for giving path of the file?
Regards,
JitendraNot Possible..why don't you use the subtitle box instead of help url?
-
KM Root folder path in Web Dynpro
Hi,
How can I get full path (inlcuding drive of the file system) of documents root folder, which is configured in KM.
If any body knows give me the details to get it.
Thanks
Bobby MHi Bobby
Here is the code for ur requirement
<i>
IWDClientUser wdClientUser = WDClientUser.getCurrentUser();
com.sap.security.api.IUser sapUser = wdClientUser.getSAPUser();
// create ep5 user from current user
IUser ep5User = WPUMFactory.getUserFactory().getEP5User(sapUser);
IResourceFactory factory = ResourceFactory.getInstance();
IResourceContext context = new ResourceContext(ep5User);
RID root_rid = RID.getRID("/documents");
ICollection root = (ICollection) factory.getResource(root_rid,context);
// Now read the file contents of say file1
FileInputStream in = new FileInputStream(file1);
Content content = new Content(in,"byte",in.available());
RID newRID = RID.getRID("/documents/" + filename_portal);
if(factory.getResource(newRID,context) == null){
IResource newResource = root.createResource (filename_portal,null,content);
// else file already exists</i>
(Please award the points )
Maybe you are looking for
-
Itunes crashes when syncing Ipad with mp4 movies in photo folder for keynotes
I'm trying to upload a small MP4 video onto my Ipad to use in Keynotes. I place the video in the photo folder and select sync, then tunes crashes. I had created the video in Corel Video Studio pro 3 and created MP4 file. Copied to the IPAD and had it
-
There are cells in the excel document that have formula's in them. The formulas are pulling data from other blank cells, so that is why they are blank in the formulated cells. So in Excel, they are just a dash. When I create the PDF, the document
-
Cannot view star rating when I edit smart playlists
Hi, I am just beginning to find my way around my new iPod Nano and iTunes on my laptop. Could someone give me some help with a playlist problem please? When I try to edit a smartplaylist the field that should display the star ratings has a black box
-
SQL Query (updateable report) CheckBox Update Problem
My process will update 1 or 2 rows, but fails on three or more rows. All the rows on the page can be processed, up to 2 at a time. The SQL Query Report can have 50 rows on a page. Only the check box and the hidden primary key column are returned by t
-
Find Item number based on Sales document and material in GTS system
Dear experts, I have a situation where in I created a Sales order in ECC system and transmitted the document to GTS for compliance check. Now, during my subsequent processing in ECC side, there is a situation where in I need to check if the document