Step-By-Step Guide to Use GUI Field Extractor to Extract Name of the Purchasing Organization From a Purchase Order

Let's see an example of extracting purchasing organization name from a purchase order.

 

To extract the purchase order:

  1. Save the following assembly files in the Automation Studio folder saved on your system:

 

Component

Version

Interop.SAPFEWSELib.dll

SAP ECC 6/ECC 4 and above

Interop.SapROTWr.dll

SAP ECC 6/ECC 4 and above

stdole.dll

SAP ECC 6/ECC 4 and above






 

 

  1. Download the mentioned assembly files from SAP website.
  2. Save Interop.SAPFEWSELib.dll, Interop.SapROTWr.dll and stdole.dll in client-tools > AutomationStudio > bin > ThirdPartyDLLs folder. If you download/access Automation Studio from the Admin module, you must save the required DLLs at %localappdata% > EdgeVerve > AutomationStudio > bin > ThirdPartyDLLS folder.
  3. Save Interop.SAPFEWSELib.dll, Interop.SapROTWr.dll and stdole.dll in client-tools > AutomationStudio > bin > Plugins > SAP folder. If you download/access Automation Studio from the Admin module, you must save the required DLLs at %localappdata% > EdgeVerve > AutomationStudio > bin > Plugins > SAP folder.
  4. Save Interop.SAPFEWSELib.dll and Interop.SapROTWr.dll in the client-tools > AutomationStudio > bin > ProtonFiles > Dllrepository folder. If you download/access Automation Studio from the Admin module, you must save the required DLLs at %localappdata% > EdgeVerve > AutomationStudio > bin > ProtonFiles > Dllrepository folder.
  5. Save Interop.SAPFEWSELib.dll and Interop.SapROTWr.dll in the client-tools > AutomationStudio > bin > SAPEngine folder. If you download/access Automation Studio from the Admin module, you must save the required DLLs at %localappdata% > EdgeVerve > AutomationStudio > bin > SAP folder.
  6. In the Admin menu of Automation Studio, add an application of Application Type- SAPApps.
  7. In the Application Properties panel:
    • In the Connection Name field, enter the name of the active enterprise SAP connection.
    • In the  Display Name field, enter SAPDemo.
  8. Click the (Save Properties) icon to save the application details. The SAPApps application is configured.
  9. Create a SignIn Process for the configured SAP application. Publish and Deploy the Sign In process to use it in the relevant automation process workflow created for the configured SAP application.
  10. Create a new process.
  11. From the Canvas Tools panel, add an Application activity to the Flowchart designer on the Canvas.
  12. In the Parameter bar, create an In argument, OrgName of String type.

 

 

  1. In the Application Type list, select SAPApps
  2. In the Select An Application list, select SAPDemo.

 

 

  1. Double click the Application activity, drag the SAP Recorder activity and drop inside the Application activity.
  2. Click the (Start Recording) icon to record the steps performed in the SAP application. Keep the SAP application page open before you start using the activity else the Start Recording icon remains disabled. The SAP application window appears.
  3. Navigate to the required purchase order page.
  4. In the SAP Recorder activity, click the (Stop Recording) icon to stop capturing the steps. The associated scripts gets created in the Script Editor.

 

 

  1. Add the GUI Field Extractor activity.
  2. Click the (Capture a Field) icon to capture the steps that you want to perform within the SAP application. Keep the procurement page open before you start using the activity else the Capture a Field icon remains disabled. The SAP application window appears. The area where the cursor is present gets highlighted within red box.
  3. Move the cursor to the Purch. Org.  field and then click the highlighted text.

 

 

  1. In the GUI Field Extractor activity, click the (Settings) icon. The Field Properties panel appears. The fields that are mandatory to be filled are highlighted with red box.

 

 

  1. In the Action list, select Extract Value to extract the required value.
  2. In the Variable Name field, enter OrgName.
  3. In the Data Type list, select Numeric

 

 

To view the output in Automation Studio, let's add WriteLine activity. You can publish, deploy and assign this process to a robot, if you want to execute the process outside Automation Studio.

  1. Add a WriteLine activity and in the Text field, enter the PONumber argument created above.

 

 

  1. Save the process.
  2. Setup the environment and perform test run.
    Observe that the SAP application get launched, signed in and the purchase order change page opens automatically. The purchase order number gets extracted and is displayed in the Output console of Automation Studio. Below is the sample of the output: