‎2014 Feb 18 11:43 PM
Hi All,
Request to confirm the function module / class / coding required to determine the currently available space
in a directory on the application server.
Regards
Kunal
‎2014 Feb 19 1:34 AM
Hi,
You can use the function module ' SXPG_CALL_SYSTEM' to get back the available space using UNIX commands designed in SM69.
You can use the below command:
df -k <directory_path>
This would return the result in percentage.
The same stats would be returned by the FM mentioned earlier. Only thing would be the user ID should have the authorization to execute it.
Cheers,
Arindam
‎2014 Feb 19 6:30 PM
Hi Arindam,
Thanks for your response.
I believe you have understood our req. correctly.
For an SAP directory , used space = ?, total space = ?
The External command 'ls' only returns the file names in a directory.
I am not sure on implementing the df-k suggested by you.
Is it a separate command or do i have to use it like this
'df -k' in a new command ? Did try this formation but could not get it to work.
Returns an error
'Can't exec external program (No such file or directory) External program terminated with exit code 1
'
Appreciate your help on this issue.
Regards
Kunal
‎2014 Feb 19 10:02 PM
Hi,
Exit code 1 means you do not have the permission to execute the Unix Command. Please as your basis team. Rest should work out after that.
Cheers,
Arindam
‎2014 Feb 19 7:17 PM
Hello Kunal,
Goto t.code ST06 ---> Detailed analysis menu --> Click on filesys under Snapshot - current data. You will find the list of directories with their used and free space and free space in %.
Hope this might help you.
Regards,
Thanga
‎2014 Feb 20 1:28 AM
Hi Arindam,
The UNIX command df -k looks good. Below is post execution screen.
Also, can you advise if there is any other way since authorization may be issue in production system for us.
Hi Thanga,
The space displayed over here is only for main folders in directory and not sub folders.
Although will check in debug , how this is being done.
Thanks anyways.
Regards
Kunal
‎2014 Feb 20 2:59 AM
Hi,
As I see are you trying to do something in the root folder. You might need UNIX admin access which you most probably wont have. The application server path, favorably a sub folder that SAP users use and visible in AL11 would wok ok.
Cheers,
Arindam