Ansicht
Dokumentation

ABENABAP_SYSTEM_COMMANDS_APPL_SXPG - ABAP SYSTEM COMMANDS APPL SXPG

ABENABAP_SYSTEM_COMMANDS_APPL_SXPG - ABAP SYSTEM COMMANDS APPL SXPG

CPI1466 during Backup   Vendor Master (General Section)  
This documentation is copyright by SAP AG.
SAP E-Book

SXPG Framework for Operating System Statements

The only recommended way of executing operating system statements from ABAP on the operating system of the host computer of the current or another server is to use the SXPG framework. This framework is based on a list of allowed operating system statements that can be called using function modules in the function pool SXPG.

The list of allowed operating system statements is defined by the system administrator in transaction SM69. Here, the platform-dependent physical operating system statements are assigned to a logical command name used to address them in ABAP. When one of these logical command names is passed to one of the function modules listed below, the operating system statement appropriate for the current platform is executed. Logical command names assigned to an operating system command used by all platforms can be flagged with the operating system ANYOS. Static parameters can be assigned to any operating system statement and further parameters can be specified for when the statement is called. When an operating system statement is called using a logical command name, implicit authorization checks are performed, which can be enhanced by self-defined checks. SAP provides a range of predefined logical command names with the type SAP. Logical command names created by customers have the type KUNDE.

If they have the right authorizations, developers can view the list of operating system statements in transaction SM49 and execute them from here. The following function modules can be called from ABAP programs:

  • SXPG_COMMAND_EXECUTE for execution on other servers; the result can be waited for, but this is not mandatory

These function modules can also be called remotely.

Note

For more information, see the documentation Programming with External Commands in SAP Help Portal.

Example

Call of the operating system statement ping for the central database server of the system on the host computer of the current using the logical command name PING predefined by SAP. The result of the call is passed to the internal table result. The function module SXPG_CALL_SYSTEM can raise more specific exceptions than those handled explicitly here.






TXBHW - Original Tax Base Amount in Local Currency   ROGBILLS - Synchronize billing plans  
This documentation is copyright by SAP AG.

Length: 3340 Date: 20240416 Time: 130611     sap01-206 ( 82 ms )