No video

SAP GUI Scripting - Order Creation from Excel

  Рет қаралды 48,492

Csongor Varga

Csongor Varga

Күн бұрын

This video provides and example of creating and order in VA01 from data stored in Excel. This is only a simple process to get the most important field of order populated, you most certainly need to enhance it to your needs.
GUI scripting allows external applications like MS Excel to connect to an existing GUI session and execute operations within the GUI. Excel does not hold and authorization and access information as it relies on you logging into SAP first.
Download the Excel file in this example from here:
drive.google.c...
Playlist of my SAP GUI scripting KZfaq playlist: • SAP GUI Scripting 1 - ...
All my GUI scripting files on Github (in case you cannot access the above link):
github.com/nyg...

Пікірлер: 118
@enochhepworth7207
@enochhepworth7207 Жыл бұрын
This is a fantastic resource! Thank you so much for sharing. I only wish I'd found this video before this weekend, I just finished writing my own version of this
@AmelyHAN
@AmelyHAN 3 жыл бұрын
Hi Csongor, I just replicate the process and created VBA to release work orders in CO40 and CO01.. Thank you. And thanks to other comments to help me figure out the system value.
@csongorvarga
@csongorvarga 3 жыл бұрын
Nice work. I am glad this helped.
@krzysztofdabkowski6883
@krzysztofdabkowski6883 5 жыл бұрын
Useful as always, I made few nice scripts in workplace thanks to your movies, many thanks ;)
@csongorvarga
@csongorvarga 5 жыл бұрын
I am glad you were able to re-use this concept.
@highestpoint574
@highestpoint574 5 жыл бұрын
well done. easy to interprete and learn from. Thank You
@ketuscorpion3717
@ketuscorpion3717 2 жыл бұрын
This is superb
@alteavanloggerenberg2464
@alteavanloggerenberg2464 10 ай бұрын
We actually encounter the credit limit error on a regular basis. We would then need to get credit limit approval from senior management, who then approve the sales order using the sales order # and then we would be able to proceed to the next step. The "On Error Resume Next" will work in this case, but we would then require a notification in the excel script stating "Credit Approval Required" so that staff know to request the approval.
@csongorvarga
@csongorvarga 10 ай бұрын
I assume you recorded the step when you press on the OK button on the credit limit pop-up message (or something similar). Or a similar message. What you can is add a statement: "If Not session.FindbyID(".......") Nothing Then " and so on. This checks if the OK button is not nothing (e.g. the OK button is visible) on the screen. And in that case you can add your message tot the Excel line.
@mannjatt100
@mannjatt100 3 жыл бұрын
Thank you for sharing ,very usefull
@katenguyen9409
@katenguyen9409 Жыл бұрын
This video is really...really helpful for users. Thanks a lot for that. Is it possible to get you to make another video of Delivery Order Creation?
@csongorvarga
@csongorvarga Жыл бұрын
I could, the problem is that I am a CRM person, and have no idea how Delivery Order works. Also I am not sure if the system I have access to is set up for sales orders.
@grivers88
@grivers88 7 жыл бұрын
Csongor, awesome stuff mate ....!Greg
@csongorvarga
@csongorvarga 7 жыл бұрын
Thanks Greg!
@finndethleff6224
@finndethleff6224 7 жыл бұрын
Hello Csongor,where to I find the name of the system to connect to? ("DEG210" in your case)I keep getting the error message "No active session to system XXX".Many thanks in advance!
@KAMINAHARAMILOL123
@KAMINAHARAMILOL123 3 жыл бұрын
Bottom bar, right corner, there will be 3 to 4 values, click DOWNWARD facing arrow, pick :SYSTEM value : for me it was "IRP (1) 320 ", so i took "IRP320"
@AmelyHAN
@AmelyHAN 3 жыл бұрын
@@KAMINAHARAMILOL123 Thanks. Your answer helped me to figure out my system value.
@Kashi_Gujjar_
@Kashi_Gujjar_ Жыл бұрын
I want to update SAP data from excel file for tcode MSC2N where I want to update the data for certain material/batches. I created file to Update MSC2N, but this is for one defined value only and not from excel Can you please to create excel which can pick data and update MSC2N like Date of Manufacturing, shelf life, vendor batch, country of origin
@henriqueproglhof7132
@henriqueproglhof7132 3 жыл бұрын
Great video once again. I've started watching your videos last month and it helped me a lot in my day to day tasks! I am curious to know more about you and your career. Any videos where you talk about your personal and professional experience related to programming and opportunities there may be for us who are interested in sap gui scripting?
@csongorvarga
@csongorvarga 3 жыл бұрын
Thanks. I am a SAP CRM consultant, and have been for 16 years now. Worked for big consulting firms in the past, lately as a freelancer and actually in between jobs at the moment. I never learned coding, but I started with Pascal, Delphi later Visual Basic, bit of embedded C, Javascript. Most of the programming experience is not related to work, but hobby or just wanting to do my professional work easier.
@loucruz5906
@loucruz5906 2 жыл бұрын
thank you
@19Aladdin97
@19Aladdin97 2 жыл бұрын
Hi I need help Urgently and I would really appreciate it I'm having issues with scrolling through the table to add new items while creating orders and adding items through va02 is there a way to fix this for further clarification I have 7 available tabs or blanks to insert the material code and quantity after they are done I can not scroll down to continue adding the other items and as a result I get an error I would appreciate your help
@riccardolore8785
@riccardolore8785 6 ай бұрын
Hi Csongor, I have adapted your code to my need for transaction VA01, however, I can't figure out how to go beyond 17 product lines. When I get to the seventeenth, it just goes to the top and comes back up, like a keyboard "page down". How could I modify the code for this need? I would have to enter orders of even 500 rows. Thank you very much because your code has been very helpful
@masca2154
@masca2154 4 жыл бұрын
Great Job @Csongor Varga.. Didn't thought that it's possible. Tried to do it and it works fine for some orders. On others i have issues with the credit limit popup and availability control screen. Do you know how I could solve them? How can I check if the credit limit popup showes up and if the availability control window opens... Thanks a lot
@csongorvarga
@csongorvarga 4 жыл бұрын
Probably the easiest option is that you record a script where there is a credit limit popup message. So pressing on the OK button in the pop-up is also recorded. In the code where the GUI script starts you add a line which says "On error resume next". This will simply ignore all errors in the VBA code. So if the pop-up is shown your line which acknowledges the pop-up will be executed, in other cases it will be just ignored and the execution continues. Of course this will happen for any other errors as well. Alternatively you can check if the object for the pop-up OK button exists with an if statement like "if objsess.FindbyID("xxxxxx") is nothing than objsess.FIndbyID("xxxx").Press end if" so something similar. I just wrote it from memory did not check what the correct syntax is.
@mohammadsuheb.l9872
@mohammadsuheb.l9872 Жыл бұрын
How to set date from - to in excel and what's the code i have to add ?
@sebastianvaazquez4181
@sebastianvaazquez4181 2 жыл бұрын
Hello Csongor thank you for your great video! im new making this combination of scripting and VBA and i have some doubs hope you can help me with this. 1 i put my system value but it still says : "No active session to system QAT9200, or scriptiong is not enabled". The i click "ok" and it says O bject variable or with blocj variable not set ( i have my SAP GUI Scripting API enabled and the recording scripting on) 2. the script that you uploas on your drive thoes it only works with two line items? THANK YOU VERY VERY MUCH FOR YOUR ATTENTION AND YOUR INCREDIBLE VIDEOS
@csongorvarga
@csongorvarga 2 жыл бұрын
Hi Sebastian I think that Id is incorrect the sid is usually 3 letters and client is 3 digits. So it is most probably QAT920 or similar. But it is still possie that scripting is not enabled at all in the client.
@sebastianvaazquez4181
@sebastianvaazquez4181 2 жыл бұрын
@@csongorvarga ooooh thank you very very much its now working. Again Thank you for your videos and taking the time to answer me
@sebastianvaazquez4181
@sebastianvaazquez4181 2 жыл бұрын
Hello Sir again me, the script is giving an error when its the turn to add de items, do you know what can be happen?
@csongorvarga
@csongorvarga 2 жыл бұрын
@@sebastianvaazquez4181 Where is the error coming from? What do you see on the SAP screen? Maybe your SAP has some custom logic that shows and error message, or expects some more data to be added which the script is not designed to handle.
@sahilhala6393
@sahilhala6393 9 ай бұрын
Hello Cna you also advise if we cna create multiple order by this, like put all sold and ship to and running the script ones and SAP wil create all orders ? like in bulk
@csongorvarga
@csongorvarga 9 ай бұрын
Yes, you would need to put the entire logic into a big loop and use something in Excel for the code to know when the line items stop and next line if for a new order.
@aabhijitranjandas2249
@aabhijitranjandas2249 7 жыл бұрын
I m trying to record IW32 in load runner but when I am adding a material and replaying the script then it is showing an error " fail to read the data from table parameter data " can anyone help me out in this
@13royalknight
@13royalknight 2 жыл бұрын
Can u teach on ima11 tcode... I got some error over there... I don't have basic in scripting but I still learning
@hopethedream
@hopethedream 6 жыл бұрын
how to overcome if there are pop up window, which needs our action to click OK or YESmultiple times. this is not recorded in through recorder.
@csongorvarga
@csongorvarga 6 жыл бұрын
You need to record it at least once so you know the code for pressing OK or Yes. And you can reuse the same line multiple times in the code. You can add line 'On Error Resume Next' which will not make the code to fail if a line fails (for example if there is no pop-up) and will just continue with the next line.
@babukarthik1900
@babukarthik1900 5 жыл бұрын
Hi sir.....I'm trying to create the script but I'm receiving an error no 13 typo miss pls help on this
@tpdakc7904
@tpdakc7904 4 жыл бұрын
please .how to know btn [?] in sap gui? Please guide the people to help me
@SandeepSingh-xg6sz
@SandeepSingh-xg6sz 5 жыл бұрын
Please help. When i try to record steps then after stop recording when i open saved script file it only shows only first step after thst it doesnt record any steps.. Please me why
@csongorvarga
@csongorvarga 5 жыл бұрын
This is SAP GUI scripting. The Open, Save, Print dialogs are Windows dialog boxes, those will never be scripted. There is a "Show Native Microsoft WIndows Dialogs" in SAP GUI Options under Scripting. Uncheck that. If that does not help, I am out of ideas.
@user-wl9ir4pc6f
@user-wl9ir4pc6f 4 күн бұрын
Hi cosongor, i need your assistance, because I am facing error, and I need your help
@csongorvarga
@csongorvarga 4 күн бұрын
@@user-wl9ir4pc6f what is your issue?
@adilshaikh452
@adilshaikh452 3 жыл бұрын
Hi Csongor, What if I want to add a product ID in the same T-code where some of the had already written. Basically I want to count the number of rows which has product Id in Sap already and to add this new ID from Excel to the last row....
@csongorvarga
@csongorvarga 3 жыл бұрын
Put a breakpoint in your code and check the item list view. It has properties like the max lines and you can dynamically add the new product to maxlines+1
@abaidaramex2818
@abaidaramex2818 7 жыл бұрын
sir i will wait for your next videos,upload for LT31 printing TOs
@alteavanloggerenberg2464
@alteavanloggerenberg2464 6 ай бұрын
Hi, I have managed to get the code to work for my application on multiple line uploads. Thanks this is a great start and help. We have to additional steps on the material code upload, which is availability check and pricing upload per line item. I have two options that I'm currently trying, 1. single line selection and then price input, after each line. 2. Complete all line uploads, select ALL and input pricing then. In both scenario's I'm hitting a wall that I'm unable to navigate. Can you possbly assist with this part? This also has another problem in the cell text format that inputs the value with comma and not dot (SAP does take comma and I cannot change the format in the cell), not sure how to navigate this issue as well. Any assistance would be greatly appreciated.
@csongorvarga
@csongorvarga 6 ай бұрын
For the dot/comma problem you can use the Replace function. In the place where you assign the text to the SAP field, try Replace(yourvalue, ",", "."). That will replace the commas with dots and enter it that into SAP.
@alteavanloggerenberg2464
@alteavanloggerenberg2464 6 ай бұрын
Hi, thank you for replying. I will look at your comma/dot idea. Can you possibly assist with the other issues I have also picked up the loop runs well until line 13 and then it stops working. In the SAP window after line 13 is entered the window scrolls up so that line 13 is at the top and the next 12 empty lines are available at the bottom, not sure if this could be the cause. I will pay you for your time, as I'm really a beginner in coding. I'm also not sure how to navigate the message prompts with various parameters that are variables not constants. @@csongorvarga
@csongorvarga
@csongorvarga 6 ай бұрын
@@alteavanloggerenberg2464 I got it working. I created a script that created an order with 20 line items. The trick is that main table control has a VerticalScrollbar.Position propery. I updated that with the line item number and it scrolls the table so the new line is always on the first line. And in the rest of the code you can enter the line item details (product, quantity, price, etc. on the first line.
@csongorvarga
@csongorvarga 6 ай бұрын
Check this file: github.com/nygma2004/km/blob/main/VA01%20scrolling.xlsm
@csongorvarga
@csongorvarga 6 ай бұрын
Please note that the ID for the table control is different from the field within the table control which is captures by script recording when you enter the data.
@emolinamrtz
@emolinamrtz 7 жыл бұрын
Hi Csongor Do you know how to do the same for multiple lines in a single Purchase order, i mean create a PO with multiple lines
@csongorvarga
@csongorvarga 7 жыл бұрын
I have not used the PO transaction, but it should follow the same logic
@andrescarphio8018
@andrescarphio8018 3 жыл бұрын
Great Videos...is there possible to create a excel macro to create a PR(purchase requisiton) in SAP.
@csongorvarga
@csongorvarga 3 жыл бұрын
Any GUI transaction can be scripted. So yes.
@Vishal-yi9jo
@Vishal-yi9jo 6 жыл бұрын
Need to talk to you as i do create sales order in VA 01 and then change it again in VA 02 , i want make a script which will work on VA02 pls help me with solution thanks in advance
@csongorvarga
@csongorvarga 6 жыл бұрын
This whole video (and others in this playlist) is about making such Excel files. You record your steps in script recording and import the code to Excel.
@Vishal-yi9jo
@Vishal-yi9jo 6 жыл бұрын
Csongor Varga thanks but i did what you said may be i am wrong somewhere, need to create the same.. When we can have a talk on call or skype pls let me know.. Thanks
@coolcool_analytica
@coolcool_analytica 6 жыл бұрын
I Csongor, I tried creating order exactly same, the loop worked perfectly fine for 1st line but it is throwing error on second iterations, Pls help
@csongorvarga
@csongorvarga 6 жыл бұрын
I can't help, I don't see your screen I don't have access to the system. You need to put a breakpoint in the code in Excel and debug through the steps to see what is going wrong. Maybe there is a pop-up screen or anything which stops the script from accessing the fields again.
@coolcool_analytica
@coolcool_analytica 6 жыл бұрын
Here is the piece of code, I tried debugging it by f8, it completes 1st iterations perfectly on second iterations it through error starting from first line item, Pls help thanks in advance Public Sub RunGUIScript() Dim W_Ret As Boolean Dim PO As String Dim i As Integer Dim j As Integer Dim k As Integer ' Connect to SAP W_Ret = Attach_Session If Not W_Ret Then Exit Sub End If On Error GoTo myerr i = 0 j = 1 k = 6 session.FindById("wnd[0]").maximize session.FindById("wnd[0]/tbar[0]/okcd").Text = "ME21N" session.FindById("wnd[0]").sendVKey 0 session.FindById("wnd[0]/usr/subSUB0:SAPLMEGUI:0013/subSUB0:SAPLMEGUI:0030/subSUB1:SAPLMEGUI:1105/ctxtMEPO_TOPLINE-SUPERFIELD").Text = "112280" session.FindById("wnd[0]/usr/subSUB0:SAPLMEGUI:0013/subSUB0:SAPLMEGUI:0030/subSUB1:SAPLMEGUI:1105/ctxtMEPO_TOPLINE-SUPERFIELD").SetFocus session.FindById("wnd[0]/usr/subSUB0:SAPLMEGUI:0013/subSUB0:SAPLMEGUI:0030/subSUB1:SAPLMEGUI:1105/ctxtMEPO_TOPLINE-SUPERFIELD").caretPosition = 6 session.FindById("wnd[0]").sendVKey 0 session.FindById("wnd[0]/usr/subSUB0:SAPLMEGUI:0013/subSUB1:SAPLMEVIEWS:1100/subSUB2:SAPLMEVIEWS:1200/subSUB1:SAPLMEGUI:1102/tabsHEADER_DETAIL/tabpTABHDT1/ssubTABSTRIPCONTROL2SUB:SAPLMEGUI:1226/ctxtMEPO1226-ZTERM").Text = "ZSO4" session.FindById("wnd[0]/usr/subSUB0:SAPLMEGUI:0013/subSUB1:SAPLMEVIEWS:1100/subSUB2:SAPLMEVIEWS:1200/subSUB1:SAPLMEGUI:1102/tabsHEADER_DETAIL/tabpTABHDT1/ssubTABSTRIPCONTROL2SUB:SAPLMEGUI:1226/ctxtMEPO1226-ZTERM").SetFocus session.FindById("wnd[0]/usr/subSUB0:SAPLMEGUI:0013/subSUB1:SAPLMEVIEWS:1100/subSUB2:SAPLMEVIEWS:1200/subSUB1:SAPLMEGUI:1102/tabsHEADER_DETAIL/tabpTABHDT1/ssubTABSTRIPCONTROL2SUB:SAPLMEGUI:1226/ctxtMEPO1226-ZTERM").caretPosition = 4 session.FindById("wnd[0]").sendVKey 0 While Cells(k + i, 1).Value "" session.FindById("wnd[0]/usr/subSUB0:SAPLMEGUI:0013/subSUB2:SAPLMEVIEWS:1100/subSUB2:SAPLMEVIEWS:1200/subSUB1:SAPLMEGUI:1211/tblSAPLMEGUITC_1211/ctxtMEPO1211-EMATN[4," & i & "]").Text = Cells(k, 1).Value session.FindById("wnd[0]/usr/subSUB0:SAPLMEGUI:0013/subSUB2:SAPLMEVIEWS:1100/subSUB2:SAPLMEVIEWS:1200/subSUB1:SAPLMEGUI:1211/tblSAPLMEGUITC_1211/ctxtMEPO1211-EMATN[4," & i & "]").SetFocus session.FindById("wnd[0]/usr/subSUB0:SAPLMEGUI:0013/subSUB2:SAPLMEVIEWS:1100/subSUB2:SAPLMEVIEWS:1200/subSUB1:SAPLMEGUI:1211/tblSAPLMEGUITC_1211/ctxtMEPO1211-EMATN[4," & i & "]").caretPosition = 0 session.FindById("wnd[0]").sendVKey 0 session.FindById("wnd[0]").sendVKey 0 session.FindById("wnd[0]/usr/subSUB0:SAPLMEGUI:0010/subSUB2:SAPLMEVIEWS:1100/subSUB2:SAPLMEVIEWS:1200/subSUB1:SAPLMEGUI:1211/tblSAPLMEGUITC_1211/txtMEPO1211-MENGE[6," & i & "]").Text = Cells(k, 2).Value session.FindById("wnd[0]/usr/subSUB0:SAPLMEGUI:0010/subSUB2:SAPLMEVIEWS:1100/subSUB2:SAPLMEVIEWS:1200/subSUB1:SAPLMEGUI:1211/tblSAPLMEGUITC_1211/ctxtMEPO1211-EEIND[9," & i & "]").Text = Cells(k, 3).Value session.FindById("wnd[0]/usr/subSUB0:SAPLMEGUI:0010/subSUB2:SAPLMEVIEWS:1100/subSUB2:SAPLMEVIEWS:1200/subSUB1:SAPLMEGUI:1211/tblSAPLMEGUITC_1211/ctxtMEPO1211-EEIND[9," & i & "]").SetFocus session.FindById("wnd[0]/usr/subSUB0:SAPLMEGUI:0010/subSUB2:SAPLMEVIEWS:1100/subSUB2:SAPLMEVIEWS:1200/subSUB1:SAPLMEGUI:1211/tblSAPLMEGUITC_1211/ctxtMEPO1211-EEIND[9," & i & "]").caretPosition = 10 session.FindById("wnd[0]").sendVKey 0 session.FindById("wnd[0]/usr/subSUB0:SAPLMEGUI:0010/subSUB2:SAPLMEVIEWS:1100/subSUB2:SAPLMEVIEWS:1200/subSUB1:SAPLMEGUI:1211/tblSAPLMEGUITC_1211/ctxtMEPO1211-NAME1[15," & i & "]").Text = Cells(k, 4).Value session.FindById("wnd[0]/usr/subSUB0:SAPLMEGUI:0010/subSUB2:SAPLMEVIEWS:1100/subSUB2:SAPLMEVIEWS:1200/subSUB1:SAPLMEGUI:1211/tblSAPLMEGUITC_1211/ctxtMEPO1211-NAME1[15," & i & "]").SetFocus session.FindById("wnd[0]/usr/subSUB0:SAPLMEGUI:0010/subSUB2:SAPLMEVIEWS:1100/subSUB2:SAPLMEVIEWS:1200/subSUB1:SAPLMEGUI:1211/tblSAPLMEGUITC_1211/ctxtMEPO1211-NAME1[15," & i & "]").caretPosition = 4 session.FindById("wnd[0]").sendVKey 0 session.FindById("wnd[0]/usr/subSUB0:SAPLMEGUI:0010/subSUB2:SAPLMEVIEWS:1100/subSUB2:SAPLMEVIEWS:1200/subSUB1:SAPLMEGUI:1211/tblSAPLMEGUITC_1211/txtMEPO1211-NETPR[10," & i & "]").Text = Cells(k, 6).Value session.FindById("wnd[0]/usr/subSUB0:SAPLMEGUI:0010/subSUB3:SAPLMEVIEWS:1100/subSUB2:SAPLMEVIEWS:1200/subSUB1:SAPLMEGUI:1301/subSUB1:SAPLMEGUI:6000/cmbDYN_6000-LIST").SetFocus session.FindById("wnd[0]/usr/subSUB0:SAPLMEGUI:0010/subSUB3:SAPLMEVIEWS:1100/subSUB2:SAPLMEVIEWS:1200/subSUB1:SAPLMEGUI:1301/subSUB2:SAPLMEGUI:1303/tabsITEM_DETAIL/tabpTABIDT6").Select session.FindById("wnd[0]/usr/subSUB0:SAPLMEGUI:0019/subSUB3:SAPLMEVIEWS:1100/subSUB2:SAPLMEVIEWS:1200/subSUB1:SAPLMEGUI:1301/subSUB2:SAPLMEGUI:1303/tabsITEM_DETAIL/tabpTABIDT7").Select session.FindById("wnd[0]/usr/subSUB0:SAPLMEGUI:0015/subSUB3:SAPLMEVIEWS:1100/subSUB2:SAPLMEVIEWS:1200/subSUB1:SAPLMEGUI:1301/subSUB1:SAPLMEGUI:6000/cmbDYN_6000-LIST").SetFocus session.FindById("wnd[0]/usr/subSUB0:SAPLMEGUI:0015/subSUB3:SAPLMEVIEWS:1100/subSUB2:SAPLMEVIEWS:1200/subSUB1:SAPLMEGUI:1301/subSUB1:SAPLMEGUI:6000/cmbDYN_6000-LIST").Key = " " & j & "" session.FindById("wnd[0]/usr/subSUB0:SAPLMEGUI:0015/subSUB3:SAPLMEVIEWS:1100/subSUB2:SAPLMEVIEWS:1200/subSUB1:SAPLMEGUI:1301/subSUB2:SAPLMEGUI:1303/tabsITEM_DETAIL/tabpTABIDT7/ssubTABSTRIPCONTROL1SUB:SAPLMEGUI:1317/ctxtMEPO1317-MWSKZ").Text = Cells(k, 7).Value session.FindById("wnd[0]/usr/subSUB0:SAPLMEGUI:0015/subSUB3:SAPLMEVIEWS:1100/subSUB2:SAPLMEVIEWS:1200/subSUB1:SAPLMEGUI:1301/subSUB2:SAPLMEGUI:1303/tabsITEM_DETAIL/tabpTABIDT7/ssubTABSTRIPCONTROL1SUB:SAPLMEGUI:1317/ctxtMEPO1317-MWSKZ").SetFocus session.FindById("wnd[0]/usr/subSUB0:SAPLMEGUI:0015/subSUB3:SAPLMEVIEWS:1100/subSUB2:SAPLMEVIEWS:1200/subSUB1:SAPLMEGUI:1301/subSUB2:SAPLMEGUI:1303/tabsITEM_DETAIL/tabpTABIDT7/ssubTABSTRIPCONTROL1SUB:SAPLMEGUI:1317/ctxtMEPO1317-MWSKZ").caretPosition = 2 session.FindById("wnd[0]").sendVKey 0 session.FindById("wnd[0]/usr/subSUB0:SAPLMEGUI:0015/subSUB3:SAPLMEVIEWS:1100/subSUB2:SAPLMEVIEWS:1200/subSUB1:SAPLMEGUI:1301/subSUB2:SAPLMEGUI:1303/tabsITEM_DETAIL/tabpTABIDT3").Select session.FindById("wnd[0]/usr/subSUB0:SAPLMEGUI:0015/subSUB3:SAPLMEVIEWS:1100/subSUB2:SAPLMEVIEWS:1200/subSUB1:SAPLMEGUI:1301/subSUB1:SAPLMEGUI:6000/cmbDYN_6000-LIST").SetFocus session.FindById("wnd[0]/usr/subSUB0:SAPLMEGUI:0015/subSUB3:SAPLMEVIEWS:1100/subSUB2:SAPLMEVIEWS:1200/subSUB1:SAPLMEGUI:1301/subSUB1:SAPLMEGUI:6000/cmbDYN_6000-LIST").Key = " " & j & "" session.FindById("wnd[0]/usr/subSUB0:SAPLMEGUI:0015/subSUB3:SAPLMEVIEWS:1100/subSUB2:SAPLMEVIEWS:1200/subSUB1:SAPLMEGUI:1301/subSUB2:SAPLMEGUI:1303/tabsITEM_DETAIL/tabpTABIDT3/ssubTABSTRIPCONTROL1SUB:SAPLMEVIEWS:1102/subSUB1:SAPLMEGUI:1319/txtMEPO1319-IDNLF").Text = Cells(k, 8).Value session.FindById("wnd[0]/usr/subSUB0:SAPLMEGUI:0015/subSUB3:SAPLMEVIEWS:1100/subSUB2:SAPLMEVIEWS:1200/subSUB1:SAPLMEGUI:1301/subSUB2:SAPLMEGUI:1303/tabsITEM_DETAIL/tabpTABIDT3/ssubTABSTRIPCONTROL1SUB:SAPLMEVIEWS:1102/subSUB1:SAPLMEGUI:1319/txtMEPO1319-IDNLF").SetFocus session.FindById("wnd[0]/usr/subSUB0:SAPLMEGUI:0015/subSUB3:SAPLMEVIEWS:1100/subSUB2:SAPLMEVIEWS:1200/subSUB1:SAPLMEGUI:1301/subSUB2:SAPLMEGUI:1303/tabsITEM_DETAIL/tabpTABIDT3/ssubTABSTRIPCONTROL1SUB:SAPLMEVIEWS:1102/subSUB1:SAPLMEGUI:1319/txtMEPO1319-IDNLF").caretPosition = 5 session.FindById("wnd[0]").sendVKey 0 session.FindById("wnd[0]/usr/subSUB0:SAPLMEGUI:0015/subSUB3:SAPLMEVIEWS:1100/subSUB2:SAPLMEVIEWS:1200/subSUB1:SAPLMEGUI:1301/subSUB2:SAPLMEGUI:1303/tabsITEM_DETAIL/tabpTABIDT3/ssubTABSTRIPCONTROL1SUB:SAPLMEVIEWS:1102/subSUB1:SAPLMEGUI:1319/txtMEPO1319-EAN11").Text = Cells(k, 5).Value i = i + 1 j = j + 1 k = k + 1 Wend
@csongorvarga
@csongorvarga 6 жыл бұрын
IDon't understand your code too much, as I don't see how your excel looks like or what are you trying to do in ME21N. I don't know ECC much. I am not sure why you are incrementing i, j and k as well in the loop. But that could be OK. Are you sure you are using your variables correctly? For example in the first line of the loop you are accessing a field using variable i, but the value depends on variable k.
@coolcool_analytica
@coolcool_analytica 6 жыл бұрын
Likewise in your video cell value is in 12, my cell value is starting from 6 and I have assigned it to k with value 6, I is for row 0 to n with initial value 0 and j is for selecting line item and puting tax code under it
@archiegupta3857
@archiegupta3857 6 жыл бұрын
Hello, I am working for a client where we access through Citrix, that means we are accessing a different system. Now if I have this excel with vb script in my system it won't work in Citrix SAp right ?
@csongorvarga
@csongorvarga 6 жыл бұрын
No, it will not work. Unless your Citrix connects to a complete virtual machine. When you are accessing separate apps via Citrix, it will not work.
@archiegupta3857
@archiegupta3857 6 жыл бұрын
Got it. Thanks Sir !
@babukarthik1900
@babukarthik1900 5 жыл бұрын
How we will connect to cutrix
@ABHISHEKKUMAR-ie6xs
@ABHISHEKKUMAR-ie6xs 2 жыл бұрын
I am interested for this projects
@marissaluna9797
@marissaluna9797 6 жыл бұрын
Hello, do you hace any explanation on how change po dates ones Po was created?
@kpk9311
@kpk9311 5 жыл бұрын
Hi Csongor, Am using the recorded GUI scripting and trying to paste the status bar string back to my excel. But whenever the script reaches the comand to where it has to paste the status bar msg into the excel sheet...my SAP is showing an error message as unable to write on read only file. What could be the reason and how can I overcome it.... Your earliest reply will be appriciated.
@csongorvarga
@csongorvarga 5 жыл бұрын
Uh, I have never seen that before. What is the exact error message? It is possible that the cells are write protected?
@kpk9311
@kpk9311 5 жыл бұрын
Thank you so much for reverting, Well am not a GUI Scrpting expert..but trying to learn slowly.... I wanted to extend my part location with TCode - MM02.. I had aroud 57 parts which need to be extended....so instead of doing one by one I recorded the script...and used to for doing my required task for these 57 parts. My script is able to read the parts from excel ...but unable to write on it...... And showing message as ..."unable to write on read only"......is this because am using recorded script..and my script is opening the excel file in backgroud. Is there a way to overcome this error. 🙁🙁
@csongorvarga
@csongorvarga 5 жыл бұрын
@@kpk9311 What is the line where you are getting the errors? Something like xxx.Cells(a,b).Value = objSess.FindById("wnd[0]/sbar").Text?
@kpk9311
@kpk9311 5 жыл бұрын
@@csongorvarga On the below line Session.FindById("wnd[0]/sbar/").text = MsgText ObjSheet.Cells(i,2) = MsgText.
@csongorvarga
@csongorvarga 5 жыл бұрын
@@kpk9311 oh yes, in the first statement you are trying to write to the status bar. It should be the other way around: MsgText = Session.FindById("wnd[0]/sbar/").text ObjSheet.Cells(i,2).Value = MsgText. Or simply do it in one line: ObjSheet.Cells(i,2).Value = Session.FindById("wnd[0]/sbar/").text And also the text goes into the .Value property of the Cells object. So that was missing as well.
@dpworld7714
@dpworld7714 6 жыл бұрын
could u pls tell me how to get the w_system id that u have mentioned DEG210
@csongorvarga
@csongorvarga 6 жыл бұрын
You should see that in the status bar. Where it shows the session or transaction code. You can click there and see the SID and client.
@KAMINAHARAMILOL123
@KAMINAHARAMILOL123 3 жыл бұрын
Bottom bar, right corner, there will be 3 to 4 values, click DOWNWARD facing arrow, pick :SYSTEM value : for me it was "IRP (1) 320 ", so i took "IRP320"
@ganimedero
@ganimedero 6 жыл бұрын
Hi Csongor I have managed to adapt this script to ME31K creation of contracts, the only issue I am facing now is that the script ends after 27 entries in the Excel ( I have over 400) and it seems like it is related to the SAP GUI Scrolling, as the SAP screen has only 27 entries possible in the active screen. My problem is that I can't find a way to do like a Page Down or Scroll a few rows down and continue inputting the data. Do you have any idea of how this could be accomplished? Thank you
@csongorvarga
@csongorvarga 6 жыл бұрын
Sorry, I don't know ME31K enough. What is it you are entering which has 400 lines? I am pretty sure you can script a pagedown or other similar action. Maybe it will be easier to copy all 400 lines into the clipboard and paste that into Excel. This of course only works for simple lists like a list of 400 document numbers to be pasted into the selection screen of se16.
@ganimedero
@ganimedero 6 жыл бұрын
Csongor Varga Hi Csongor, It is like creating orders in va01, just that when my current screen has all item lines entries filled in the active screen it expects to do a page down or scroll which seems to actually make the script not working.
@ganimedero
@ganimedero 6 жыл бұрын
Csongor Varga Basically I am inputting from excel the MATNR, Material description and a price in the line items of the document. Nothing that I couldn't handle. The scroll part is the one creating problems.
@csongorvarga
@csongorvarga 6 жыл бұрын
I don't have a system where I could test this out, but what do you see when you create a recording where you press the page down or scroll button? Maybe a workaround will be that you press enter after entering every single line?
@ganimedero
@ganimedero 6 жыл бұрын
Pressing Enter is already implemented, I have found the following line in one of my recorded scripts where I have clicked on the scroll bar, session.findById("wnd[0]/usr/tblSAPMM06ETC_0220").verticalScrollbar.position = 26, tried working with it but still after the line item counter gets to 27, it seems like the new item line screen is not active or the connection needs to be reestablished.
@gogojo70
@gogojo70 5 жыл бұрын
Will this work in SAP HANA too?
@csongorvarga
@csongorvarga 5 жыл бұрын
It works with anything that is accessed via SAP GUI. Will not work with the Fiori interface.
@abaidaramex2818
@abaidaramex2818 7 жыл бұрын
sir please upload LT31 multiple TO printing
@csongorvarga
@csongorvarga 7 жыл бұрын
I am not doing these on demand. Develop your own app based on the technique shown here.
@abaidaramex2818
@abaidaramex2818 7 жыл бұрын
Sir i try but didn't get success. Please sir
@csongorvarga
@csongorvarga 7 жыл бұрын
Abaid Aramex I don't have access to any SAP system at the moment. I cannot build new macros right now.
@shradhakadam2623
@shradhakadam2623 2 жыл бұрын
How did you create that UI
@csongorvarga
@csongorvarga 2 жыл бұрын
Which UI?
@csongorvarga
@csongorvarga 2 жыл бұрын
@@shradhakadam2623 It is Microsoft Excel
@shradhakadam2623
@shradhakadam2623 2 жыл бұрын
@@csongorvarga I have a database. I want to create an user interface in excel where I will be able to fetch data just by entering the PO number. And then I want to connect it to SAP
@shradhakadam2623
@shradhakadam2623 2 жыл бұрын
@@csongorvarga could you please give me your email address?? I need help with this.
@shradhakadam2623
@shradhakadam2623 2 жыл бұрын
@@csongorvarga so you didn't use developer tool in excel??
SAP GUI Scripting 1 - Running scripts from Excel
47:34
Csongor Varga
Рет қаралды 440 М.
SAP GUI Scripting Tricks, Tips and Basics
27:51
Csongor Varga
Рет қаралды 165 М.
黑天使遇到什么了?#short #angel #clown
00:34
Super Beauty team
Рет қаралды 44 МЛН
Joker can't swim!#joker #shorts
00:46
Untitled Joker
Рет қаралды 39 МЛН
Harley Quinn's revenge plan!!!#Harley Quinn #joker
00:59
Harley Quinn with the Joker
Рет қаралды 24 МЛН
Automate Data Extraction with SAP GUI Scripting & Excel Macro VBA [english]
14:20
SAP & Excel - 10 SAP GUI Scripting Tips 🚀
27:37
ERP UP
Рет қаралды 2,1 М.
Taking SAP screenshots with GUI Scripting
34:52
Csongor Varga
Рет қаралды 19 М.
SAP Function BAPI Scripting - Calling RFC FM from Excel
25:55
Csongor Varga
Рет қаралды 23 М.
Log into SAP from Excel with SAP GUI Scripting API
8:58
ERP UP
Рет қаралды 1,9 М.
SAP to multiple Excel files using SAP GUI Scripting
19:04
Which Database Model to Choose?
24:38
High-Performance Programming
Рет қаралды 51 М.
黑天使遇到什么了?#short #angel #clown
00:34
Super Beauty team
Рет қаралды 44 МЛН