SAP Automation with Power Automate Desktop (Full Tutorial)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello I'm Marcel and be welcome to my Channel today we will learn about how to automate SCP with power automate desktop so just before getting started let's take a brief look about what Will automate on SAP with power automate desktop so we'll create an automation that will create purchase orders on sap so it will open sap and do the login then it will execute the transaction code me21n so we navigate to the page from where we can create pet orders and then when we are here on the create pet order page the bot will read data from an Excel file which is needed to create the purchase order so we'll fill the vendor on the field bender and then on this case uh we should have here on the sap table two lines with the data uh that we can see here on material po quantity and net price and after that create the purchase order by clicking here on this button and then close sap and that's basically it so let's get started on learning about sap automation with power automate desktop first things first in order to be able to automate SCP we need to enable sap scripting to enable it here on the SCP login window we can see here on the top this button so let's click on it and then click on options and then here let's open accessibil is scripting and click on scripting and let's check here the checkbox for enable scripting and now make sure these two check boxes are disabled so we don't get notified when the script is running on sap so now let's click on apply and press okay and now that we have sap available to be automated let's create a new FL on par my desktop so let's click here on new flow and let's define the flow name sap purchase order creation and let's click on create so here we have the flow created so which is the first action that tobot should do to automate sap so the first action will be to open and log in on sap and for that we have a specific action on power out made desktop so if we search here on actions for sap we can see actions that are specifically done to W sap and we'll use the loue sap1 to open and log in on sap so let's rack the loue sap action into ourf flow now we have to provide some details to this action that are specifically about login into sap so connection mode will use server description and login mode will use manual login we have also the SSO option which doesn't require to provide a password then we have to provide the server description and we can find it on sap log on so when we start sap we can see on the right side the added connections and here we can see the name of these connections and so it's the name that we have to provide here on server description so in my case it's sap then the client so here we provide the client that we use when we log in into sap system so in my case it's 880 then the username that we used to log in then the password and then the language that we use to log in into sap and that's basically it so now let's save and let's see how it's running so it should start sap and log in so I just closed sap so now I'll run the flow so here we can see that SCP was opened so now should be done the login on SCP and here we can see that it worked so our B our flow opened SCP and did login into the sap system so after opening and logging into sap our flow should execute the me21 transaction code so we navigate to the create purchase order page so how we can do that on par B desktop fortunately we have a specifically designed action to execute transactions we sh the action start SCP transaction so let's rug it to our flow and so uh we just have to provide the transaction code which is me21n so let's save and let's run so I'll just close again sap and run the flow again so sap is starting now will be done the login and here we can see that was executed the transaction and now here we are on the cre purchase order page so now that the bot navigates to the cre purchase order page it should read the Excel file which has the data needed to create the purchase order so to read the Excel file first we need to use the launch Excel action and indicate to the action the Excel file to use so let's indicate it and let's press save and then let's indicate the action to perform on these Excel file so we want to read the data from the file so we'll use the read from Excel worksheet action and so here on retrieve let's just select uh all available values from worksheet so we read the W worksheet data and now let's click on advaned and indicate that the first line of range contains column names which is true so we can see the first lines it's the column headers so let's mark this option as true and let's click on Save and then after reading the Excel file we can close it by using the close Excel action so so let's click on Save and so after having the data from the Excel file which will be on the Excel data variable we need to create a loop for each row of our Excel file so then we will insert the bender and also for each row we insert the matal PO quantity and net price on the sap table so we'll use the Farish Loop to create a loop for each row of the Excel data variable so now that we have a look for each row of the Excel file first we need to fill the Bender field on sap so we can see that we have the bender on one of the rows only so on parate desktop we will have a condition that if the Bender from the current row on the loop is not temped we will fill the banner field else we will do nothing to the field so here let's add a if action inside of the forish loop and now here are the conditions so if the current item so the current data row on the loop on the column Bender so here we have to put uh the name s is on Excel so if the value for the column bender on the current row it's not empty so here we select is not empty we'll F the value on the Bender field on sap so for that we'll use the populate action from y Automation and now here so we have to indicate the element so to indicate it first let's over it and now let's press control and do a left click and so we have indicated the helmet and now the text to fill in to fill on the field so will be the text that is on the row at the column Bender so let's indate that and that's it so let's save and let's run the flow so just to aoid to have to close sap so then the flow opens and does log into the sap system let's disable just for now the launch sap action and then just before the start SCP transaction action let's use the attach action and with the attach mode as window title let's select here the window title which will be create purchase order so this is the window title when we have SCP on the create purchase order page so let's save and that's it so now we don't have to close sap so let's just run the flow and here we can see that was filled the banner on the banner field so it's working properly it's working as expected the flow so here we can see that execution ended so now we have to set up uh the filling of the sap table so fill the material po quantity and net price for each row of the Excel file so here on power autate desktop let's use again the populate text action from UI automation so let's rck it after the if action so let's decate first the material uh Fields so here let's click on ADD y helmet and let's just indicate the material at the first line on the sap table and now let's indate the text to fill in so it comes on the current item so on the row at the column material so the value it's on the column material and so now let's save and that's it for the material so now let's add another populate text action for the PO quantity so let's have a new y helmet indicate po quantity at the first line of the sap table and now so the text to fill in it's also on the current item at the column po quantity so I'll just copy here the column name and paste here let's save and now we just need to drag another po Tex field action now for the net price so let's add a new y helmet indicate the net price and now text to fill in again current item and now on the column so the value it's at the column net price so let's paste that inside of the quotes and let's save so let's see how it's running our flow so let's run it so here we can see that the flow is filling the material po quantity and net price for each row of the Excel file however the flow it's always writing on the first row of the sap table and it should instead for each row of power Excel file add a new row here on the sap table so we should end up here with two rows filled on this table so how we can make the bottle dynamically add jump to the next row on this sap table for each row of our Excel file so we must use Dynamic selectors so let's just take a look to the selector for the material fi at the first world so here on part my desktop let's open the Y helmets panel my clicking here and now here we can see the Y helmets that we have headed so this one it's for the material so let's just rename it to be more readable so let's have here material and now let's do a double click on the Y helmet so we can see the selector that is being used to Target the field and else we can did a selector so in our case to be dynamic and so in such a way that forish row of the Excel file we will jump to the next row on the sap table so here we can see the full selector that is being used to find the material field on the sap table at the first row so here on this list we can see here the specific ID attribute that is being used to Target the field and so here in the hand we can see these two numbers a four and a zero and so this is about the four is a column to Target the column index and the zero it's the row index so the zero it's first row then the second row is the index one and so on and the columns follows the same logic so this is the column number five so 1 2 3 four and five so the index is it's the index number four and this means that we find a way to increase uh the row index number dynamically for each row we can always jump to the next row for each row that we have on our Excel file and now we can do that so first let's create a new variable by using the set variable action and let's use it right before the 4ish loop and so let's Define the variable name to sap table r index and the value will be initially zero so first we will always want to Target to fill the first table row and so after doing the actions so fill the values on the sap table at the first row initially we want to increase the value of this variable by using the action increase and so we'll increase the value of the variable by one and now uh let's use the value of this variable on the selector at the row index so the row index will be incremented dynamically and so we will always Target the next row for each row of the Excel file so how we can do that let's do first for the material y helmet and now let's enable the text editor and here in the hand on the ID edro that is about the material field on the first row of the SCP table let's replace here the zero which is above the row index by calling our variable sap table row index and that's basically it so now for each row of our Excel file initially the value of this variable will be zero so we'll Target first always the first row and then on the second row we'll Target the second row on the sap table and so on so let's save and do the same for the other two white helmets so this one for the PO quantity let's here replace the Zero by calling our variable and the same for the Y helmet for the net price and that's it so now let's run our flow so let's click on run and here we can see that the flow working as expected so we can see one row filled on the sap table for each row of the Excel file so now the next step is to click here on the save button to create the purchase order and then close sap so to click on the button we can use the click action from UI automation so let's drag it after the Farish Loop and so let's add the Y helmet so let's indicate here the save button and now let's save and so now if you run the flow it should be created the pchas order in the hand so let's run it and here we can see that the pese order was created successfully so now uh let's run the flow from the beginnings so let's remove here the attach action and enable the launch sap action also to make our flow more robust on the Y automation activities let's enable the simulate action property so the interaction is more robust so let's click on Save and apply this to Wild mation actions and then in the hand let's add the close sap connection action and that's it so let's close sap and let's run the flow so sap was opened and now we'll be done the login then we'll navigate to the purchase art creation page and now the the both read the Excel file and now it will fill the Bender fill the material P quantity and net price create the purchase order and close sap and it seems it worked as expected so let's just add a delay between the click on the save button to create a purchase ordered and a close sap connection it was too fast so let's add just a wait and we can add just two seconds for example and that's it for this tutorial so if you like it please give a thumbs up and also make sure you subscribe to this Channel and enable notifications Bell so we'll not miss any tutorial released here on this channel
Info
Channel: Marcelo Cruz
Views: 6,721
Rating: undefined out of 5
Keywords: rpa, robotic process automation, power automate desktop, sap, sap automation, rpa sap automation, power automate desktop sap, rpa tutorial, what is rpa, rpa tutorial for beginners, power automate, power automate desktop tutorial, power automate desktop tutorial for beginners, sap automation power automate, power automate desktop automation, power automate desktop ui automation, rpa automation, power automate sap connector, sap scripting, automation, erp automation
Id: IKi_WD_vaEM
Channel Id: undefined
Length: 20min 44sec (1244 seconds)
Published: Wed Feb 21 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.