‎2007 Apr 03 6:49 AM
Hi. Is there a way I can check the available directories in the application server? I cannot use AL11 since I am not authorize. Is there any other way to list the existing directories? Thanks.
‎2007 Apr 03 7:00 AM
Hi..
You just try to execute this function module it will give you list of directories present in Application server
<b> F4_DXFILENAME_TOPRECURSION </b>
And see this following Example to use this FM
DATA: c_fnh_mask TYPE dxfields-filemask VALUE '.',
search_dir TYPE dxfields-longpath VALUE '/sapglobal/users',
file_path LIKE dxfields-longpath.
report y_test.
CALL FUNCTION 'F4_DXFILENAME_TOPRECURSION'
EXPORTING
i_location_flag = 'A'
i_server = ' '
i_path = search_dir
filemask = c_fnh_mask
fileoperation = 'R'
IMPORTING
o_path = file_path
EXCEPTIONS
rfc_error = 1
OTHERS = 2.
IF sy-subrc EQ 0.
f_app = file_path.
ENDIF.
and
You can use t/code CG3Y to download a file from application server to presentation server and t/code CG3Z to upload a file to a application server from presentation server.
You can also use this FM GUI_DOWNLOAD or method CL_GUI_FRONTEND_SERVICES=>GUI_DOWNLOAD.
In the class CL_GUI_FRONTEND_SERVICES you can find others methods, for example:
FILE_GET_VERSION
FILE_OPEN_DIALOG
FILE_SAVE_DIALOG
GET_COMPUTER_NAME
GET_DESKTOP_DIRECTORY
Hope this will help.
If it helps reward with Points
Regards Rk
Message was edited by:
Rk Pasupuleti
‎2007 Apr 03 7:06 AM
‎2007 Apr 03 7:06 AM
Can you rum SM49, if yes, you can use operating system commands to list directories. You can also use function modules SXPG_COMMAND_EXECUTE to execute operating system commands
‎2007 Apr 03 7:07 AM
No Authorization object can stop an ABAPer or a Debugger!
Type in '/h' in the tcode field and make sy-subrc = 0 after the authorization check.
‎2007 Apr 03 7:10 AM
Hi,
Yes as per pasupulate solution we can get through that function module..
Hope this helps you, reply for queries, Shall post you the updates.
Regards.
Kumar. .
‎2007 Apr 03 7:29 AM
I cannot as well change value of any field during debugging that's why i need another way to list the directories. I try using SXPG_COMMAND_EXECUTE but I cannot determine what command name I can use from SM49. Can you please help? Thanks.
‎2007 Apr 03 7:58 AM
In SM49 you will see a list of commands. Now it depends on what Operating system your app. server is using. You can use the following command
LIST_DB2DUMP
as it is defined for both Windows and unix OS. for unix it uses 'ls' and for windows it uses 'dir'. for unix you can pass '/' as parameter to this command so it will list the contents of root.
So first try the commands in SM49, try to execute some and once you found the one you are looking for, you can use it in the function module SXPG_COMMAND_EXECUTE.