List subdirectories in a directory in AL11
Hi,
We can list all the files in a directory in AL11 using FM RZL_READ_DIR_LOCAL
in the result we get all the files and sub directories , so how can we identify whether it is a file or a sub directory
Is there any other FM which list the files and sub directories separately
Pls dont say TMP_GUI_DIRECTORY_LIST_FILES as this used for Presentation server
thanks
chandra
Hi ,
Could you please tell me how did you able to get the sub directories using the FM SUBST_GET_FILE_LIST for RSFILLST-TYPE = "directory" ,
I am using the same FM but not getting any return values .
lv_dirname = '\\XYXXXX\C$\D01_spool'.
lv_pattern = '*'.
REFRESH lt_rsfillst.
CALL FUNCTION 'SUBST_GET_FILE_LIST'
EXPORTING
dirname = lv_dirname
filenm = lv_filena
pattern = lv_pattern
TABLES
file_list = lt_rsfillst
EXCEPTIONS
access_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
* Implement suitable error handling here
ENDIF.
Please let me know if am doing something worng!!!
Thank you!!
Regards,
Srini
Similar Messages
-
How can I get file list for a given directory?
Hi,
How can I get file list for a given directory? Is there a function?
Thanks.Hi friend,
Try this sample report. It displays all files in a directory.
While executing give some directory name in input. ex: C:\
Mention file type in filter parameter. ex: *.DOC
REPORT ztests.
DATA : file_table LIKE TABLE OF sdokpath WITH HEADER LINE .
DATA : dir_table LIKE TABLE OF sdokpath WITH HEADER LINE .
PARAMETERS:p_dir(50) TYPE c.
CALL FUNCTION 'TMP_GUI_DIRECTORY_LIST_FILES'
EXPORTING
directory = p_dir
filter = '*.DOC'
TABLES
file_table = file_table
dir_table = dir_table
EXCEPTIONS
cntl_error = 1
OTHERS = 2.
LOOP AT file_table .
WRITE:/ file_table-pathname.
ENDLOOP.
Might be helpful...
Thanks.....
Edited by: Guest77 on Feb 11, 2009 5:30 AM -
Get the file list of a given directory
does anyone know how to get the file list of a given directory? I tried "list"/"filelist" but the class not found.
THanks!What made you assume that there exist classes called list or filelist etc.
Do you read API documentation etc ?
Anyways, here is a hint java.io.File.listFiles() -
List of Files in directory on AS
WEBUTIL.DIRECTORY_LIST gives me the list of files on the client. But I need List of Files in directory on App Server . My App server is on LINUX and client is Windows. So How can get through oracle forms a List of Files in directory on Application Server .
I will appreciate help ?I don't know if it helps you(if not excuse me)
look at
List of Files in directory on AS
Running HOST Commands
If you have a host command of the form:
HOST ('DEL c:\temp.txt')
This will work in both client/server and Web deployed environments, but in web
deployed environments the command runs on the middle tier.
in Linux ls -la > ..... -
How to find files and subdirectories in a directory
can anyone tell me how to find files and subdirectories in a directory .
Here's a code snippet,
http://javaalmanac.com/egs/java.io/TraverseTree.html -
How can I list subdirectories first
I'm trying to figure out a way of listing subdirectories first rather than having them alphabetized along with regular file names. I can accomplish this in Finder by sorting by Kind, but in my word processor (Neooffice) this option doesn't exist. Is there any way of affecting the sort order of applications from the OSX side?
OpenOffice (on which NeoOffice is based) lists folders first in dialogues. Of course, you will have to install X11, and you will lose the other benefits of the effort the NeoOffice team made to make the interface more Mac-like.
Then again, a "switcher" might actually prefer it - eg. it uses ctrl-key keyboard shortcuts, menus on every window, etc. On my system, it is faster than NeoOffice as well.
http://porting.openoffice.org/mac/download/index.html -
"Directory Listing Denied
This Virtual Directory does not allow contents to be listed."URL of that website?
-
I have a block non single record and each record must receive the file name of a directory.
Does anybody know how can i list files of a directory? Is there any object or package i've got to use?
Thanks for attemption.Is the directory a single directory that your db server has access to? if so you can use a bit of java (in the db), pl/sql and sql to list the files in the given directory in a temporary table, then you can query that table to show in your form.
Should be able to google a solution by searching on "oracle dirlist" or let me know and I can post what I used here.
--pat
PS. how does one get code snipits to format nice when posting here? -
How to populate a sharepoint 2010 from the active directory.
I want a list of all the computers in the active directory,
another one with all users.
I want also to populate a sharepoint 2010 list from the sharepoint user profiles.
Thanks
szWhile
the contacts list is usually filled out for contacts that are outside the company, there are times when you would use a contacts list to store internal and external resources. Wouldn’t it be nice if you didn’t have to re-type your internal contacts’
information that are already in the system? Now you can with a little InfoPath customization on the contacts list.
Here’s our plan:
Create the contacts list, and open in InfoPath
Create a data connection to the User Profile web service
Customize the form adding some text, a people picker and a button
Create InfoPath rules that will populate the contact fields from the user fields in the User Profile store
Let’s get going! Before we begin, make sure you have InfoPath 2010 installed locally on your computer. I also want to give credit Laura
Rogers and Darvish Shadravan’s book Using
Microsoft InfoPath 2010 with Microsoft SharePoint 2010 Step by Step. I know it looks like a lot of steps, but it’s easy once you get the hang of it.
So obviously we need a contacts list. If you don’t already have one, go to the SharePoint site where it will live, and create a contacts list.
From the list, click the List tab on the ribbon, then click Customize form:
So now we have our form open in InfoPath 2010. Let’s add our elements to the form.
Above all the fields, let’s add some text instructing users what to do with the the field we’re about to add (.e.g To enter an existing user’s information, choose the user below).
Insert a people picker control by clicking the Person/Group Picker control in the Controls section of the ribbon. This will add a column to the contacts list called group.
Below the people picker, insert a button control from the same section of the ribbon as above. With the button still highlighted, click the Control Tools|Properties tab on the ribbon.
Then in the Label box, change the text to something more appropriate to our task (e.g. Click here to load user data!).
You can drag the button control a little larger to account for the text.
We should end up with something like this:
Before we can populate the fields with user data, we need to create a connection to the User Profile Service.
Add a data connection to the User Profile Service
Click the Data tab on the ribbon, and click the option From Web Service, and From SOAP Web Service.
For the location, enter the URL of your SharePoint site in the following format – http://<site url>/_vti_bin/UserProfileService.asmx?WSDL. Click Next.
Note - for the URL, it can be any SharePoint site URL, not just to the site where your list is.
For the operation, choose GetUserProfileByName. Click Next.
Click Next on the next two screens.
On the final screen, uncheck the box for “Automatically retrieve data when form is opened”. This is because we are going to retrieve the data when the button is clicked, also for performance reasons.
Now we need to wire up the actions on our button to populate the fields with the information for the user in the people picker control.
Tell the form to read the user from the people picker control
Click the Home tab on the ribbon.
Click the button control we created, and under the Rules section of the ribbon, click Manage Rules. Notice the pane appear on the far right.
In the Rules pane, click New –> Action. Change the name to something like “Query and load user data”.
Leave the condition to default (none – rule runs when button is clicked).
Click the Add button next to “Run these actions:”, and choose “Set a field’s value”.
For Field, click the button on the right to load the select a field dialog. Click the Show advanced view on the bottom. At the top, click the drop down and choose the GetUserProfileByName
(Secondary) option. Expand myFields and queryFields to the last option and highlightAccountName. Click ok.
For Value, click the formula icon. On the formula screen, click the Insert Field or Group button. Again click the show advanced view link, but this time leave the data
connection as Main. Expand dataFields, then mySharePointListItem_RW. At the bottom you should see a folder called group (the people picker control we just added to the form). Expand this, then pc:Person,
and highlightAccountId. Click Ok twice to get back to the Rules pane.
If we didn’t do this and just queried the user profile service, it would load the data of the currently logged in user. So we need to tell the form what user to load the data for. We take the AccountID field from the people
picker control and inject into the AccountName query field of the User Profile Service data connection.
Load the user profile service information for the chosen user
Click the Add button next to “Run these actions:”, and choose Query for data.
In the popup, for Data connection, click the one we created earlier – GetUserProfileByName and clickOk.
We’re closing in on our goal. Let’s see our progress. We should see something like this:
Now that we have the user’s data read into the form, we can populate the fields in the contact form. The number of steps to complete will depend on how many fields you want to populate. We need to add an action step for
each field. I’ll show you one example and then you will just repeat the steps for the other fields. Let’s update the Job Title field.
Populate the contact form fields with existing user’s data
Click the Add button next to “Run these actions:”, and choose “Set a field’s value”.
For Field, click the button on the right to load the select a field dialog. Highlight the field Job Title.
For Value, click the formula icon. On the formula screen, click the Insert Field or Group button. Click the Show advanced view on the bottom. At the top, click the
drop down and choose theGetUserProfileByName (Secondary) option. Expand the fields all the way down until you see the Value field. Highlight it but don’t click ok, but click the Filter
Data button, then Add.
For the first dropdown that says Value, choose Select a field or group. The value field will be highlighted, but click the field Name field
under PropertyData. Click Ok.
In the blank field after “is equal to”, click in the box and choose Type text. Then type the text Title.
Click ok until you get back to the Manage Rules pane. The last previous screen will look like this.
We’re going to update common fields that are in the user’s profile, and likely from Active Directory. You can update fields like first and last name, company, mobile and work phone number, etc. For the other fields, the
steps are the same except the Field you choose to update from the form, and the very last step where you enter the text will change. Here’s what the rules look like when we’re done:
We’re all done, good work! You can preview the form and try it now. Click Ctrl+Shift+B to preview the form. Once you’re satisfied, you can publish the form back to the library. Click File –> Quick
Publish. Once it’s done, you will get confirmation:
Now open your form in SharePoint. From the contact list, click Add new item. Type in a name, and click the button and watch the magic happen! -
Get file list from URL/web directory
Hey guys,
I have created a script for After Effects that can download multiple images from URLs that are given in an array. Now ideally what I want, is to get all the filenames of the files in a certain browsable web directory to be put in an array.
Unfortunately, I can't seem to figure out how to do this. Does someone have the knowledge here to help me out?
Thanks in advance,
JorgeThis is more difficult to do than it seems. Since the files are on a remote web server, you need to find some way to get the server to divulge its local file structure, which is not something most servers will do. The absolute best way is to have control over the web server and run some server-side code (PHP, node.js, whatever) to generate the file list on the server side and then fetch it with your client/extension/script. Other than that it's almost impossible to get a 3rd party server to divulge its file structure as far as I know, mainly for security reasons. So the #1 question is: do you have control over the server/website that you're trying to fetch from or not?
-
Get_file_list to list content of UNIX directory
Hi all
I am trying to list the files in a UNIX directory using the get_file_list action. Not getting anything back, but action is not reporting error.
In the folder configuration box i have used all combinations of \ and / but none do anything. I can list files on our Mii server using
server\share but this is a windows machine.
I think i have a couple of options
1. get FTP set up on UNIX server and use the FTP_get_file_list action and move files to Mii server for processing.
2. get something like SAMBA set up on UNIX to allow windows style file sharing.
Any other ideas out there?Hi Les,
Set the "Get_File_List_0" with the following parameters:
Folder: "web://PROJECT"
Mask: "*" for list all files
http://wbhelp.sap.com/manufacturing/xmii_120/en/44/7108DF9EA03ABEE10000000A155369/content.htm (for more details)
Or use a XMLQuery
server://XMII/Catalog?Mode=ListFolders&Folder=[Param.1]&Content-type=text/xml
[Param.1] = PROJECT
Hope this help.
Danilo Santos -
How to List files in a directory into an Array
Does anyone know of the best way to load all of the files in a specified directory into an array. (not going into sub directories either).
I was to be able to do something like this.... (pseudo)
String directory = "C:\";
String [] theList;
do
get next file name;
add to theList;
}while(!End of Directory)
Done.public static void main(String args[]) {
String directory = "C:\\";
File dir = new File(directory);
File [] theList = dir.listFiles();
for(File file : theList)
if(!file.isDirectory() && !file.isFile())
System.out.println(file.getName());
}This will list every item in the coot of C:\ that is not a file or a directory. Change the if statement to fit your needs.
~Tim -
Failing to list files in remote directory using FTP
Since I've been using a proxy with FTP transport for pull files from a remote server during several months. Now it started to work just sometimes
####<Apr 11, 2011 1:33:50 PM BRT> <Error> <WliSbTransports> <WN7-6J6VJN1> <AdminServer> <pool-9-thread-1> <weblogic> <> <f2be7f1e2af484b9:-47b5d228:12f456185e7:-7ff1-000000000000002c> <1302539630973> <BEA-381602> <Error encountered while polling the resource for the service endpoint ProxyService$Infolease$1_0$ProxyServices$Contract$SendBookingConfirmationPS: com.bea.wli.sb.transports.TransportException: <user:davi_diogo>Unable to list files for directory:.
com.bea.wli.sb.transports.TransportException: <user:davi_diogo>Unable to list files for directory:.
at com.bea.wli.sb.transports.ftp.connector.FTPWorkPartitioningAgent.execute(FTPWorkPartitioningAgent.java:218)
at com.bea.wli.sb.transports.poller.TransportTimerListener.run(TransportTimerListener.java:75)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:442)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:139)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:207)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:909)
at java.lang.Thread.run(Thread.java:619)
I configured the service account with my own username, and I do make sure that I have the rights over my home\user directory. (I tested with WINSCP and putty).
I haven't done any modification to make this start happening.
following my proxy configuration:
protocol: ftp
URI: ftp://myhost/
mask: *.XML
but no success.
I said "sometimes" above because it works after ~15 tentatives. Perhaps this could be a issue in my remote server OS.
Has anyone faced this issue before?
Thanks in advance,
DavinodPlease refer -
Error encountered while polling the resource for the service endpoint
Regards,
Anuj -
I need to access a list of files in a directory. The files are .js scripts that I want to dynamically insert into a page with JSP. The problem is that at my company these .js scripts will often be added/removed and it would simplify the process to just look at what's in the directory and pick out the appropriate .js that are available.
My directory structure is arranged something like this:
./src/jsp for the jsp pages
and
./conf/somescripts for the .js scripts.
I tried accessing it with getClass().getResource() to get the URL, and I also tried File(relativePathToSomescripts) but without much success - tends to get nulls in return. I'm not too experienced with JSP, but I'm guessing the relative paths change once Tomcat compiles them. So what would be a reliable way to access the list of files in the script directory?The File constructor only accepts absolute URI's. You can get the absolute URI for the relative URI using ServletContext#getRealPath().
String absolutePath = servletContext.getRealPath(relativePath); -
Create folder and move files to specific directory in AL11
My requirement is to create a new folder in one of the existing directories in AL11 and move some files into it.
I searched the forum and found this solution but it creates folder only in DIR_HOME directory.
data: unixcom like rlgrap-filename.
data: begin of tabl occurs 500,
line(400),
end of tabl.
unixcom = 'mkdir mydir'. "command to create dir
"to execute the unix command
call 'SYSTEM' id 'COMMAND' field unixcom
id 'TAB' field tabl[].
I want the folder to be created in some other directory DIR_INTERFACES .
Any suggestions are welcome ..Get complete path (physical path) using FM FILE_GET_NAME_USING_PATH.
Default directory is DIR_HOME, hence it creates file in that directory...If you specify complete folder name, it will be created under that path..
Concatenate mkdir
space
<physical path>
mydir
into unixcom.
Maybe you are looking for
-
General questions about graphics(resolution, colors, Images)
1. Is it possible in java to change the screen resolution with some method? 2. Is it possible to change color mode(16bit, 32bit) with some method in java, and if so is there a point in doing so? 3. If you make an application with a "background" with
-
Hello ABAPers, I am looking for some technical information relating to workflows in DP Approval route.It is looking interesting as I am Functional consultant and looking for inputs from Technical team.I thought of sharing this interesting this error
-
Help No JTS Transaction on create
Hi, Can anyone help me identify what I have overlooked? I am using oc4j 9.0.3 with toplink 9.0.4 on this one; I have an entity bean extending BMPEntityBase, whenever I call create, a ValidationException gets thrown stating that a create or remove req
-
Problems with JSR 168 Portlets
Hi!, I�m working with JSR 168 Portlets and after successfully deploying it into the portal (6.2) I�m not able to get any content. I�ve already made a war (I couldn�t make the studio 5u1, (PB 2) simulate it :( ), and it seems to be correctly deployed
-
Hi, I've got query with condition WHERE TRUNC (data_operac) >= to_date(:1, 'YYYY-MM-DD') there is index b-tree on data_operac but cant be used (because of trunc) . Is there any way I can rewrite that condition to make index usage possible ? Regards.