‎2012 Apr 19 1:42 PM
Hi team,
who can help me. i have toll connect to SAP from Excell.
i
then i doing full cycle transaction and Excell created script automatically.
Example
then i generate Inpur sheet
then i press play, and it works fine
but i need pause when script working.
exampe
IsInput ID ScriptCode
START 001
002 MySession.findById("wnd[0]").resizeWorkingPane 82,25,false
x 003 MySession.findById("wnd[0]/usr/ctxtRMMG1-MATNR").text = "81257114"
004 MySession.findById("wnd[0]").sendVKey 0
pause 10 sec
005 MySession.findById("wnd[1]").sendVKey 0
006 MySession.findById("wnd[0]").sendVKey 0
007 MySession.findById("wnd[0]").sendVKey 0
008 MySession.findById("wnd[0]").sendVKey 0
009 MySession.findById("wnd[1]/usr/btnSPOP-OPTION1").press
STOP 010
‎2012 May 21 2:27 PM
Hi Evgeniy
For this kind of thing you need to implement some API called "Sleep"
For this add The following Code-Line Above your complete Code:
Declare Sub Sleep Lib "kernel32" (ByVal dwMilliSeconds As Long)
you can Call it like this:
IsInput ID ScriptCode
START 001
002 MySession.findById("wnd[0]").resizeWorkingPane 82,25,false
x 003 MySession.findById("wnd[0]/usr/ctxtRMMG1-MATNR").text = "81257114"
004 MySession.findById("wnd[0]").sendVKey 0
-> Sleep 10000
005 MySession.findById("wnd[1]").sendVKey 0
006 MySession.findById("wnd[0]").sendVKey 0
007 MySession.findById("wnd[0]").sendVKey 0
008 MySession.findById("wnd[0]").sendVKey 0
009 MySession.findById("wnd[1]/usr/btnSPOP-OPTION1").press
by The way ... What Excel-file is this you are using there ???
seen it somtimes but never found out where it comes from ?
Is it a Addon ?
‎2012 May 30 6:26 PM
Hi Thomas,
thank for response, yes this is special addon fo excel
i have tried your advice, but unfortunatelly it isn't working.
‎2012 May 30 10:01 PM
Hi Evgeniy,
I do not know the addon also. You could perhaps try the following:
. . .
004 MySession.findById("wnd[0]").sendVKey 0
005 set wshell = createobject("Wscript.Shell")
006 wshell.run "c:\tmp\sleep_10000.vbs",1,true
007 MySession.findById("wnd[1]").sendVKey 0
. . .
The file sleep_10000.vbs contains only one command and it stands for example in c:\tmp:
wscript.sleep 10000
Regards,
ScriptMan
‎2012 May 31 8:18 AM
‎2012 May 31 3:58 PM
Hi Evgeniy - is that special add-in tool available somewhere for public or was this a custom development?
Regards
Umur
‎2012 May 31 10:19 PM
Hi Umur,
As I know, this addon was developed special for P&G, and available for instalation only for P&G in the local network.