CONSTANTSC_EXTCOM TYPE SXPGCOLIST-NAME VALUE 'ZTEST',
             C_OPER   TYPE SYOPSYS VALUE 'Windows NT'.

  DATAV_DIR_INPUT      TYPE SXPGCOLIST-PARAMETERS.
  DATAT_RESULT         TYPE STANDARD TABLE OF BTCXPM.

  V_DIR_INPUT '127.1.0.0'.

  CALL FUNCTION 'SXPG_COMMAND_EXECUTE'
    EXPORTING
      COMMANDNAME                   C_EXTCOM
      ADDITIONAL_PARAMETERS         V_DIR_INPUT
      OPERATINGSYSTEM               C_OPER
    TABLES
      EXEC_PROTOCOL                 T_RESULT
    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
      PARAMETER_EXPECTED            9
      TOO_MANY_PARAMETERS           10
      ILLEGAL_COMMAND               11
      WRONG_ASYNCHRONOUS_PARAMETERS 12
      CANT_ENQ_TBTCO_ENTRY          13
      JOBCOUNT_GENERATION_ERROR     14
      OTHERS                        15.
  IF SY-SUBRC <> 0.
    "ERROR
  ENDIF.




Serkan AKKAVAK
Computer Engineer
ABAP Developer & SAP S/4 HANA Logistics Team Lead
Contact : serkurumsal@yandex.com