• 0
Sign in to follow this  
Thiago_Borba

Mensagem SAP

Question

Boa Tarde!

 

Pessoal, estou automatizando um processo de busca de informações no SAP.

Através do Access, instancio um objeto SAP em VBA, conforme o código abaixo:

   

    Dim rstRel      As New ADODB.Recordset 
    Dim Connection As Object
    Dim num As Integer
        
       DoCmd.SetWarnings False
    
    'abre a instancia do SAP
    Set app = CreateObject("Sapgui.ScriptingCtrl.1")
    Set Connection = app.OpenConnection("ECC Latinoamerica - RLP", False)
    Set Session = Connection.Children(0)

Tudo funciona perfeitamente

Mas ao chegar na linha (Set Connection = app.OpenConnection("ECC Latinoamerica - RLP", False)), fica me solicitando apertar um botão de OK, conforme print no anexo.

Assim, não consigo automatizar, completamente a operação.

Alguém sabe desvendar este mistério?

 

Código.png

Mensagem.png

Share this post


Link to post
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this