‎2007 Mar 08 5:12 PM
Hi Experts,
While i am calling SXPG_COMMAND_EXECUTE in my program, the system is going to dump as i have no permissions for unix. I placed a message after
if sy-subrc <> 0.
MESSAGE e000(msgclass) with 'No permissions'.
endif.
but it displays the above message and then still goes to dump .
I want to avoid the dump pls tell me how to handle this.
thanks
Dany
‎2007 Mar 08 5:15 PM
Hi,
Did you give EXCEPTIONS when calling the function module..
CALL FUNCTION 'SXPG_COMMAND_EXECUTE'
EXPORTING
commandname =
ADDITIONAL_PARAMETERS =
OPERATINGSYSTEM = SY-OPSYS
TARGETSYSTEM = SY-HOST
DESTINATION =
STDOUT = 'X'
STDERR = 'X'
TERMINATIONWAIT = 'X'
TRACE =
IMPORTING
STATUS =
EXITCODE =
tables
exec_protocol =
<b> 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</b>
.
Thanks,
Naren
‎2007 Mar 08 5:25 PM
Hi,
Yes i had specified all the exceptions.
pls have a look below after if sy-subrc <> 0.
CALL FUNCTION 'SXPG_COMMAND_EXECUTE'
EXPORTING
commandname = zip_commnd
additional_parameters = allinv
operatingsystem = 'UNIX'
TARGETSYSTEM = SY-HOST
DESTINATION =
STDOUT = 'X'
STDERR = 'X'
TERMINATIONWAIT = 'X'
TRACE =
IMPORTING
STATUS =
EXITCODE =
TABLES
exec_protocol = t_billdir
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.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
MESSAGE e000(msgclass) with 'No permissions'.
ENDIF.
is that right?
thanks
Dany
‎2007 Mar 08 6:55 PM
‎2007 Mar 08 7:16 PM
Dan,
I jst tried with your code it works fine jst check........
REPORT ZTest.
data: t_billdir type BTCXPM occurs 0 with header line.
CALL FUNCTION 'SXPG_COMMAND_EXECUTE'
EXPORTING
commandname = 'dir'
*additional_parameters = allinv <i>Commented for test</i>
* operatingsystem = 'UNIX'
* TARGETSYSTEM = SY-HOST
* DESTINATION =
* STDOUT = 'X'
* STDERR = 'X'
* TERMINATIONWAIT = 'X'
* TRACE =
* IMPORTING
* STATUS =
* EXITCODE =
TABLES
exec_protocol = t_billdir
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.
* MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
* WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
MESSAGE e000(msgclass) with 'No permissions'.
ENDIF.Can you paste your Error Description..
Regards.
‎2007 Mar 08 7:17 PM
‎2007 Mar 08 7:49 PM
Hi Narendran Muthukumaran
The program is issuing a message with no Message Type specified causing the program to abort.
in short text it says : Meesage type " " is unknown.
Others - thanks for your responses. How to see the object s_log_com?
Thanks
Dany
‎2007 Mar 08 7:24 PM
Can you please check authorisation for the following object
S_LOG_COM
aRs
‎2007 Mar 08 8:06 PM
Message Type " " can occurs due to various reasons
Please paste the short dump (atleast first 1-3 pages)
aRs
‎2007 Mar 08 8:13 PM
Hi,
Ok..Is the dump happening while calling the function module..OR after the function module is called..
Thanks,
Naren
‎2007 Mar 08 9:31 PM
Hi,
TRhe following is the short dumps extract :
ShrtText
Message type " " is unknown.
Error analysis
Only message types A, E, I, W, S and X are allowed.
There is probably an error in the program
"<pgm name>".
please help.
thanks
Dany
‎2007 Mar 08 9:32 PM
its happening just after the call to the func module and before uf sy-subrc <> 0.