SAP Basis, Functional and ABAP Programming Reference Books
Using different OS command

To have different command for different OS system :- 

If you define the command for each operating system using transactions SM69 (You can test it with SM49) and then call it using SXPG_COMMAND_EXECUTE which contains a parameter defining the operating system (SY-OPSYS) then it does not matter which operating system is running, the function module always calls the correct version of the command. 

So, for example you could define a command 'OS_COMMAND' which deleted a file. This would have one version for Dos which said 'del', and a second version for unix which said 'rm'.  The correct command would be specified by the call to SXPG_COMMAND_EXECUTE because the operating system parameter differentiates between the two commands. 
 

Best regards,
SAP Basis, ABAP Programming and Other IMG Stuff
http://www.sap-img.com