|
CONSTANTS:
lc_lscom TYPE sxpgcolist-name VALUE 'LIST_DB2DUMP',"
lc_err_keywd TYPE string VALUE '*External program terminated with exit code*'.
DATA:lt_btcxpm TYPE TABLE OF btcxpm. "unix command
DATA:ld_btcxpm TYPE btcxpm.
DATA:l_param LIKE sxpgcolist-parameters.
CLEAR:lt_btcxpm[],ld_btcxpm,l_param.
CALL FUNCTION 'SXPG_CALL_SYSTEM'
EXPORTING
commandname = lc_lscom
additional_parameters = l_param
TABLES
exec_protocol = lt_btcxpm
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
OTHERS = 12.
IF sy-subrc <> 0.
message 'not exist' type 'E'.
ELSE.
LOOP AT lt_btcxpm INTO ld_btcxpm
WHERE message CP lc_err_keywd.
message 'not exist' type 'E'.
ENDLOOP.
ENDIF.
|