2010 Jul 09 10:57 AM
Good morning,
I need to get data and time property from a local file on windows.
I tried with CL_GUI_FRONTEND_SERVICES=>FILE_GET_ATTRIBUTES but it doesn't return this information.
I hope there is a method-function that retrive these informations and I don't need to create a .bat file with dir command inside!
Thanks you.
Marco
2010 Jul 09 11:02 AM
AFAIK SAP doesn't provide any standard methods / FMs to address this
2010 Jul 09 11:02 AM
AFAIK SAP doesn't provide any standard methods / FMs to address this
2010 Jul 09 11:30 AM
2010 Jul 09 10:06 PM
at least, if you know that only one OS is used (but you can also determine it dynamically), you can execute directly the OS command (DIR for windows) with CL_ABAP_FRONTEND_SERVICES=>EXECUTE. As DIR is not available as an executable, we can execute it using application "cmd" and parameter "/c dir path/file >resultfile" and minimized=X and synchronous=X, then read the result file. Not clean, but works.
2010 Jul 10 12:38 PM
>
> you can execute directly the OS command (DIR for windows).
Hi Sandra,
Your solution rang a bell. Why can't we create an external command & call it using SXPG_COMMAND_EXECUTE or SXPG_CALL_SYSTEM ? Any comments on this ??
Should be a clean solution though
BR,
Suhas
2010 Jul 10 6:34 PM
there's a big difference: the question is about the presentation server, while SXPG*/SM69 are for the application server
2010 Jul 11 5:25 AM
>
> there's a big difference: the question is about the presentation server, while SXPG*/SM69 are for the application server
Oopsie !!!
Moral of this blunder: Don't post ur (in this case mine) opinions on weekends ...
2010 Jul 17 10:19 AM
>
> with CL_ABAP_FRONTEND_SERVICES=>EXECUTE
Little correction: of course, it was CL_GUI_FRONTEND_SERVICES=>EXECUTE