Skip to Content
0

How to list files from instance only, where you are logged in?

Dec 05, 2017 at 12:49 PM

73

avatar image

How can files be listed from only one instance?

In SAP you have as usual three or more instances: development system (DS5), test system (TS5), productive system (PS5) etc.. Now I have a program, which can list the files from an entered directory path. For files listing I used the FM: EPS_GET_DIRECTORY_LISTING. Unfortunately with this program you can list the files from every instance. If you are logged in in DS5 you can also see the files, which are in directories from TS5 and PS5. I need a FM or method to list files only from a logical system, where I’m logged in currently.

Is there some FM or methode?

10 |10000 characters needed characters left characters exceeded

Are you saying that all your SAP instances (DEV/QA/PRD) use the same file server and same file location? That would be rather unwise for many reasons.

"Logical system" is a different concept in SAP. Please use standard terminology to avoid confusion.

1

I've edited the question accordingly

0

Thank you Ms. Perfiljeva for pointing out the difference between the SAP logical system and SAP instance. Now I will rephrase the formulation maybe that help to find an answer of my question.

0
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Mike Pokraka Dec 07, 2017 at 09:18 AM
2

Talk to Basis, this should not be permitted in a normal environment with basic security in place.

Share
10 |10000 characters needed characters left characters exceeded
Matthew Billingham
Dec 07, 2017 at 10:06 AM
2

As Mike pointed out, this is not normal. I've worked in places where Dev and Test are on the same server and share a file system, but having your production server there as well is very insecure - anyone with access to development can now manipulate productive files. Not a good idea, is it?

Where test and dev are on the same server, Basis usually define a folder for test and one for dev, having the same name as the instance (TS5, DS5), with the data for an instance being in appropriate subfolders. In this way, you can use logical files to point to the correct folder, no matter what instance you're working on.

Show 1 Share
10 |10000 characters needed characters left characters exceeded

My experience has been the same. Even if DEV/QA share the file server, there are different folders. Basis must be high on mushrooms to put PRD files together with non-PRD ones IMHO.

0
Volker Binder Dec 05, 2017 at 04:29 PM
1

for F4 help you can get the current server with:

data: my_servcer type msxxlist-name.

call 'C_SAPGPARAM' id 'NAME' field 'rdisp/myname'

id 'VALUE' filed my_server.

maybe it helps with your problem.

Show 2 Share
10 |10000 characters needed characters left characters exceeded

or CL_ABAP_SYST=>GET_INSTANCE_NAME( ) or CL_ABAP_SYST=>GET_HOST_NAME( )

0

thank you

0