Skip to Content
author's profile photo Former Member
Former Member

Excel VBA SAP logon pad


I have successfully written VBA code to emulate user interaction with SAP on one "system". However when i want to switch over to another SAP system i have been unsuccessful. I may be using the wrong terminology referring to the systems, for example, on the SAP logon pad 710 i have a list of 56 system's i can log in to. I only use two of those systems, one is called SAP ECC production [BH1] and the other is called SAP SCM 5.0 Production [BA1]. in the middle of my code i would like to switch over to the second system (SAP SCM 5.0) but i have not been able to do it. Any help would be tremendous! Thank you 😊

Add comment
10|10000 characters needed characters exceeded

1 Answer

  • Best Answer
    Posted on Sep 24, 2013 at 08:53 AM

    Hi Jason,

    Basically, you need to change the sap connection to the other system using either OpenConnection or OpenConnectionByConnectionString method on the GuiApplication object.

    Can you share the codes that you have and indicate at which point do you want to change?



    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Sayuti Azmi

      Actually here is how i solved it:

                  For r = 0 To 15                If session.findbyid("/app/con[0]/ses[0]/wnd[0]/usr/tblSAPDV70ATC_NAST3/txtNAST-DATVR[8," & r & "]").Text = "" Then                    If session.findbyid("/app/con[0]/ses[0]/wnd[0]/usr/tblSAPDV70ATC_NAST3/txtNAST-UHRVR[9," & r & "]").Text <> "" Then                        session.findbyid("wnd[0]/usr/tblSAPDV70ATC_NAST3").getAbsoluteRow(r).Selected = True                    Else                    End If                Else                End If          Next r