Posts

Excel VBA connect SAPRFC

Image
This is simple and you don't have to install those development tools to run the code. Is just required Microsoft excel you can connect into your SAP R/3. No other tools required, no need the extra software installed and mainly is using Excel VBA run the code and you able to retrieve/import data on your SAP R/3 data. Required item: This is the items required to start your tutorial: Microsoft excel. SAP Login id and password. SAP program with remote function call. I will show your my customized RFC coding in my SAP ABAP. The RFC program name is "ZMM_PRPORS" SAP Gui installed One more setting you have to do before start the coding. You have to add SAP reference below: 1. Go to Developer tab -> Click the Visual Basic: 2. Go to Tools -> References 3. Click those SAP references show as below and click OK. Excel VBA Coding Double click on the sheet1 and pasted code below. Please fill in your SAP ip addres

Excel Macros for Live Stock List

Image
Here my new post on how to use excel macros to get stocks price. You can refer screen shot below, there's table on the stock name, pricing, volume and etc. I'll explain head and tail of how to build this excel macros. Step to get the stock price from internet Insert a button into the excel worksheet.(Developer->Insert Button) Create excel macros name after insert the button and edit text in button. Insert title into worksheet and click the  format as table . (Choose your format). The table format will look like below and insert code into macros.  Add winHttp in VBA references. (Tools > References) Insert macros code. Done. You can run you program now. If you any issue please drop me email. Macros Code: Sub btnRefresh_Click()      Dim W As Worksheet: Set W = ActiveSheet     'Find last row in worksheet     Dim Last As Integer: Last = W.Range("A1000").End(xlUp).Row     'Check any stock code in work

How to Create Sap Gui Scripting

Image
SAP GUI Scripting syntax similar like VBScript and you can used setup your testing data or data migration from legacy system to SAP. Is easy and less time to create sap gui scripting compared to LSMW. Sap Gui Scripting it can migrated master data and Transaction data as well. I will showed you how to create it. Here the step by step to create your sap gui script 1. Click on the Script Recording and Playback 2. Click on  More button, you can changed the filename and path. 3. Click on Record button and type "SU01" to lock user id. 4. Once you have completed then click Stop button. 5. Here the script you recorded. If Not IsObject(application) Then    Set SapGuiAuto  = GetObject("SAPGUI")    Set application = SapGuiAuto.GetScriptingEngine End If If Not IsObject(connection) Then    Set connection = application.Children(0) End If If Not IsObject(session) Then    Set session    = connection.Children(0) End If If IsObjec

Simple macros to re-arrange column into upload format

Image
Excel macros to re-arrange column from text file into rows format. Please watch the video below. 1.  Create 2 Macros name in you excel. 2.  All Macros code have to paste in  Module1. 3.  Copy Macros's code below. Sub Remove() '   Delete title line     Rows("1:5").Select     Selection.Delete Shift:=xlUp      '     For i = 1 To 9000         Range("A" & i).Select         If Left(ActiveCell.Value, 1) = "-" Then             Rows(i & ":" & i).Select             Selection.Delete Shift:=xlUp         End If     Next      '   Delete column B and D     Columns("B:B").Select     Selection.Delete Shift:=xlToLeft          Columns("D:D").Select     Selection.Delete Shift:=xlToLeft          Columns("F:F").Select     Selection.Delete Shift:=xlToLeft '   Paste title in Sheet2     Sheets("Sheet1").Select     Range("A1:A9&q