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. 

SAP Basis Tips
SAP BC Tips and Basis Components Discussion Forum

Administration In SAP - Sapgui, Unix, SAP ITS, Router, Client Copy and IDES 

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

All the site contents are Copyright © www.erpgreat.com and the content authors. All rights reserved.
All product names are trademarks of their respective companies.  The site www.erpgreat.com is in no way affiliated with SAP AG.
Every effort is made to ensure the content integrity.  Information used on this site is at your own risk.
 The content on this site may not be reproduced or redistributed without the express written permission of
www.erpgreat.com or the content authors.