Para executar um comando externo (do sistema operacional do servidor) no programa ABAP/4, utilizar a função standard “SXPG_CALL_SYSTEM” conforme código
Data: t_protocol like btcxpm occurs 100 with header line, w_param(128). Call function 'SXPG_CALL_SYSTEM' Exporting Commandname = 'Z_HP_SAPOUT' Parameters = w_auxiliar Importing Status = w_return_code Tables Exec protocol = t_protocol Exceptions No_permission = 1 Command_not_found = 2 Parameters_too_long = 3 Security_risk = 4 Wrong_check_call_interface = 5 Program_start_error = 6 Program_termination_error = 7 X_error = 8 Parameters_expected = 9 Too_many_parameters = 10 Illegal_command = 11 Others = 12