Application server directory and file browser
Is there existing in SAP a program that can display directories and files that enable me to delete, move, upload, overwrite etc files on a unix server? So it will have similar functionality as e.g. MS Windows Explorer, but an ABAP program. If you have for instance a custom created version, I'd appreciate if you'd share. Thank you and best regards, Adrian
Hi you can make use of fm's
F4_DXFILENAME_TOPRECURSION - display directories and files
ARCHIVFILE_SERVER_TO_SERVER - move files, copy files etc.
EPS_DELETE_FILE - delete file
EPS_OPEN_INPUT_FILE - open file for input
EPS_OPEN_OUTPUT_FILE - open file for output
If you give the same name of a file which is already residing in the server then it gets overwritten.
Hope you can build a program using this fm's.
Similar Messages
-
Read application server directory and file
Hi,
I'm using the FM "RZL_READ_DIR_LOCAL" to retrieve the application server directory and filename. The returned result contain all the directory name and filename. Is there any other FM can separate the result into directory and file??
Regards,
Kithi
Ya One more FM is there - Call Function Gui Upload.
It will read the file from the app server.
See this Example:-
Refer this:
http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3ca6358411d1829f0000e829fbfe/frameset.htm
ABAP code for uploading a TAB delimited file into an internal table. See code below for structures.
*& Report ZUPLOADTAB * &----
*& Example of Uploading tab delimited file *
REPORT zuploadtab .
PARAMETERS: p_infile LIKE rlgrap-filename
OBLIGATORY DEFAULT '/usr/sap/'..
DATA: ld_file LIKE rlgrap-filename.
*Internal tabe to store upload data
TYPES: BEGIN OF t_record,
name1 like pa0002-VORNA,
name2 like pa0002-name2,
age type i,
END OF t_record.
DATA: it_record TYPE STANDARD TABLE OF t_record INITIAL SIZE 0,
wa_record TYPE t_record.
*Text version of data table
TYPES: begin of t_uploadtxt,
name1(10) type c,
name2(15) type c,
age(5) type c,
end of t_uploadtxt.
DATA: wa_uploadtxt TYPE t_uploadtxt.
*String value to data in initially.
DATA: wa_string(255) type c.
constants: con_tab TYPE x VALUE '09'.
*If you have Unicode check active in program attributes then you will
*need to declare constants as follows:
*class cl_abap_char_utilities definition load.
*constants:
con_tab type c value cl_abap_char_utilities=>HORIZONTAL_TAB.
*START-OF-SELECTION
START-OF-SELECTION.
ld_file = p_infile.
OPEN DATASET ld_file FOR INPUT IN TEXT MODE ENCODING DEFAULT.
IF sy-subrc NE 0.
ELSE.
DO.
CLEAR: wa_string, wa_uploadtxt.
READ DATASET ld_file INTO wa_string.
IF sy-subrc NE 0.
EXIT.
ELSE.
SPLIT wa_string AT con_tab INTO wa_uploadtxt-name1
wa_uploadtxt-name2
wa_uploadtxt-age.
MOVE-CORRESPONDING wa_uploadtxt TO wa_upload.
APPEND wa_upload TO it_record.
ENDIF.
ENDDO.
CLOSE DATASET ld_file.
ENDIF.
*END-OF-SELECTION
END-OF-SELECTION.
*!! Text data is now contained within the internal table IT_RECORD
Display report data for illustration purposes
loop at it_record into wa_record.
write:/ sy-vline,
(10) wa_record-name1, sy-vline,
(10) wa_record-name2, sy-vline,
(10) wa_record-age, sy-vline.
endloop.
reward if help. -
Application Server Directory file attributes lists
Hi,
I'm searching for Funtion Module or Method to get Application Server Directory file lists with all attributes.
1) FM 'SUBST_GET_FILE_LIST' is not getting midifued date and time.
2) Method CL_GUI_FRONTEND_SERVICES-DIRECTORY_LIST_FILES is getting local directory files.
I'm looking for standard way to get all attributes whatever we are seeing in AL11 transaction like Name, Length, Creator and last changed date and time stamp-
...NandhaHi
The fm SUBST_GET_FILE_LIST is right but you need to convert the date and time by your self, u can use this routine:
PERFORM P6_TO_DATE_TIME_TZ(RSTR0400) USING FILE_LIST-MTIME
FILE_LIST-MOD_TIME
FILE_LIST-MOD_DATE.
Max -
Download all files from a specific application server directory to Local pc
Hi Experts,
I have a requirement of downloading all the files from an application server directory to a local pc.
I know how to download a single file from an application server at a time provided the file name is known.
But my requirement is to download all the files in that particulary directory, because I dont know how many files were created in that directory and what are their names.
Please kindly provide the solution.
Thanks,
Kalikonda.Nelson,
Here is the function module that I have used to get all the application server files.
appl_dir_name is the path of the directory i.e. '/outbound/PD1/Applnserverfiles/'
it_appl_srv_fls is the internal table where all the files gets stored in.
CALL FUNCTION 'EPS_GET_DIRECTORY_LISTING'
EXPORTING
dir_name = appl_dir_name
FILE_MASK = ' '
IMPORTING
DIR_NAME =
FILE_COUNTER =
ERROR_COUNTER =
TABLES
dir_list = it_appl_srv_fls
EXCEPTIONS
invalid_eps_subdir = 1
sapgparam_failed = 2
build_directory_failed = 3
no_authorization = 4
read_directory_failed = 5
too_many_read_errors = 6
empty_directory_list = 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.
hope this solves your problem.
Thanks,
kalikonda. -
How to know the first placed file in Application server directory
Hi All ,
i want to Know the First plased file in a application server directory . i have tried with
FM EPS_GET_FILE_ATTRIBUTES but it is giving the file size. Can anybody give some idea to get the file lastmodify property.
Thanks & Regards
Prithvi.Hi Prithvi!
Use the methods of class CL_GUI_FRONTEND_SERVICES (if your release is at least 620, sorry otherwise).
Method DIRECTORY_LIST_FILES will give you all files of a directory, then you can check with method FILE_GET_ATTRIBUTES for some date info.
But maybe you can agree about a timestamp in the filename - this has to be set by the sender, but is much easier and reliable, too.
Regards,
Christian -
File exist in application server directory
Hi there,
On my SAP server, i have a directory created specifically to store input files generated from other external systems.
From my ABAP program, i need to check if any file exist on that application server directory. If yes, then i will proceed to read the input file and process it.
If it's empty, then output message that file is not available.
Are there any FM to do this?you can use this code to do this...
Upload data from file
DATA: lv_filename TYPE string, "File name
lv_line TYPE string. "One line entry in a file
lv_filename = iv_file_name.
IF iv_location = gc_application.
IF iv_record_count IS SUPPLIED.
Open file
IF gv_file IS INITIAL.
OPEN DATASET lv_filename FOR INPUT IN TEXT MODE
ENCODING DEFAULT
IGNORING CONVERSION ERRORS.
IF sy-subrc <> 0.
RAISE file_open_error.
ENDIF.
gv_file = gc_check.
ENDIF.
Read data
DO iv_record_count TIMES.
READ DATASET lv_filename INTO lv_line.
IF sy-subrc <> 0.
Close file
CLOSE DATASET lv_filename.
IF sy-subrc NE 0.
RAISE file_close_error.
ENDIF.
CLEAR gv_file.
Exit from the loop
EXIT.
ENDIF.
IF iv_separator IS NOT INITIAL.
CALL FUNCTION 'Z_WM_SPLIT_DATA'
EXPORTING
iv_data = lv_line
iv_separator = iv_separator
CHANGING
ct_tab_data = ct_tab_data.
ELSE.
CHECK NOT lv_line IS INITIAL.
APPEND lv_line TO ct_tab_data .
ENDIF.
ENDDO.
ELSE.
Open file
OPEN DATASET lv_filename FOR INPUT IN TEXT MODE
ENCODING DEFAULT
IGNORING CONVERSION ERRORS.
IF sy-subrc <> 0.
RAISE file_open_error.
ENDIF.
Read data
DO.
READ DATASET lv_filename INTO lv_line.
IF sy-subrc <> 0.
EXIT.
ENDIF.
IF iv_separator IS NOT INITIAL.
CALL FUNCTION 'Z_WM_SPLIT_DATA'
EXPORTING
iv_data = lv_line
iv_separator = iv_separator
CHANGING
ct_tab_data = ct_tab_data.
ELSE.
CHECK NOT lv_line IS INITIAL.
APPEND lv_line TO ct_tab_data .
ENDIF.
ENDDO.
Close file
CLOSE DATASET lv_filename.
IF sy-subrc NE 0.
RAISE file_close_error.
ENDIF.
ENDIF. -
File from application server -Read and process and delete the file .
Hi All,
I writing a ZEE program which will read the file from application server(file will be in text delimat format) and moving the data to internal table and uploadind data base.The part which iam facing problem is -
> I hve read the file from application server like below ,
OPEN DATASET ld_file FOR INPUT IN TEXT MODE ENCODING DEFAULT.
IF sy-subrc NE 0.
EXIT.
ELSE.
DO.
CLEAR: wa_string, wa_uploadtxt.
READ DATASET ld_file INTO wa_string.
IF sy-subrc NE 0.
EXIT.
ELSE.
SPLIT wa_string AT con_tab INTO wa_uploadtxt-name1
wa_uploadtxt-name2
wa_uploadtxt-age.
Spliting part i having problem .i need to seperate each field which is seperate from tab delimite and pass it into respective fields of internal table .
Second if another file come to the appicaltion server , wether my first file will be there ? or should i need to delete the first file after redaing how should i proceed further ?.
Regards
SRIRAM...
THANKS In ADVANCEHI,
1.
OPEN DATASET ld_file FOR INPUT IN TEXT MODE ENCODING DEFAULT.
IF sy-subrc NE 0.
EXIT.
ELSE.
DO.
CLEAR: wa_string, wa_uploadtxt.
READ DATASET ld_file INTO wa_string.
IF sy-subrc NE 0.
EXIT.
ELSE.
SPLIT wa_string AT cl_abap_char_utilities=>horizontal_tab INTO wa_uploadtxt-name1
wa_uploadtxt-name2
wa_uploadtxt-age.
APPEND wa_uploadtxt TO itab.
ENDDO.
CLOSE DATASET ld_file.
ENDIF.
2. If the another file get's generated in the application server with same file name then the data in old file get's over written with the new data. You are not required to delete the file. -
Transfer file in application server to another file
Hello guys I have another major hurdle I am encountering for a little task I am doing.
I need to send a downloaded file within the SAP application server to another file automatically using ABAP via Background Processing(most preferable a directory in the <b>newtwork</b>).
What I need to do is, after saving a list from an abap report and saves in the application server (which I have already done), I need it to transport to a the web server. All done in background.
I really appreciate the help you guys have given to me thus far. Thank you guys and take care.Hi
U have to use unix command for same
i have seen some function module just check it out
SXPG_CALL_SYSTEM you can check the user's authorization for the specified command and run the command. The command runs on the host system on which the function module is executed. The function module is RFC capable. It can therefore be run on the host system at which a user happens to be active or on another designated host system at which an R/3 server is active.
<b>SXPG_COMMAND_CHECK</b> Check whether the user is authorized to execute the specified command on the target host system with the specified arguments.
<b>SXPG_COMMAND_DEFINITION_GET</b> Read the definition of a single external OS command from the R/3 System's database.
<b>
SXPG_COMMAND_EXECUTE</b> Check a user's authorization to use a command, as in SXPG_COMMAND_CHECK. If the authorization check is successful, then execute the command on the target host system.
<b>SXPG_COMMAND_LIST_GET</b> Select a list of external OS command definitions.
<b>RZL_READ_DIR_LOCAL</b> Read a directory on the Application Server
<b>SUBST_GET_FILE_LIST</b> Return table with file list for the given directory (pattern allowed)
regards
vinod -
How can I get Directory and Files from a Maped Networkdrive of the AppS
Hello,
we have the following Situation.
We have a Windows-Server (Server-A) in an Network with ActivDirectory and an Windows-Server (Server-B with an WebApplicationServer outside of these ActivDirectory as standalone.
On Server-B we mapped a Directory from Server-A (FileExplorer and then MapNetworkDrives) as Drive Q.
Now i tried to get the Directory of Q:\abcd but it doesn't work.
I tried the FM EPS_GET_DIRECTORY_LISTING and also RZL_READ_DIR, but both doesn't worked.
RZL_READ_DIR is doing a "CALL 'ALERTS' ..." and is comming back with sy-subrc = 1
EPS_GET_DIRECTORY_LISTING is doing a "CALL 'C_DIR_READ_FINISH'..." and comes back with "Wrong order of calls" in the Field file-errmsg. Next Call is "CALL 'C_DIR_READ_START'..." and this comes back with "opendir" in Field file-errmsg.
I tried the same with two Servers in the same ActivDirectory-Network. The Result was the same, i don't get the directory of the mapped drive. But now i get from the Call "CALL 'C_DIR_READ_START'..." the file-errmsg "opendir: Not a directory" and file-errno 20.
Is there any idea for solving my Problem?
I have to get this directory, read the files from the List and have to rename them after wriing the data to our databasefile.
I want to read them with OPEN DATASET, rename them by writing a new File (also OPEN DATASET) and after that i do an DELETE DATASET.
Thanks and Greetings Matthias
Edited by: Matthias Horstmann on Mar 25, 2009 4:12 PM
Filled in Scenario with 2 Servers in same AD-NetworkHalo Mattias,
i using this function get file file name and directory:
at selection-screen on value-request for p_file.
call function 'F4_FILENAME'
exporting
program_name = syst-cprog
dynpro_number = syst-dynnr
field_name = 'P_FILE'
importing
file_name = p_file.
Rgds,
Wilibrodus -
Starting/Stopping Application Server Forms and Reports
Hello,
Are there any scripts (like dbstart and dbshut for Oracle DB) for starting and stopping "Application Server Forms and Reports". If not, any special suggestions?
I must automatically start this application on Unix. I know that during starting some steps must be performedy by the root user (export DISPLAY env variable and issue the "xhost +" command) and later the oracle user must do some things( export ORACLE_HOME and DISPLAY and issue the "opmnctl startall" command). Does anybody have scripts like that?
Regards,
TimIf you're on 10.1.2, there is a script (requires an X Windows session). It's called runstartupconsole.sh, but you've got to update the install type to Portal in the ias.properties file if I remember right. It looks cool, but a shell script works better.
Here is a shell script that does some of those things. You still need to run xhost+ after running a display if you're using something that requires a DISPLAY to start. Someone may have a better one, but this one works.
We actually use one that starts all the different components individually except for Reports in rc scripts. That is the only thing we have that needs a Display set to start. So then xhost + is run & at the same time, the Unix sysadmin runs a script that start Reports from opmn.
I hope this is useful.
Cordially,
Steve
#!/bin/sh
# =======================
# Collect Global Variables
# =======================
# Collect server specific install location
export ORACLE_BASE=/u01/app/oracle
export MIDDLE_TIER_ORACLE_HOME=$ORACLE_BASE/product/ias/101202_EE/mt_maxportal_02
export INFRASTRUCTURE_ORACLE_HOME=$ORACLE_BASE/product/ias/101202_EE/if_maxportal_02
export SID=orcl
# Collect current PATH and LD_LIBRARY_PATH for reuse
export OLD_PATH=$PATH
export OLD_LD_LIBRARY_PATH=$LD_LIBRARY_PATH
# Unset variables that can cause problems starting or stopping
unset CLASSPATH
case "$1" in
start)
# =======================
# Start Infrastructure
# =======================
# Set environment to start infrastructure components
export ORACLE_SID=$SID
export ORACLE_HOME=$INFRASTRUCTURE_ORACLE_HOME
export LD_LIBRARY_PATH=$OLD_LD_LIBRARY_PATH:$ORACLE_HOME/lib
export PATH=$ORACLE_HOME/bin:$OLD_PATH
# Start Infrastructure Database Listener
echo -n "Starting Infrastructure Database Listener: "
$ORACLE_HOME/bin/lsnrctl start
echo "OK"
# Start Infrastructure Database
echo -n "Starting Infrastructure Database: "
$ORACLE_HOME/bin/dbstart
echo "OK"
# Start Infrastructure OPMN managed components
echo -n "Starting Infrastructure OPMN Managed Components: "
$ORACLE_HOME/opmn/bin/opmnctl startall
echo "OK"
# =======================
# Start Middle Tier
# =======================
# Change environment for middle tier
unset ORACLE_SID
export ORACLE_HOME=$MIDDLE_TIER_ORACLE_HOME
export LD_LIBRARY_PATH=$OLD_LD_LIBRARY_PATH:$ORACLE_HOME/lib
export PATH=$ORACLE_HOME/bin:$OLD_PATH
# Start Middle Tier OPMN managed components
echo -n "Starting Middle Tier OPMN Managed Components: "
$ORACLE_HOME/opmn/bin/opmnctl startall
echo "OK"
# Start Application Server Control
echo -n "Starting Application Server Control: "
$ORACLE_HOME/bin/emctl startifdown iasconsole
echo "OK"
stop)
# =======================
# Stop Middle Tier
# =======================
# Set environment for middle tier
unset ORACLE_SID
export ORACLE_HOME=$MIDDLE_TIER_ORACLE_HOME
export LD_LIBRARY_PATH=$OLD_LD_LIBRARY_PATH:$ORACLE_HOME/lib
export PATH=$ORACLE_HOME/bin:$OLD_PATH
# Stop Application Server Control
echo -n "Stopping Application Server Control: "
$ORACLE_HOME/bin/emctl stop iasconsole
echo "OK"
# Stop Middle Tier OPMN managed components
echo -n "Stopping Middle Tier OPMN managed components: "
$ORACLE_HOME/opmn/bin/opmnctl stopall
echo "OK"
# =======================
# Stop Infrastructure
# =======================
# Set environment to start infrastructure components
export ORACLE_SID=$SID
export ORACLE_HOME=$INFRASTRUCTURE_ORACLE_HOME
export LD_LIBRARY_PATH=$OLD_LD_LIBRARY_PATH:$ORACLE_HOME/lib
export PATH=$ORACLE_HOME/bin:$OLD_PATH
# Stop Infrastructure OPMN managed components
echo -n "Stopping Infrastructure OPMN managed components: "
$ORACLE_HOME/opmn/bin/opmnctl stopall
echo "OK"
# Stop Infrastructure Database
echo -n "Stopping Infrastructure Database: "
$ORACLE_HOME/bin/dbshut
echo "OK"
# Stop Infrastructure Database Listener
echo -n "Stopping Infrastrucutre Database Listener: "
$ORACLE_HOME/bin/lsnrctl stop
echo "OK"
reload|restart)
$0 stop
$0 start
echo "Usage: `basename $0` start|stop|restart|reload"
exit 1
esac
exit 0 -
Hi,
I am installing the Oracle Application server Forms and Report services 10.1.2.0.2 on Windows 2003 R2, but the problem is that setup is not running on this Windows 2003 R2 version.
Any idea about this why it is not running.
Regards,
IftikharYou asked this
How can i find what is the latest version that i can upgrade this install to
I told you where to find the last update, I checked that version yesterday, the last update is 10.1.2.3, my misstake was to put a 0 before the 3.
You can go to Patches & update>Quick Links to: Latest Patchsets, Mini Packs and Maintenance Packs>Oracle Fussion Middle Ware> Look for you OS versión and CPU> No clic just put pointer over the links and you will see the last one.
And finaly could look for the CPU of Jul and Apr that as requirement they ask for version 10.1.2.3 (as I say I checked yesterday)
Greetings. -
Installed Oracle Application Server 10g and Dev. Suite 10g to self practice
Hello,
I have Installed Oracle Application Server 10g and Developer Suite 10g on Windows XP 32.bit to practice Developer suite specially Forms and reports. Server has created the database by default.
My questions are:
1. Can i use default database for practice?
2. Which Configuration Assistants mainly i need to configure in this regard?
3. Do i need to install anything else?
I am newbie to Oracle trying to self learning.
Any help will b appreciated.
With regards,
MOHAMMED AJAZ.hi
open the following pdf it will help u too.
http://students.heinz.cmu.edu/docs/Oracle_10g_R2_Installation.pdf
Can i use default database for practice?
Did u install oracle database? if not then it will be better please install.
sarah -
Oracle application server 10g and fusion middleware 11
Hi
I am confused about architecture of application server 10g and oracle fusion middleware.
I have installed oracle application server 10g that includes infrastructure tier ( database repository,SSO,OID,DAS,OCA) and mid tier (OC4j,forms,reports,discover,portal,wireless). Here I have totally understood the architecture of 10g application server and Installation method and sequence.
But I could not understand oracle fusion middle ware architecture and components compared to 10g application server.
Now I want to install the oracle fusion middle ware same as 10g application server keep in mind.
can anybody give me high level view of oracle fusion middle ware and it's component? and also difference between 10g app server and fusion.
how can I achieve same thing that i implemented in 10g app server with fusion?
If somebody have architecture diagram of both 10g app server and fusion that will also help me.
Thanks,
VishalTake a look at Page 2-1 of the
Oracle Fusion Middleware
Upgrade guide for oracle portal, Forms and Reports and Discoverer
E10130-02
it will give you an idea -
Get Application Server Name and Version
Hello All,
Is it possible to get the Application Server Name and Version using Java?
To simplify my question, if I am running Weblogic, the jsp page should tell me that I am running Weblogic Version <number> or IBM WebSphere Version <number>.
ThanksI get an error when I put this line in my jsp page:
out.println(" Server Info: " +getServletContext().getServerInfo());
Is there something I am missing?
symbol : method getServletContext ()
location: class jsp_servlet._jsp._mu.__showmxversion
out.println(" Server Info: " +getServletContext().getServerInfo()); //[ /jsp/mu/showMXVersion.jsp; Line: 16] -
Display application server time and date on GUI screen.
Hi experts,
My client's requirenment is to display the application server time and date on the on GUI screen
pls give the step by step procedure.
Thanks in advance.
AbhishekHi,
For TIME purpose,
Fixed Length 6
Format u2018HHMMSSu2019
DATA times TYPE T.
times = sy-uzeit.
WRITE times.
For DATE purpose
Fixed Length 8
Include Representation u2018YYYYMMDDu2019
DATA today TYPE D.
today = sy-datum.
WRITE today.
today = u201819991231u2019.
WRITE today.
Regards,
Anki Reddy
Maybe you are looking for
-
Word 2003 - Acrobat menus disappear for some (not all) documents
I have a user who is having a very bizarre issue with Word 2003 and Acrobat 9 Pro Extended. When he opens some Word documents, the PDF menus disappear. They are immediately restored when he closes the document or creates a new document. We've trie
-
Ways to make up for lost time...
Since the release of 2.0 I find myself spending so much time backing up/syncing. "What used to take two minutes now takes all day..."-sh God forbid a I add an App from the iP itself and then sync that.... Anyway, since there are only so many hours in
-
Calendar syncing with Windows 7 64 bit
I can sync all applications with Windows 7 64 bit via Bluetooth except calendar/datebook. It synced one time but now gets hung up every time I try to resync. Can anyone help me? Post relates to: Treo 680 (Unlocked GSM)
-
Mail for Exchange and the dreaded 500 error!
Hi I've recently got myself a Nokia 5800 and have been trying to get Mail for Exchange working for the past week and a half. I've read and actioned almost every suggestion that I can find on the web but still no joy! The jist of the problem is as fol
-
Regular touch pannel such as LG T1710B
Hi Experts, I have a very easy question for you guys: I was wondering if it is possible to use "commercial oriented" touch screen such as LG T1710B (http://www.lg.com/za/monitors/lg-T1710B-monitor) for Labview SCADA purpose. The VI is Modbus related