Its better to do SAP scripting here . I have copied the below earlier when i wanted to achieve the same from some article or post (don't remember exactly ) but yeah see if this helps you .
For SAP automation we need to do some pre config with SAPJust create new SAP Object in blue prismand start spying element using SAP Mode .SAP Config Guide is available on internet easy. just refer the enable client side scripting section from itEnabling SAP Spy ModeTo enable SAP spy mode, Blue Prism requires that both client- and server-side scripting are properly enabled.i. Enabling Client-Side Scripting• Start the SAP Logon and log in to the SAP server.• Click the 'Customize Local Layout' toolbar button (ALT+F12).• Click Options and in the GUI Options screen select the 'Accessibility and Scripting' node• In the ‘Accessibility’ node ensure that the ‘Use Accessibility mode’ option is enabled.• In the 'Scripting' node ensure that the ‘Enable scripting’ option is the only option set. Notifications must be switched off to prevent popups from blocking the spy mode.o NOTE: If the options 'Notify when a script attaches to SAP GUI' check box and the 'Notify when a script opens a connection' are left checked then when you spy an element in the SAP interface you will see the message “A script is trying to attach to the GUI” every time you attempt to click on it. If you see the message “Scripting support is disabled by the user” then the ‘Enable scripting’ option has not been checked.• Save the settings and restart the SAP GUI. The client-side settings have now been set.Enabling Server-Side Scripting• Start the SAP Logon and log in to the SAP server.• Run the ‘RZ11’ transaction (type ‘RZ11 ‘and click the green tick button)• Type ‘sapgui/user_scripting’ in the Maintain Profile Parameters window.• Click the ‘Display’ button• Click ‘Change Value’ in the Display Profile Parameter Attributes window.• Type ‘TRUE’ in the ‘New value’ field.• Save the settings and log out from SAP Logon.• Exit from the SAP Logon program (click the red cross button in the toolbar, or click the ‘X’ window button to close the window and the application). You may be prompted to save any unsaved changes, if you haven’t done so already.Just Configure sap and Blue prism as above instruction and start working.
------------------------------
Vipul Tiwari
Senior Process Simplification Developer
Amazon
------------------------------