+ Reply to Thread
Results 1 to 4 of 4

Gather data from SAP

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    08-31-2022
    Location
    Swiss
    MS-Off Ver
    365
    Posts
    138

    Lightbulb Gather data from SAP

    Good morning,

    I would like to import the result of a specific transaction in SAP in a sheet of an already existing excel-file.
    To get this data the idea is to enter a product number in my excel-file, which triggers a query/transaction in SAP. After that the outcome of this query should be copied to an extra sheet in the same excel-file.

    There are two possible ways in my head that may work:

    1) Start an automated process via Power Automate etc., safe the result of the transaction as a text-file, convert it in an excel-file and then extract the needed data into my existing excel-sheet. While this might work, it seems quite complicated and very prone to errors.

    2) Extract the data via macro directly from SAP (login to SAP with a popup in excel or safe the login data directly in the macro) and copy it to the needed excel-sheet. This is the more elegant way and I know, that this should be possible - but I`m completely lost to make this on my own...

    I will try to post a sample sheet, but its quite difficult to do so, because every result of a transaction is different and no confidential data is allowed.

    Thank you in advance for any help and best regards,

    David

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2507 (Windows 11 Home 24H2 64-bit)
    Posts
    91,792

    Re: Gather data from SAP

    This may well require VBA.

    There are instructions at the top of the page explaining how to attach your sample workbook (yellow banner: HOW TO ATTACH YOUR SAMPLE WORKBOOK). Screenshots are of little practical use as we cannot manipulate them.

    A good sample workbook has just 10-20 rows of representative data that has been desensitised. The sample layout accurately matches that of your real data. It also has expected results mocked up, worked examples where required, relevant cells highlighted and a few explanatory notes.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Contributor
    Join Date
    08-31-2022
    Location
    Swiss
    MS-Off Ver
    365
    Posts
    138

    Re: Gather data from SAP

    Hi Ali,

    thanks for reaching out!
    I tried to explain the problem via a sample sheet.
    Please dont hesitate to ask if something needs a clarification.

    And VBA sounds fine - but I guess I would need some help to do this.

    Thank you and have a nice weekend,

    David
    Attached Files Attached Files

  4. #4
    Forum Contributor
    Join Date
    08-31-2022
    Location
    Swiss
    MS-Off Ver
    365
    Posts
    138

    Re: Gather data from SAP

    Good morning,

    due to the potential need of VBA, can someone may move this thread to the according sub?

    I tried to work on a solution for my problem and found out, that it should be possible to make a script in SAP and then run this script via macro in Excel.
    The transaction ZR11 is needed to enable the possibility to record the steps you need in SAP.
    Afterwards a .vbs file is generate which can simply be copied to a VBA macro. Variables can be implemented to make the query dynamic.

    The only problem I have with this solution is, that SAP is running in the foreground and the generated Excel-File is separate and not included in my actual Workbook.

    Does anyone know a workaround for this?

    Thank you in advance and best regards,

    David

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. gather data from 12 months, not 1
    By DarrylBurge2 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-28-2024, 09:46 AM
  2. Gather and subtotal data
    By Adamk12 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-17-2015, 06:26 PM
  3. Using VBA to parse data...need to click through links, gather data and come back
    By jamesdvance in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-20-2013, 09:15 PM
  4. [SOLVED] gather data from various workbooks into summary
    By GMan1941 in forum Excel General
    Replies: 1
    Last Post: 03-21-2013, 08:40 AM
  5. Using a template to gather data.
    By d.nguyen09 in forum Excel General
    Replies: 1
    Last Post: 07-19-2011, 02:28 AM
  6. Gather data, put in list?
    By greggov in forum Excel General
    Replies: 1
    Last Post: 02-10-2009, 12:51 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1