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

Display directory in current level only in application server

Former Member
0 Likes
685

Hi, I am trying to display the subdirectory in application server underneath the current directory for 1 level only. I am using the function module /SAPDMC/LSM_F4_SERVER_FILE but it will display till the last level. Is there a way to only display the directory (not include file) underneath the current directory but not to go any further down? Or if there is a way to restrict the number of level for going downward, that will work too.

Thanks,

1 ACCEPTED SOLUTION
Read only

vinod_vemuru2
Active Contributor
0 Likes
574

Hi,

Not sure to what extent this is correct. But seems to be working for me.

Pass the parameter FILEMASK as *.xxx (Usually we don't have the files with extension xxx. So it displays only till the directory level.

Hope this works for you.

Thanks,

Vinod.

Hi, I am trying to display the subdirectory in application server underneath the current directory for 1 level only. I am using the function module /SAPDMC/LSM_F4_SERVER_FILE but it will display till the last level. Is there a way to only display the directory (not include file) underneath the current directory but not to go any further down? Or if there is a way to restrict the number of level for going downward, that will work too.

Thanks,

3 REPLIES 3
Read only

mvoros
Active Contributor
0 Likes
574

Hi,

why don't you just copy code from that FM and modify according to your requirements. You just need to modify routine DIRECTORY_CONTENTS_GET from your FM.

Cheers

Read only

vinod_vemuru2
Active Contributor
0 Likes
575

Hi,

Not sure to what extent this is correct. But seems to be working for me.

Pass the parameter FILEMASK as *.xxx (Usually we don't have the files with extension xxx. So it displays only till the directory level.

Hope this works for you.

Thanks,

Vinod.

Read only

Former Member
0 Likes
574

Found the earlist way to list the sub-directory in the current directory for 1 level is to call a 'ls' command.

CALL 'SYSTEM' ID 'COMMAND' FIELD <ls dir>

ID 'TAB' FIELD itab-sys.

Problem solved.