05-13-2014 6:05 AM
Hi experts,
I've defined in SM69 a external command for our Linux-Host.
This command I execute with Function Module SXPG_COMMAND_EXECUTE.
However, I always get the exception 2 - Command not found.
The test in Sm69 works fine.
We are also having HP-UX Hosts and on this the command works fine.
Also other commands works fine on Linux-Host.
The command is: ls -l (so command = ls, command parameter = -l)
Does anyone know the reason for this?
Kind regards
05-13-2014 6:48 AM
Hi,
did you try to execute the FM thru the SE37 trans. ? if yes did you check the Case Sensistive checkbox ?
Linux (and Unix) are case sensistive
regards
Fred
05-13-2014 6:48 AM
Hi,
did you try to execute the FM thru the SE37 trans. ? if yes did you check the Case Sensistive checkbox ?
Linux (and Unix) are case sensistive
regards
Fred
05-15-2014 7:27 AM
Hello Fred,
yes, I tried it also in SE37 - same result.
Case sensitive was set.
Kind regards
05-15-2014 7:31 AM
Hi Christian,
could you try to use a program instead of a command ? I means, "ls" is a part of the kernel, try to execute a program in a directory like ifconfig .. /usr/sbin/ifconfig
regards
Fred
05-15-2014 7:39 AM
Hi Fred,
but you know, if I try it in SM69, it works well.
I've now changed ls -l to ls and this also works in SM69 and also SE37.
But I need ls -l.
Kind regards
05-15-2014 7:49 AM
Do you have notice SAP put a "?" after the parameter of the command "ls" ? <-- it's for additional parameters of the directory location
you could create a script "ZLS" doing a ls -l ..
05-15-2014 8:48 AM
Hello Fred,
what do you mean with the "?"?
Could you please explain it again?
I've now also created an OSS ticket, because I already found note 1555353 which describes a similar problem.
But I couldn't solve it.
Kind regards
05-15-2014 9:00 AM
05-15-2014 9:06 AM
I've now changed ls -l to ls -l ?.
So the command paramter looks like this now in SM69: -l ?
But this doesn't work.
Kind regards
05-15-2014 9:25 AM
Do you really need it ?
could you use kernel function ? or you really need the SM69 ?
looks how to use the kernel function of OS command : abap - report to execute os-commands - Code Gallery - SCN Wiki
regards
Fred
05-20-2014 7:05 AM
The note did solve the problem, I made an error by implementing the note.