Application Development 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: 

Viewing files on application server

Former Member
0 Kudos

Hi,

Does anyone knows any path or transaction thorough which I can view all the files on application server ?

Thanks.

Regards,

Tushar.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi

<b>Use TCODE AL11.</b>

Reward and close the thread.

Vasanth

5 REPLIES 5

Former Member
0 Kudos

Hi

<b>Use TCODE AL11.</b>

Reward and close the thread.

Vasanth

0 Kudos

hi,

Check T-code <b>AL11</b>

Former Member
0 Kudos

Hi

Try this

DATA FNAME(60).

FNAME = '/tmp/myfile'.

OPEN DATASET 'myfile'.

OPEN DATASET FNAME.

This example works as long as your R/3 System is running under UNIX. The program opens the file "myfile" in the directory in which the R/3 System is running, and also opens the file "myfile" in directory "/tmp". However, you would have to change the filename for other operating systems. For example, for OpenVMS, you could write the following:

FNAME = '[TMP]myfile.BIN'

OPEN DATASET 'myfile.BIN'.

When you access sequential files on the application server using the following statements

OPEN DATASET

TRANSFER

DELETE DATASET

the system automatically checks against table SPTH. This table regulates general read and write access from ABAP to files, and whether files should be included in security procedures.

In table SPTH, you can prevent read or write access to generically-specified files, independently of the R/3 authorization concept. For all other files (that is, those for which read and write access is allowed according to table SPTH), you can use the R/3 authorization concept to check authorizations. To enable you to do this, you can specify authorization groups in table SPTH for program-independent user authorization checks.

SPTH contains the following columns for this purpose:

PATH

This column contains generic filenames. This means that the files on the application server to which an entry in this column applies, retain the attributes specified in the remaining columns of the line.

Suppose SPTH contains the following three entries in the column PATH:

*

/tmp

/tmp/myfile

The entries are then valid as follows:

– First line: All files on the application server apart from the path ‘/tmp’

– Second line: All files on the application server in the path ‘/tmp’ apart from the file ‘/tmp/myfile’

– Third line: The application server file ‘/tmp/myfile’

SAVEFLAG

This column is a flag that you set using ‘X’.

If the flag is set, the files specified in the PATH column are included in security procedures.

FS_NOREAD

This column is a flag that you set using ‘X’.

If the flag is set, the files specified in the PATH column may not be accessed at all from ABAP. This flag overrides all user authorizations. If you set FS_NOREAD, FS_NOWRITE is also automatically set.

If the flag is not set, it is possible to access the files from ABAP if the authorization checks are successful (see also the FSBRGRU column and Authorization Check for Particular Programs and Files).

FS_NOWRITE

This column is a flag that you set using ‘X’.

If the flag is set, the files specified in the PATH column may not be accessed for changing from ABAP. This flag overrides all user authorizations.

If the flag is not set, it is possible to change the files from ABAP if the authorization checks are successful (see also the FSBRGRU column and Authorization Check for Particular Programs and Files).

FSBRGRU

This column contains the names of authorization groups.

An authorization group corresponds to the first field (RS_BRGRU) of the authorization object S_PATH. You can use the second field of the authorization object S_PATH (ACTVT) to check whether the user has authorization to read (value 3) or change (value 2) the files in he authorization group.

Entries in FSBRGRU specify groups of files on the application server. You can control the access to files by assigning authorizations for the authorization object S_PATH.

Unlike authorization checks using the authorization object S_DATASET (see Authorization Checks for Particular Programs and Files), the authorization check against the authorization object S_PATH is independent of the ABAP program used to access the files. Furthermore, the check is not restricted to individual files. Instead, it extends to all of the generically-specified files in the PATH column.

If there is no entry in the column FSBRGRU, the files in the column PATH are not assigned to an authorization group, and there is no authorization check against the authorization object S_PATH.

If the automatic check for a file access fails, a runtime error occurs.

Suppose the table SPTH contains the following entries:

PATH

SAVEFLAG

FS_NOREAD

FS_NOWRITE

FSBRGRU

*

X

X

/tmp

/tmp/files

X

FILE

With these settings, ABAP programs cannot access any files on the application server apart from those in the path ‘(/tmp’).

All ABAP programs can read from and write to the files in that path.

Only users with authorizations for the authorization group FILE can use ABAP program that read from or write to files in the path ‘/tmp/files’. These files are also included in the security procedure.

With the above table entries, the following program extract would cause a runtime error for any user:

DATA: FNAME(60).

FNAME = '/system/files'.

OPEN DATASET FNAME FOR OUTPUT.

Or you can use transaction AL11

Regards,

Amit.

please reward for any useful help

Former Member
0 Kudos

Hey,

Use AL11 to view files on the application server.

If the directory where you store files does not appear in AL11, use the Configure button to add the directory.

Enter the directory path in the field for Directory name, alias in the Enter Director field and all in the Enter server name. Save your entries and the directory should appear in the AL11 list. Entries are updated in the table USER_DIR.

-Kiran

laxmanakumar_appana
Active Contributor
0 Kudos

Hi,

Transaction : AL11 to view the files on the application server.

CG3Y - to download file from application server.

CG3Z - to upload file from presentation server to application server.

Regards

Appana