on ‎2007 May 01 9:10 PM
Hi everybody,
I'm trying to open a SAPGUI window out of a widget.
Therefore I use sapshcut.
My command line statement is something like this:
start sapshcut.exe -snc_name="p:CN=ISX, O=SAP-AG, C=DE" -sid=ISX -command="*ZDM_WIDGET P_INPUT=915CBF7FD8828F4DAD581B66CA887D3D;" -type=Transaction -maxIt works fine so.
But when I want to use the
runCommandfunction from JavaScript I get an error popup saying:
Microsoft Visual C++ Library
Buffer overrun detected!
Program C:\Program ...\sapgui.exe
A buffer overrun has been detected which has corrupted the program's internal state.
The program cannot safely continue execution and must now be terminated.
I tried several variants...
var sapgui = "start sapshcut.exe -snc_name="p:CN=ISX, O=SAP-AG, C=DE" -sid=ISX -command="ZDM_WIDGET P_INPUT=915CBF7FD8828F4DAD581B66CA887D3D;" -type=Transaction -max";
runCommand("cmd /C " + sapgui);and also
runCommand('cmd /C start sapshcut.exe -snc_name="p:CN=ISX, O=SAP-AG, C=DE" -sid=ISX -command="*ZDM_WIDGET P_INPUT=915CBF7FD8828F4DAD581B66CA887D3D;" -type=Transaction -max');Does anyone have an idea what causes this error or even how I can avoid it?
I get the same error when I insert a wrong parameter in the command line in windows.
But it also works if I just call the transaction like this.
runCommand('cmd /C start sapshcut.exe -snc_name="p:CN=ISX, O=SAP-AG, C=DE" -sid=ISX -command="*ZDM_WIDGET" -type=Transaction -max');So the problem must lay in the parameter...
Best regards
Tobias
Help others by sharing your knowledge.
AnswerRequest clarification before answering.
I finally fixed the issue.
This one works without any error.
var sapgui = 'C:\Program Files\SAP\FrontEnd\SAPgui\sapshcut.exe -snc_name="p:CN=ISX, O=SAP-AG, C=DE" -sid=ISX -command="*ZDM_WIDGET P_INPUT=915CBF7FD8828F4DAD581B66CA887D3D;" -type=Transaction -max';
var shell = COM.createObject("WScript.Shell");
shell.Exec(sapgui);
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.