Results 1 to 6 of 6
  1. #1
    adonald33 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Nov 2014
    Posts
    3

    VBA and SAP Query

    Hi Guys,

    I'm really needing some assistance with this, I've got an access database that pulls together customer information from an ODBC source, however there is only so much information this ODBC this table can provide to me, so I have also created a SAP query that uses data from the ODBC table to give me all the data I need. Currently I am running an access query against the ODBC information, manually copying the results from the query, going into SAP and manually doing a paste, executing the query, then taking the query results back into a table in access. This is horrendously manual. Do you guys know of a way I can link up access to SAP so that I run all the queries through access VBA. I've had a look and a bit of a play around with RFC_Read_Table function in VBA, however this seems only to be able to pull back 1 table at a time, my SAP query has to use 3 tables as the information I need is spread across them. I did consider pulling all 3 table and doing the query in Access, however the delimiter fields again are not constant. I'm really pulling my hair out with this, do you guys know if I can run my SAP query through VBA?



    Thanks

    A

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,549
    Seems to me ,you shouldnt need VBA.
    Cant you ODBC to SAP and get your tables thru that?

    Then its simple append queries to add the data.

  3. #3
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,643
    Bing: Access link to SAP table

    http://sap.ittoolbox.com/groups/tech...-sap-r3-696239

    What do you mean by 'the delimiter fields again are not constant'?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  4. #4
    adonald33 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Nov 2014
    Posts
    3
    Hi guys, sorry I was slightly vague talking about the delimiter, I have a table in Access that is called 'sap_options' this table is where I put search criteria in, otherwise it would bring back the entire database, which would crash both systems, problem is the 3 tables do not share the same delimiter so for example I wanted to bring back data that is just for 1 person, so I put that person's name in as a delimiter, but only 2 out of the 3 tables has that field to bring back. I can link them up in SAP, but can't bring it in using VBA. This ODBC to a SAP query is interesting and I'll see what I can do there

  5. #5
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,643
    So by delimiter you mean filter criteria.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  6. #6
    adonald33 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Nov 2014
    Posts
    3
    Yes, the filter criteria

Please reply to this thread with any new information or opinions.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums