In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
Editor to share with you how to use Excel to call ABAP system functions, I believe that most people do not know much, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!
Effect: create a button in excel and develop some VBscript that can connect to the specified ABAP system and execute the ABAP function module in the system.
In this example, the ABAP system function TH_USER_LIST is executed to retrieve the logged-in user of the current system and display it in excel.
The click response function implementation code of the button:
Sub CommandButton1_Click () Set R3 = CreateObject ("SAP.Functions") Set myConnction = R3.Connection myConnction.ApplicationServer = "ag3.xxx.sap.corp" myConnction.SystemNumber = 54 myConnction.Client = "001" myConnction.user = "WANGJER" myConnction.Password = "your password" If myConnction.Logon (0 True) True Then MsgBox "Logon failed" Exit Sub End If Dim callFunctionModule As Object Set callFunctionModule = R3.Add ("TH_USER_LIST") callFunctionModule.Call If callFunctionModule.Exception "Then MsgBox callFunctionModule.Exception End If If callFunctionModule.Call = True Then Dim result As Object Set result = callFunctionModule.tables (" USRLIST ") Dim aSheet As Worksheet Dim sheetCol As New Collection sheetCol.Add ActiveWorkbook.Sheets (1) For Each aSheet In sheetCol Dim i As Integer i = 1 For Each user In result.Rows Client = user (2) UserName = user (3) Terminal = user (5) IP = user (16) aSheet.Cells (I 1) = Client aSheet.Cells (I, 2) = UserName aSheet.Cells (I, 3) = Terminal aSheet.Cells (I, 4) = IP I = I + 1 Next Next Else MsgBox "Call Failed! Error: "End If 'logoff myConnction.logoffEnd Sub is all the content of the article" how to use Excel to call the functions of ABAP system ". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.