on 02-13-2013 3:58 AM
Hello Experts ,
I am trying to display Account information in SAP Script , but it is not showing up any values. Please let me know where all to put breakpoints for debugging it , as i m new to SAP Scripts.
Thanks in advance,
Best Regards,
Nikhil Kulkarni
Hello Nikhil,
look here http://scn.sap.com/docs/DOC-34670 how to use Microsoft Script Debugger with SAP GUI Scripting. Use the keyword Stop.
Good luck.
Cheers
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nikhil,
We can`t put any breakpoints in SAP Scripts, to debug a script just go to SE71 initial screen and in the menu option click Utilities-> Activate debugger.
To switch off the debugger, choose Debugger -> Exit in the debugger window.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nikhil,
if you use SAP transaction FPL9 you can run this code:
If Not IsObject(application) Then
Set SapGuiAuto = GetObject("SAPGUI")
Set application = SapGuiAuto.GetScriptingEngine
End If
If Not IsObject(connection) Then
Set connection = application.Children(0)
End If
If Not IsObject(session) Then
Set session = connection.Children(0)
End If
If IsObject(WScript) Then
WScript.ConnectObject session, "on"
WScript.ConnectObject application, "on"
End If
session.findById("wnd[0]").maximize
session.findById("wnd[0]/tbar[0]/okcd").text = "FPL9"
session.findById("wnd[0]/tbar[0]/btn[0]").press
session.findById("wnd[0]/usr/ctxtFKKL1-VKONT").text = "1234567" 'change this account number
session.findById("wnd[0]/usr/ctxtFKKL1-VKONT").setFocus
session.findById("wnd[0]/usr/ctxtFKKL1-VKONT").caretPosition = 8
session.findById("wnd[0]/tbar[0]/btn[0]").press
session.findById("wnd[0]/usr/lbl[0,3]").setFocus 'Line 3
session.findById("wnd[0]/usr/lbl[0,3]").caretPosition = 0
MsgBox session.findById("wnd[0]/usr/lbl[0,3]").Text 'name of the customer
In customer account you can download the whole page via transaction %PC into a file.
Then you can read the file line by line with the vbs-object "Scripting.FileSystemObject".
netkid
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.