Directory listing of application server
Hi experts,
I need a FM which can read the directory and returns the file names in an internal table.
I tried to use these ones:
- EPS_GET_DIRECTORY_LISTING
- RZL_READ_DIR_LOCAL
, but the filename which should be returned is more than 40 characters and it cannot handled by these function moduls, because it truncates the filename.
Is there any function module which can read the directory and handles the filenames which are more than 40 characters?
check these links
http://wiki.sdn.sap.com/wiki/display/ABAP/Workingwithfiles
http://abaplovers.blogspot.com/2008/05/sap-abap-function-module-to-read-files.html
Thanks
Bala Duvvuri
Similar Messages
-
How Create Virtual Directory On Oracle Application Server 10g on RHEL 5
Dear Sir
i have deployed my application on OAS 10g on RHEL 5 ,,now since my application is calling some pro*c programs and then they generate some text based reports on fixed folder named
/treas/temp
now i simply have to open these text based reports on web browser
WEB.SHOW_DOCUMENT('/forms/pcreport/'||v_filename);
but for that i need to create virtual directory name : " /pcreport " without code
kindlly help as its working on my developer suit 10g i created a virtual directory in my application server by making following entry in "orion-web.xml" file
<virtual-directory virtual-path="/pcreport" real-path="/u/treas/temp" />
kindlly help(My paths shown, yours will be different)
In a text editor :
/u01/app/oracle/product/midtier/Apache/Apache/conf/httpd.conf
Add
Alias /pcreport/ "/u01/app/oracle/product/midtier/forms/pcreport/"
<Directory "/u01/app/oracle/product/midtier/forms/pcreport/">
Options Indexes
AllowOverride None
Order allow,deny
Allow from all
</Directory>
Create the pcreport directory.
Add a simple test page
vi /u01/app/oracle/product/midtier/forms/pcreport/test.html
<html>
<head>
<title>Simple test page </title>
<style type="text/css">
body {
margin-left: 20%;;
margin-right: 20%;
border: 1px dotted gray;
padding: 10px 10px 10px 10px;
</style>
</head>
<body>
<p>test!</p>
</body>
</html>
Test
http://yourserver.com:7777/pcreport/test.html
Best Regards
mseberg -
Directory browsing in Application Server
Hi Gurus,
I need Directory browsing facility for my application server . i.e facility to select any directory on my application server. Can any body help me.
Regards,
SrinivasHi Srinivas,
Try using function module F4_DXFILENAME_TOPRECURSION or /SAPDMC/LSM_F4_SERVER_FILE (this gives the help in tree structure)
A sample on how to use F4_DXFILENAME_TOPRECURSION
DATA
: O_PATH TYPE DXFIELDS-LONGPATH.
PARAMETERS
: P_FILE TYPE RLGRAP-FILENAME
START-OF-SELECTION.
WRITE : 'Selected file',
P_FILE.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
CALL FUNCTION 'F4_DXFILENAME_TOPRECURSION'
EXPORTING
I_LOCATION_FLAG = 'A'
I_SERVER = ' '
I_PATH = ' '
FILEOPERATION = 'R'
IMPORTING
O_PATH = O_PATH
EXCEPTIONS
RFC_ERROR = 1
ERROR_WITH_GUI = 2
OTHERS = 3.
P_FILE = O_PATH.
Regards'
Rajvansh
Edited by: Rajvansh Ravi on Jul 24, 2011 2:36 PM -
API for creating a directory in the application server
Hello,
Does anyone knows a way to create a directory in the application server? Something similar to
CL_GUI_FRONTEND_SERVICES but for managing files in the application server?
Thanks in advance
Diz IsMiActually, CL_GUI_FRONTEND_SERVICES=>Directory_Create works really good for me.
REPORT ZRICH_0001 .
data: path type string.
data: rc type sy-subrc.
path = '\172.52.72.651qfilesvr400S109XXXXusrsapTSTSYStest'.
CALL METHOD CL_GUI_FRONTEND_SERVICES=>DIRECTORY_CREATE
EXPORTING
DIRECTORY = path
CHANGING
RC = rc
EXCEPTIONS
DIRECTORY_CREATE_FAILED = 1
CNTL_ERROR = 2
ERROR_NO_GUI = 3
PATH_NOT_FOUND = 4
DIRECTORY_ACCESS_DENIED = 5
DIRECTORY_ALREADY_EXISTS = 6
UNKNOWN_ERROR = 7
others = 8
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Regards,
Rich Heilman -
Class to Get File List from Application Server
Hi all
I've to obtain the file list of a directory from application server, I can use a FM too but It's possible the lenght of file name is upper then 40 characters so I can't use FM EPS_GET_DIRECTORY_LISTING.
Thanks
Edited by: Aristoteles92 on Apr 20, 2010 3:27 PMTry using the function RZL_READ_DIR_LOCAL. Here is an example program using this function.
data: begin of itab occurs 0,
rec(1000) type c,
end of itab.
data: wa(1000) type c.
data: p_file type localfile.
data: ifile type table of salfldir with header line.
parameters: p_path type salfile-longname
default '/usr/sap/TST/DVEBMGS01/data/'.
call function 'RZL_READ_DIR_LOCAL'
exporting
name = p_path
tables
file_tbl = ifile
exceptions
argument_error = 1
not_found = 2
others = 3.
loop at ifile.
format hotspot on.
write:/ ifile-name.
hide ifile-name.
format hotspot off.
endloop.
at line-selection.
concatenate p_path ifile-name into p_file.
clear itab. refresh itab.
open dataset p_file for input in text mode.
if sy-subrc = 0.
do.
read dataset p_file into wa.
if sy-subrc <> 0.
exit.
endif.
itab-rec = wa.
append itab.
enddo.
endif.
close dataset p_file.
loop at itab.
write:/ itab.
endloop.
Regards,
Rich Heilman -
Create directory on SAP application server with blanks
Hi,
is it possible and if so how to create within ABAP a directory on a Linux based SAP application server that contains blanks.
We've tested with SXPG_COMMAND_EXECUTE but didn't succeeded.
A working code snippet would be great.
Thanks and kind regards
FlorianHi
Try with Tcodes SM49/SM69.
Thanks,
Sreeram -
Validate whether a file path or directory exists on application server
hi,
I need to validate if a directory or file path exist on application server. How do we do that?
thanks.DATA:
ltp_bom TYPE sychar01,
ltp_encoding TYPE sychar01,
ltp_codepage TYPE cpcodepage.
Processing --------------------------------------------------------- *
TRY.
CALL METHOD cl_abap_file_utilities=>check_utf8
EXPORTING
file_name = itp_filename
max_kb = -1
all_if_7bit_ascii = abap_true
IMPORTING
bom = ltp_bom
encoding = ltp_encoding.
CATCH cx_sy_file_open .
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4
RAISING file_open_error.
CATCH cx_sy_file_authority .
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4
RAISING file_authority_error.
CATCH cx_sy_file_io .
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4
RAISING file_io_error.
ENDTRY. -
Creating a directory & subdirectory on Application Server
I want to create a directory on Application Server which may contain many subdirectories where in i will upload my files from my ABAP Program.
I need to know if dynamic creation of a directory on Application Server is possible though ABAP.
I donot want to create it manually but dynamically depending on the type of file to be put in the directory.If you use the complete path, this actually works. I have tested it in my system. It may not work in background though. I'm on an AS400, so the path is a little different
call function 'GUI_CREATE_DIRECTORY'
exporting
dirname = '//<ip_address>/qfilesvr400/<host>/usr/sap/TST/SYS/Folder1'
exceptions
failed = 1
others = 2.
Regards,
Rich Heilman -
"Invalid Oracle Home directory" error in Application Server Connection
I have Jdeveloper 10g on Windows XP and want to create an Application Server Connection.
After specifying required i get Test failed (-2). Invalid Oracle Home directory whenever I go for testing it.
My Application Server in LinuxYou are in the wrong forum for that question.
-
Directory Listing Using Weblogic Server
Hi all,
I need to be able to browse few directories via web page using Weblogic as WebServer ( on Linux RedHat 5.0)
for example the directory to be browsed are:
/home/oracle/swift
/home/oracle/payables
Please let me know how I can achieve this !!
Thanks
KSmaybe it's a bit overkill to use the JCA File Adapter
http://docs.oracle.com/cd/E21764_01/integration.1111/e10231/adptr_file.htm#BABFGIEJ
which has a "directory listing" feature
but I think it's not very recommended to use directly the java.io.File class to perform this operation...
any other thoughts? -
Hello,
I'm having trouble after publishing to my WAS v6 environment. The report will begin, creating the appropriate jrc_tmp_######.rpt file in my temporary directory.
For small reports (10 objects or less), the temporary report disappears, I am queried for my login and any parameters, then the report opens. The temp file never comes back. All subsequent requests for the report from *any computer* return with an I/O Error and this later in the log file:
Caused by: java.util.zip.ZipException: ¤u2022'u2022-¦u2022@u0192-"-(tm)...¢¢u2030-u2022@"...£u02C6-
Any reports with > 10 objects (any combination of data fields, text, images, formulas) the temporary report disappears and only the same I/O error appears.
In my test env. on windows, using the Rational Application Developer v 7 WAS test server, the temporary report stays until the report times out...
Has anyone else on WAS 6 had similar problems? I've no idea how to proceed.
Thanks!
TereseWould you be able to do one test?
Early builds of the IBM Java JRE 1.3 and 1.4 had issues with the JIT compiler that caused strange IOExceptions.
Would you try, in the WebSphere admin console, turning off the JIT for the JRC application, to see if the problem goes away?
If so, I recommend upgrading to the latest IBM Java JRE build for your version of the Java SDK.
Ted Ueda -
Does Oracle Internet Directory come with Application Server 10g Release 3
I noticed Appserver 10g 10.1.3 does not have as many components as Appserver 10.1.2. It does not even come with Oracle Internet Directory. Do I need to install Appserver 10.1.2 first and then upgrade to Appserver 10.1.3?
Nope. Doesn't work that way. AS 10.1.3 is a different release...
Perhaps one way of seeing AS is as a family name for sets of application platform products or technology. The "core" of AS is OHS and OC4J + management, for many of the releases or product sets (i.e. not all of the AS family are or were based on OC4J). On top of that core, Oracle adds products depending on the release.
If you go from the Downloads menu -
You would see that (currently) 10.1.3.x or 10.1.3.1 ("for deployment" - See All) is e.g a SOA Suite release. It also has Service Registry, Data Integrator and WebCenter Suite.
AS 10.1.3.0.0 is a OC4J release, if I'm not mistaken, to include support for Java/JDK 5.
AS 10.1.4.0.1 is a Identity Management release.
If you are looking for other app server products such as Discoverer or Reports Services, the latest release that I know of is 10.1.2.0.2. If you have AS 10.1.2.0.x, you may upgrade the including products via a patch set to 10.1.2.2 or later. Portal and IM components in this release may be upgraded to 10.1.4.x.
Also note that AS patch sets might introduce some additional version number confusion.
Combining different releases into mid-tier and infrastructure services is possible, if you need to stay with the latest features (such as a setup with 10.1.2.x mid-tiers using 10.1.4 Identity management). See Upgrade and Installation guides for information and configuration rules.
http://www.oracle.com/technology/software/products/ias/htdocs/101310.html
http://www.oracle.com/technology/software/products/ias/htdocs/101401.html
http://www.oracle.com/technology/software/products/ias/htdocs/101202.html
Message was edited by:
orafad -
Creating a directory statically in the Application Server
Hi,
I need to create a directory in the application server statically (not through code), in which I later have to store and read files. Most forums talk about doing this through AL11 --> Configure.
While this does create an entry in the directory list in AL11, I doubt if the directory was actually created in the AS. Double clicking this directory name shows an error message in the status bar (Wrong order of calls <- CALL opendir: No such file or directory). So I believe the directory is not created at all.
How do I set up a directory which I can browse and see, and use for creating / reading files?
My AS is on AIX OS.
Thanks,
ZHi,
Yes, Could we not do it from SAP screens?
Go to Al11 and in that you can see a tab Configure.
There you can create the Directory and say Add button
and then Save .
and after that Using
Open Data set ds1 for Output.
will create the File if it is not there .
you can specify the path in which you can create the files.
check this thread as well:
Creating a directory & subdirectory on Application Server
Sachin
Edited by: Sachin Dhingra on Jan 22, 2009 11:02 AM -
Directory listing from my OS X 10.5.8 server into a text file
Does anyone know how I can get a directory listing from my server, which I can put into an Excel Spreadsheet?
ThanksDownload the free TextWrangler and drag the enclosing folder into it. Alternatively, open the AppleScript Editor in the /Applications/Utilities/ folder, paste the following in:
do shell script "ls -AR " & quoted form of POSIX path of ((choose folder) as alias) & " >> ~/Desktop/inventory.txt"
and run it as is.
(104088) -
New Directory in Application server Required for data upload
Hi,
I need to load data in SAP application server. i will use CG3X to load the data.
I need to create a new directory in the application server to load all my flat files. Does any one know how to create a directoty?
Please provide list of steps and transactions used for creating this.
ThnksGo to t-code FILE.
Click on Logical file path definition and hit the New Entries button
Enter your logical path name, say ZXXX
Go back to FILE
In the right window, click on the block on the left to highlight the line you just created.
Now double-click on Assignment of physical paths to logical path
Now click New Entries.
Select your syntax group (this is just your O/S)
Here you can enter your physical path.
Maybe you are looking for
-
I Just purchased a Used G3 B/W 300mhz Rev 2 off Ebay. The system came with a Zip and Cdrom drive and 6Gb Harddrive that was formatted with no OS installed. When i power the System on and attempt to open the cdrom tray it wont open, so i figured maybe
-
when i plug in my ipod into the right usb port it makes the connecting noise but nothing pops up and itunes does nothing. then when i look into the devices list it is under a category called unspecified and says that it needs troubleshooting. if i ru
-
Cannot eject ultrabay harddisk in "Safely Remove Hardware and Eject media"
Just installed my T430s with Win7 x64. But I have a problem with ejecting my ultrabay harddisk using "Safely Remove Hardware and Eject media" icon. I installed the lastest Intel Rapid storage driver (RST) ver. 12.8.10.1005 from Lenovo download. Ultra
-
Crash in oracle::occi::Statement::execute
Hello, Application essentially: Environment *environment = Environment::createEnvironment(Environment::DEFAULT); Connection *connection = environment->createConnection(...); Statement *statement = connection->createStatement( < as below>); stateme
-
ICloud setup on iphone 5 shows ancient email address, can't change it- help!
setting>iCloud is stuck in 'account not verified' alert mode with 'check Email' highlighted, but email address in 'account' is years old and non-existant now. It won't allow me to tap and change to current address. Why is the ancient email address ev