Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

application server directories

Former Member
0 Likes
916

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.

7 REPLIES 7
Read only

Former Member
0 Likes
778

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

Read only

Former Member
0 Likes
778

chk this

Read only

Rashid_Javed
Contributor
0 Likes
778

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

RJv
Read only

Former Member
0 Likes
778

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.

Read only

Former Member
0 Likes
778

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. .

Read only

Former Member
0 Likes
778

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.

Read only

0 Likes
778

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.

RJv