cancel
Showing results for 
Search instead for 
Did you mean: 

Not able to display data from standard table in SAP Script

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (3)

Answers (3)

stefan_schnell
Active Contributor
0 Kudos

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

ravichandrabgr
Explorer
0 Kudos

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.

  1. Activate the debugger by choosing Utilities
  2. ® Activate debugger in the
    Form: Request screen. You can then generate printer output in dialog.
    A dialog box containing the default breakpoints appears.
    • Track each call of a SAPscript function module, each INCLUDE call, and each
      warning in the debugger.


To switch off the debugger, choose Debugger -> Exit in the debugger window.

Former Member
0 Kudos

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