03-17-2015 2:45 AM
Hi expert,
Currently, I can get the folders or files in disk drive c:\ or d:\ by FM : TMP_GUI_DIRECTORY_LIST_FILES.
But I can't get how many disk drive in user computer. Is there any FM or Object can get disk drive information in user computer?
Just like follow picture, I want to get disk drive a:\, c:\, g:\, e:\, f:\.
best regards,
Eric
03-17-2015 2:52 AM
Hi Eric,
Use the method DIRECTORY_BROWSE of class CL_GUI_FRONTEND_SERVICES. Also check other methods which can be useful for you.
Hope this helps you.
Regards,
Rama
03-17-2015 3:43 AM
Dear Ramakrishnappa,
I had tried the method CL_GUI_FRONTEND_SERVICES=>DIRECTORY_BROWSE. The method just popup screen. Is there any method can return the disk drive list.
DATA: L_PATH TYPE STRING.
CLEAR L_PATH.
CALL METHOD CL_GUI_FRONTEND_SERVICES=>DIRECTORY_BROWSE
EXPORTING
WINDOW_TITLE = 'TEST TITLE'
INITIAL_FOLDER = L_PATH
CHANGING
SELECTED_FOLDER = L_PATH
EXCEPTIONS
CNTL_ERROR = 1
ERROR_NO_GUI = 2
NOT_SUPPORTED_BY_GUI = 3
others = 4.
Best regards,
Eric
03-17-2015 2:52 AM
Hi Eric
What is the business requirement for this scenario?
Regards
Arden
03-17-2015 3:17 AM
He Arden,
There is a user requirement for upload file to our SAP UNIX server. We have to add authorization management & encryption for user choose file.
The GUI like follow picture.
C:\
windows
test.txt
D:\
user_folder
test.xlsx
Maybe the file in user USB drive. So I have to get the disk drive from current user computer and set disk drive as root node.
Best regards,
Eric