« Navision C/SIDE Solution Development Sample Questions | Homepage | Sap default password »

15/05/2008

Sap & Excel

1 - Da qui potete scaricare un esempio di file Excel (saplogon.xls) con il quale interagire direttamente con Sap tramite OLE RFC per generare dinamicamente report Excel.

2c05d667f59c8e86ee81a6883c749e2c.jpg
 
 
230afad2daefcfc4cd0461e7fb0dfdaf.jpg
 
69e203a38f0d274962fbe38fab9a8d14.jpg
 


La macro è abbstanza semplice per chi conosce il vbscript.

Dim R3, App As Object
Dim Customers, Customer As Object
Dim Result As Boolean
'**********************************************
'Create Server object and Setup the connection
'**********************************************

Sub SAP_Logon()
Set R3 = CreateObject("RFC.ServerObject")
Set App = R3.Application
R3.connection.client = "010"
'R3.connection.user = "SAP*"
'R3.connection.password = "19920706"

.......

Il codice completo è visibile scaricando il file saplogon.xls.

 

2 - Vi propongo inoltre un altro esempio migliore di accesso tramite OCX Controls (SapLogonNew.xls).

e799fdbb1e6ddf2251bbbfcb64063bb2.jpg
257a8778c4a7b42dd49b81f482d0a737.jpg
 
 
52a17c366ff3647306d5f634d77c2f92.jpg

 

Ciao a tutti

Commenti

I'm trying run EXCEL with SAP.display error 429 in :=0D
=0D
'********************************** ************=0D
'Create Server object and Setup the connection=0D
'******************************* ***************=0D
Set R3 =3D CreateObject("RFC.ServerObject")=0D


ADMIN: which gui version are you using?

Scritto da: mmaedd | 22/09/2010

Scrivi un commento

NB: i commenti di questo blog sono moderati.