cancel
Showing results for 
Search instead for 
Did you mean: 

Process Runner

Former Member
0 Kudos

Hi,

How to run SAP via excel... For example the data needs to be captured from excel and to updated in SAP.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

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"

-------------------------------------------------------------------------

Former Member
0 Kudos

Hi,

I need SAP Script to select a file from my C:\ drive?

Laszlo_B
Active Contributor
0 Kudos

Hello Arul,

you can test the OPEN DATASET command for that.

The URL

ABAP Keyword Documentation

shows information regarding this command.

Best regards,

Laszlo

Laszlo_B
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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

Laszlo_B
Active Contributor
0 Kudos

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