on 12-30-2014 7:59 AM
Hi,
How to run SAP via excel... For example the data needs to be captured from excel and to updated in SAP.
Hi,
.
I think you don't understand my question
The below is a script and Now I need script only to browse my files.
It's very simple logic.
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 = "fb03"
session.findById("wnd[0]").sendVKey 0
session.findById("wnd[0]/usr/txtRF05L-BELNR").text = "93000001"
session.findById("wnd[0]").sendVKey 0
session.findById("wnd[0]/titl/shellcont/shell").pressContextButton "%GOS_TOOLBOX"
session.findById("wnd[0]/titl/shellcont/shell").selectContextMenuItem "%GOS_VIEW_ATTA"
-------------------------------------------------------------------------
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I need SAP Script to select a file from my C:\ drive?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Arul,
you can test the OPEN DATASET command for that.
The URL
shows information regarding this command.
Best regards,
Laszlo
Hello Arul,
could you please give more information what exactly is needed to be achieved here?
E.g.: an Excel file needs to be uploaded to the Application Server? Or the data from an Excel file needs to be exported into an SAP Report?
Best regards,
Laszlo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Laszlo,
I created a script to capture data from excel and paste it to SAP...It's working fine.
Now i have another question : Can you please give a script to Browse folders in SAP?
For Example : I'm writing a script to create attachment in FB03 and i'm unable to find a code to browsing and selecting a file.
Thanks
Arul
Hello Arul,
transaction AL11 makes it possible to browse the folders of an SAP Instance - you can check the coding behind this transaction to see which techniques can be used.
My document http://scn.sap.com/docs/DOC-55795 shows examples how files can be browsed and downloaded from SAP servers.
Perhaps it can also show some ideas how files can be uploaded (by looking for similar programs).
Best regards,
Laszlo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.