Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
My name is Praveenkumar and I work in the capacity of Product Manager in SAP Intelligent Robotic Process Automation.

This blog is to introduce the latest content in SAP Intelligent Robotic Process Automation Store around best practices in SAP ECC.

With 77% of all worldwide business transactions touching an SAP system, SAP is known to be the process backbone of the world.  So, during these days of unprecedented change, where the enterprises around the globe strive for higher efficiencies via automation, it is our endeavor to put business users in front and center to lead this change by embracing technologies like the intelligent RPA.

To achieve this, one of the core capabilities an RPA tool should possess, is to let a business user author the automation workflow that reflects both the industry best practices and the company’s own unique practices. The key here is to enable the business user to efficiently and rapidly author automation workflows, test them and move them to production. This empowers them to be part of a business centric transformation with real impact.

So, the obvious question is, how to enable the business user or the knowledge worker who understands the domain, the processes and the best practices to quickly create business automations that are relevant. We believe that the answer lies in SAP’s unique positioning both as the central process hub and as the leading industry-best-practice repository.

For a business user, the ultimate simplification in authoring an automation is to ‘assemble’ it…. assemble it from existing best practice content that’s available as pre-built, configurable templates.

This is the exact reason why we are on a journey to publish more and more of SAP industry best practices as pre-built template bots in SAP Intelligent RPA store.

We have already published the first set of automations for SAP ECC in SAP Intelligent RPA Store. You can see below the clusters of bots available and their use-cases.

ECC Reports for Line-item downloads and reconciliation








































Automation Name Description Technologies used
List of Vendor Line Items (ECC) - FBL1N Automate the list of Vendor Line Items and download them as an excel file. You can either specify a variant or custom fill the selection criteria using a template MS-Excel file

SAPGUI 7.60

 

MS-Excel 2016 and 365
List of G/L Account line Items (ECC) – FBL3N Automate the list of G/L Account Line Items across multiple company codes and download them as an excel file. You can either specify a variant or custom fill the selection criteria using a template MS-Excel file

SAPGUI 7.60

 

MS-Excel 2016 and 365
List of Customer Line Items (ECC) – FBL5N Automate the list of Customer Line Items and download them as an excel file

SAPGUI 7.60

MS-Excel 2016 and 365
List of G/L Account line Items (ECC) – FAGLL03 Automate the list of G/L Account Line Items and download them as an excel file

SAPGUI 7.60

MS-Excel 2016 and 365
List of G/L Account line Items (ECC) - FAGLB03 FAGLB03 is for the new GL using leger data at the line item level with drill-down is possible. The bot automates the download to an excel

SAPGUI 7.60

MS-Excel 2016 and 365
List of additional currencies for Company Code (ECC) – OB22 Automate the list of additional local currencies for company codes and download it as an excel file

SAPGUI 7.60

MS-Excel 2016 and 365

ECC Reports for Line-item downloads and reconciliation with HANA








































Automation Name Description Technologies used
List of Vendor Line Items (HANA) – FBL1H Automate the list of Vendor Line Items and download it as an excel file.

SAPGUI 7.60

MS-Excel 2016 and 365
List of G/L Account line Items (HANA) – FBL3H Automate the list of G/L Account Line Items and download it as an excel file

SAPGUI 7.60

MS-Excel 2016 and 365
List of Customer Line Items (HANA) – FBL5H Automate the list of Customer Line Items and download it as an excel file

SAPGUI 7.60

MS-Excel 2016 and 365
List of additional currencies for Company Code (HANA) – FINSC_LEDGER Automate the list of additional local currencies for company codes and download it as an excel file

SAPGUI 7.60

MS-Excel 2016 and 365
List of G/L Account line Items (HANA) – FAGLL03H FAGLL03H can display entry view as well as the General ledger view. Here, we are automating the download of the G/L account line item list according to given input criteria.

SAPGUI 7.60

MS-Excel 2016 and 365
List of additional currencies for Company Code (ECC) – OB22 Automate the list of additional local currencies for company codes and download it as an excel file

SAPGUI 7.60

MS-Excel 2016 and 365

With these reports it will be easy for a customer to define end-to-end automation flows that will e.g. cross check between system balances in case of a reconciliation or data migration. These automation flows come handy if you are managing an open item migration for an ECC to S4 upgrade project.

Procurement Reports and Transactions


















































Automation Name Description Technologies used
List of Purchasing Documents (ECC)– ME2N Automate the list of Purchasing Documents for a given criteria and download it as an excel file.

SAPGUI 7.60

MS-Excel 2016 and 365
List of Purchase Requisitions (ECC) – ME5A Automate the list of Purchase Requisitions for a given criteria and download it as an excel file

SAPGUI 7.60

MS-Excel 2016 and 365
List of Goods-Receipt (ECC) – MB51 Automate the list of Goods Receipt for a given criteria and download it as an excel file

SAPGUI 7.60

MS-Excel 2016 and 365
List of Invoice Documents (ECC) – MIR5 Automate the list of Invoice Documents for a given criteria and download it as an excel file

SAPGUI 7.60

MS-Excel 2016 and 365
Creation of Purchase Orders - ECC (ME21N) This program is used to create Purchase Orders. Here, we are automating the creation of a Purchase Order using header and item details as input which is read from a template MS-Excel file. The report supports F4 based lookup of descriptions and can create multiple orders in one go.

SAPGUI 7.60

MS-Excel 2016 and 365
Creation of Inbound Delivery - ECC (VL31N) This program is used to create Inbound Delivery. Here, we are automating the creation of an inbound delivery using details read from a template MS-Excel. The report supports F4 based lookup of descriptions and can create multiple deliveries in one go.

SAPGUI 7.60

MS-Excel 2016 and 365
Goods-receipt Purchase Order - ECC (MIGO) This program is used to create Goods receipt. Here, we are automating the creation of a goods receipt using details read from a template MS-Excel. The report supports F4 based lookup of descriptions and can create multiple deliveries in one go.

SAPGUI 7.60

MS-Excel 2016 and 365
Enter Incoming Invoice - ECC (MIRO) This program is used to enter an Incoming Invoice. Here, we are automating the entering of Incoming Invoices using transaction MIRO. The flow includes the following:

  • Receipt of supplier-invoice information as attachment via email

  • Retrieval of these attachments with a bot which stores the attachment in a local folder

  • The second scenario then reads the attachment files and create a task in factory corresponds to each file that is read

  • The 3rd scenario pickups these jobs and create the supplier invoice in backend ECC system via MIRO

  • The last step can be distributed across multiple agents based on your configuration


Additionally, scenario is represented as 2 different bots based on source of data:

  1. Supplier Invoice as an MS-Excel attachment

  2. Supplier Invoice as a system generated PDF file


For the second scenario with supplier invoice as PDF file, SAP Intelligent RPA 1.0.9 (2004) is needed as we have used the new PDF activities within that


SAPGUI 7.60

MS-Excel 2016 and 365

MS-Outlook 2016 and 365

System-generated PDFs (need agent version 1.0.9  / 2004)

With these bots on procurement side, you can achieve the 2 main aspects:

  1. Integrating ECC MM with SAP Ariba

  2. Procure-to-pay transactions within ECC MM


Sales and Distribution Reports and Transactions






























Automation Name Description Technologies used
Status of items of a Sales Order (ECC) – VA05 The bot reads a sales order number sent via email and automates and downloads status of its items into an excel file which is sent as reply to that mail

SAPGUI 7.60

MS-Excel 2016 and 365

MS-Outlook 2016 and 365
Creation of Sales Inquiry - ECC (VA11) This program is used to create Sales-Inquiries. Here, we are automating the creation of a Sales Inquiries using transaction VA11. The report supports F4 based lookup of descriptions and can create multiple inquiries in one go.

SAPGUI 7.60

MS-Excel 2016 and 365
Creation of Sales Orders - ECC (VA01) This program is used to create Sales Orders. Here, we are automating the creation of a Sales Order using header and item details as input which is read from a template MS-Excel file. The report supports F4 based lookup of descriptions and can create multiple orders in one go.

SAPGUI 7.60

MS-Excel 2016 and 365
Creation of Outbound Delivery - ECC (VL01N) This program is used to create Outbound Delivery. Here, we are automating the creation of an outbound delivery using details read from a template MS-Excel. The report supports F4 based lookup of descriptions and can create multiple deliveries in one go.

SAPGUI 7.60

MS-Excel 2016 and 365

With these transactions, a customer can integrate with Sales LoB applications or automate order-to-cash transactions.

Financial Transactions

























Automation Name Description Technologies used
GL Account Posting - ECC (F-02)

This program is used to create G/L Account Posting. Here, we are automating the posting in G/L accounts using transaction F-02.

The input criteria and system information are contained in a configuration excel named as DynamicTemplate_F02.xlsx. This excel file contains the system details like the System ID, Client and whether Single Sign-On is enabled. It also contains the details of the G/L account and the amount to be posted as line items. Username and password for the mentioned system(s) are stored as variables in the Cloud Factory.


SAPGUI 7.60

MS-Excel 2016 and 365
Customer Down Payment Request - ECC (F-37)

This program is used to create a Down-payment request. Here, we are automating the creation of a Down-payment request using transaction F-37.

The input criteria and system information are contained in a configuration excel named as UploadDownPayment_F-37(ECC).xlsx. This excel file contains the system details like the System ID, Client and whether Single Sign-On is enabled. It also contains the header and item details necessary to create a down-payment request. The username and password for the specified system are available as variables in the Cloud Factory.


SAPGUI 7.60

MS-Excel 2016 and 365
Create Payment Advice - ECC (FBE1)

This program is used to create a Payment Advice. Here, we are automating the creation of a Payment Advice using transaction FBE1.

The input criteria and system information are contained in a configuration excel. This excel file contains the system details like the System ID, Client and whether Single Sign-On is enabled. It also contains the details necessary to create the payment advice. The username and password for the specified system are available as variables in the Cloud Factory.


SAPGUI 7.60

MS-Excel 2016 and 365

These bots let a customer automate the few first set of transactions in a FIN Shared Service Center.

Productivity Improvement Bots




















Automation Name Description Technologies used
External Scheduler Automate addition, schedule, and execution of jobs in a job chain on various defined systems SAP XBP over RFC, MS-Excel 2016 and 365.
FAQ Bot This bot will read the question sent by a user via email and fetch the answer from an FAQ document maintained in MS-Word or MS-Excel format. This answer will be sent as a response to that email

MS-Excel 2016 and 365

MS-Outlook 2016 and 365

MS-Word 2016 and 365

These bots are useful in both user productivity improvement and as reference for calling ABAP background job scheduling from automations.

BAPI based Automations


In addition to UI based bots, we have also released first set of bots based on a BAPI call to target ECC system. Please find below the list of released bots based on BAPI:

































Automation Name Description Technologies used
Creation of Business Partner (BAPI)

Automate the creation of a Business Partner using BAPI: BAPI_BUPA_CREATE_FROM_DATA - Create Business Partner

In this scenario, each BAPI call (and the subsequent commit work) happens in a separate session. This scenario is ideal for executing the bot on a multiple agent setup.


SAPGUI 7.60 for the BAPI ActiveX call

MS-Excel 2016 and 365
Creation of Sales Order (BAPI)

Automate the creation of a Sales Order using BAPI: BAPI_SALESORDER_CREATEFROMDAT2 - Create Sales Order

In this scenario, each BAPI call (and the subsequent commit work) happens in a separate session. This scenario is ideal for executing the bot on a multiple agent setup.


SAPGUI 7.60 for the BAPI ActiveX call

MS-Excel 2016 and 365
Creation of Purchase Requisition (BAPI)

Automate the creation of a Purchase Requisition using BAPI: BAPI_PR_CREATE - Create Purchase Requisition

In this scenario, each BAPI call (and the subsequent commit work) happens in a separate session. This scenario is ideal for executing the bot on a multiple agent setup.


SAPGUI 7.60 for the BAPI ActiveX call

MS-Excel 2016 and 365
Creation of Goods Receipt (BAPI)

Automate the creation of a Goods Receipt using BAPI: BAPI_GOODSMVT_CREATE - Goods Receipt Purchase Order

In this scenario, each BAPI call (and the subsequent commit work) happens in a separate session. This scenario is ideal for executing the bot on a multiple agent setup.


SAPGUI 7.60 for the BAPI ActiveX call

MS-Excel 2016 and 365
Generic BAPI Template Generic BAPI – This uses an extensible / customizable MS-Excel template which one can use to call any BAPI.

SAPGUI 7.60 for the BAPI ActiveX call

MS-Excel 2016 and 365

SAP BAPI (Business Application Programming Interface) is a standard interface to the business object models in SAP products.

BAPIs are the primary method through which customer code and third-party applications interact with SAP products. BAPIs wrap the internal layers of SAP's business object model to ensure that all business logic, validations and authorization checks are executed properly when accessing or changing business objects.

How BAPIs work


BAPIs are implemented as functions that call SAP internal code. BAPIs expose a formal and stable interface that developers of customer and third-party code can use to access and interface with SAP business objects in a way that SAP guarantees will work in the future. Most BAPIs are remote enabled, meaning they can be invoked via Remote Function Call (RFC).

Here, we are using ActiveX components in SAP Intelligent RPA to execute an RFC call to the BAPI using a template containing the BAPI details.

On execution of the bot the following steps take place:

  1. A connection to the specified SAP system is established using an ActiveX Object based on the SAPGUI exe present in the system.

  2. The excel template is copied as the output file into the specified output path.

  3. The various importing parameters are filled for the first Sequence number according to the values specified in the excel sheet of the same name. Parameters with type as IN in BAPIInfo sheet are considered here.

  4. Once the value is filled, the BAPI is executed, and the values obtained from it (i.e. the parameters with type as OUT in the BAPIInfo sheet) are populated back into the corresponding sheets.

  5. A commit is issued to commit the execution of the BAPI.

  6. Subsequently, steps 3, 4 and 5 are repeated for the next Sequence number. The Sequences can be executed in parallel if multiple agents are available in the environment.


Please use the BAPI based bot execution in cases of mass transaction (upload/create) as it is better performant and reliable. The points below will help one choose between the approaches:

  1. Most importantly a BAPI must be available for the transaction / step that the customer is interested in. BAPI based bots work only with IDs, support mass-create and their interface is extensible (e.g. country tax extensions for MIGO) without any code change by customer.

  2. UI based bot versions support F4 lookup for master data fields to support name/description, support mass-create with distributed agents and are theme agnostic


Dynamic BAPI usage


Technically one can call any BAPI with the dynamic BAPI approach without changing the code by just changing the input excel to dynamically call the BAPI. Here are the steps to alter the dynamic BAPI template (please refer to any BAPI based bot config excel file as a reference).

  • Fill out the ‘SystemDetails’ sheet to mention the target system where the BAPI must be called (see example below)



















System App Server InstanceNumber Client Output Path
Q7Q ldciq7q.wdf.sap.corp 18 002 c:\Temp


  • Please fill out the BAPIInfo sheet with following info

    • Function Module – BAPI name

    • ‘EXPORT’ parameter names for all structures with an ‘IN’ to represent the data that must be sent to the BAPI

    • ‘Table’ parameter names for tabular data with an ‘IN’ to represent the data that must be sent to the BAPI

    • Keep the ‘Table’ with name ‘RETURN’ which will collect the logs from the BAPI call

    • Add the ‘IMPORT’ structure parameter with an ‘OUT’ indicator to get the return structure





































Function Module BAPI_SALESORDER_CREATEFROMDAT2 NA
EXPORT ORDER_HEADER_IN IN
Table ORDER_PARTNERS IN
Table ORDER_ITEMS_IN IN
Table RETURN OUT
IMPORT SALESDOCUMENT OUT


  • Add a sheet each for the ‘EXPORT’, ‘Table’ and ‘IMPORT’ interface structures

  • In each sheet, column A represent the sequence. This means if you are using the BAPI for multi-create, this sequence number links the entries across all sheets. E.g., if you are using the dynamic template for a material master BAPI, all entries across sheets with ‘Sequence’ as 1, represent the data corresponding to the first material you want to create etc. The Column B is only for documentation purpose.

  • From column C, please add your interface data corresponding to the actual interface structure. Here3 please note that the row-1 is the technical name of the structure field and row-2 is a description that you can use for business user understanding of the field.

  • From row-3 the actual value across sequences can be put. Please note that the sequence value will repeat for the ‘Table’ parameter-type


Within the BAPI bot, please point towards this updated XLS file so that this is picked up. You can also parameterize it to read from the factory, if you choose to.

The dynamic BAPI bot will call the corresponding BAPI mentioned in the ‘BAPIInfo’ sheet and fill out the RETURN table and IMPORT structure.

All BAPI bots support mass action even if the underlying BAPIs are supporting single entity action. The bot will automatically parallelize the work if multiple agents are available in the environment. The bot will move the config file with filled RETURN data to a configurable location after processing.

Please refer to this blog post for further details of consuming BAPIs from SAP Intelligent RPA.

Immediate next releases


The list below shows the next set of bots that will be released in store in the coming weeks.































































































































Automation Name Type of Automation
Automatic Picking of Outbound Deliveries UI / BAPI
Business Partner - Master Data Check using an API BAPI
Mass Locking and Unlocking of Cost Centers BAPI
Mass Asset Transfer Within Company Code UI
Inconsistent New-GL Open Item Exclusion for Migration Cockpit UI / BAPI
Inbound Delivery Creation from Delivery Notes UI / BAPI
Mass Upload of Time Entries for Commercial Projects BAPI
Purchase Order Confirmations UI
Automatic Return Creation BAPI
Supplier Invoice from image PDFs with OCR / Document Info Extraction service OCR / ML / UI
Invoice creation in ARIBA from ECC order info UI
Post with Clearing UI / BAPI
Post incoming payments UI / BAPI
Post outgoing payments UI / BAPI
Dunning Letter UI / MS-Outlook
Material Master Data BAPI
Create Billing Document UI / BAPI
Create Reservation UI
Transfer Posting UI
Payment Block UI
Create Quotation UI / BAPI
Create Contract UI / BAPI
Create Item Proposal UI / BAPI
BOM Transactions UI / BAPI
Pricing: Conditions / Procedures UI
Credit Card Check BAPI
Create Store Order BAPI
Material Listing and Exclusion UI
Payment Requests UI
Payment Run (Params, Schedule, Trigger) UI / BAPI

Please feel free to add in the comments section the name or description of SAP ECC transactions or reports that you would like to see in SAP Intelligent RPA store, that you find relevant. We could then add those to our roadmap.

ECC bot building best practices


Below are some ECC bot building best practices that one could follow for SAP Intelligent RPA:

  1. To ensure that the UI based automations are system and client agnostic





    • Please make sure to capture and handle the following pages.









      1. SAP Logon pad (to choose the system) as a UI automation

      2. Handle pop-ups thrown when same user tries to login into SAP from multiple instances

      3. Multiple clients section (if there are multiple clients for the same system)

      4. SAP credentials section (SSO based login)









    • Get the list of all the systems from the SAPGUI Login, match it with the system from the factory variable or configuration value.

    • Get the list of all the client from the specific system, match it with the client provided from the factory variable or configuration value.

    • While capturing the application, choose criteria as “part of (SAP LOGON)” and not “SAP LOGON 760” as different systems might have different versions of SAP GUI installed.





  1. To ensure that the UI based automations are resilient to UI Themes





    • Always try to use shortcut keys and avoid clicking on buttons in the UI

    • Only use e.SAPScripting.key object for keystrokes in SAP GUI.





  1. Common Practices





    • For multiple pages with the same name, use “Must Exist” property of an item in the page or add “Name = wnd[x]” in page criteria.

    • If you are running in un-attended mode, kill SAP LOGON (by the bot) before starting the process.

    • While downloading an export file, handle both the Windows “Save As” prompt as well as the SAP “Save As” prompt.

    • Always logoff the SAP GUI instance after the job is complete.

    • While switching from one page to another where multiple pages or popups can come use the activity “Wait Multiple”.

    • Use “waitReady” or “wait” to wait for the page to load.




Additional Notes


Please note these additional points regarding the released ECC Bot content:

  1. The bots are envisaged to run in un-attended mode and all transaction bots are built with an assumption of parallel execution in a multi-agent environment. Pre-requisite steps like adding the scenario within the systray and removing the ‘add job to factory’ call must be changed in the bots to run them in attended mode in a single agent

  2. As these bots are released as template bots, only minimal error handling is done within the bot scripts. Please refer to this blog post on details of error handling approaches in SAP Intelligent RPA and follow the best practices mentioned before productively deploying the bots

  3. The tables below shows the test scope of the bots released:





















Backend System What is Tested
ECC 6.0 EHP-4 All UI / BAPI
ECC 6.0 EHP-7 on SAP HANA All ‘HANA’ UI reports, other UI Spot Checks, all BAPI
S/4 HANA 1809 OP All ‘HANA’ UI reports, other UI Spot Checks

 























Test Scope What is Tested
SAPGUI Themes CLASSIC, SAP Signature Theme, Belize (All UI)
SAPGUI Versions SAPGUI 7.60 (all), SAPGUI 7.50 (spot checks)
XBP for Job Scheduling XBP 3.0
Utility / Channels

MS-Outlook 2016 & 365

MS-Excel 2016 & 365

Finally, if you are interested in the ‘Next Generation’ of SAP Intelligent RPA, please look at this blog post to know about the exciting improvements with the cloud studio.

Happy bot building!!

References



  1. Call SAP Business Application Programming Interface using SAP Intelligent RPA

  2. Handling errors and timeouts in a scenario

  3. Next level of SAP Intelligent RPA


Learn More


For more information on SAP Intelligent RPA,

8 Comments
PPX
Advisor
Advisor
0 Kudos
A very useful post with clear detail on ECC bots !

Many thanks Praveen !
0 Kudos
Very Great and usefull

 

THANKS A LOT!!!
bjaganathan1
Discoverer
0 Kudos
Hi Praveen,

 

Where can i get more details about the BOT helping MIRo posting?
haricahy1
Participant
0 Kudos
Hi Praveen,

 

Thanks for the nice blog, I'm interested about the bot for MIRO.

Can you please provide some info where I can try this bot?

 

Thanks,

Hari
0 Kudos
Just subscribe to the free trial, and then download the bot from the store: https://store.irpa.cfapps.eu10.hana.ondemand.com/#/home/order=asc/type=business_content/search=ecc
former_member631765
Discoverer
0 Kudos
Hi Parveen,

Very good blog!!!

In these scenarios, when the robot connects to the SAPGUI with a user, this user, is it a system or a dialog user? What roles and profiles must you have to connect to all SAP modules, SAP_ALL? Is there a formal document that explains the security of these users? We have problems with auditing for requesting a user with wide privileges in production, being a dialog user.

Best regards,

Johnny

 
former_member147380
Participant
0 Kudos
Hi Praveen,

 

Thanks for the blog very useful and informative. We are trying to use List of G/L Account line Items (ECC) – FBL3N from IRPA store. Could you please advise where should I get more details to use this bot.

Thanks
zidanvi1
Explorer
0 Kudos
HI good blog.

 

We would like to use Creation of Inbound Delivery - ECC (VL31N bot. Now in RPA store I can see description but before we make any further steps it would be good that we can download xls template. WE would like to verify if it is supporting packing data and some fields.

Does anybody know how xls templates can be downloaded from the store?