‎2007 Sep 17 2:19 PM
Hi Experts !
i have a requirement where i have to pick up date and time of the generation of a file from a folder in the application server and then place the time and date in and excel sheet.
till now this process is done manually where we have to go to the respective folder and pick up the data and time.
this process has to be automated and hence we need to write ABAP code for the os instructions which are now done manually like double clicking and navigating to another folder.
please provide me whatever info u have on this subject (os level programming).The os used is UNIX.
basics are also required so if u have a good document plz forward this to
manish.sharma@wipro.com
thanx!!
‎2007 Sep 17 3:01 PM
To execute an OS level command from SAP:
First you define the OS command in SAP in transaction SM69. Then you can execute it from SAPGUI using SM49 or from ABAP code by: CALL FUNCTION 'SXPG_COMMAND_EXECUTE'
‎2007 Sep 17 3:28 PM
You can build a unix command and execute as follows:
DATA unixcmd(200) TYPE c.
CONCATENATE g_dirn lh_rpt1-filen INTO unixcomm.
CONCATENATE 'mv' unixcomm g_dirn INTO unixcomm SEPARATED BY space.
CONCATENATE unixcomm 'bpcs/' lh_rpt1-filen INTO unixcomm.
Executing the system commands witin ABAP.
CALL 'SYSTEM' ID 'COMMAND' FIELD unixcomm.