Use VBA in Excel to connect to the SAP system and call function module

Source: Internet
Author: User

A colleague made an Excel file a few days ago, used VBA in Excel to call a tcode in SAP, and saved the content in sheet as a local TXT file, call the TXT file in tcode, execute tcode, and return the result to excel. I found some information on the Internet, logged on to sap using VBA, called the function module, and returned the result to excel. I personally think this is quite good: If you have such a requirement, you need to put the data in SAP in the local Excel after some processing, then we only need to write a function module in SAP, place the result in a table, and then use VBA in Excel to call this function module, then the results can be directly reflected in Excel. What a wonderful thing. Haha!

Of course, the one I wrote by my colleague is complicated and I haven't studied it carefully yet. I will record the following after I study it again in another day!

Here we do not directly record how to call the function module in VBA. Read the attachment directly!

/Files/flysky927/Conect-to-SAP.rar

 

Statement: the content in the attachment is directly changed by referring to the online materials. If your rights are violated, please inform me in time and I will withdraw it immediately!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.