Download as pdf or txt
Download as pdf or txt
You are on page 1of 34

4/18/2024

Sales
Generated on: 2024-04-18 20:03:27 GMT+0000

SAP Intelligent RPA Integration with SAP S/4HANA | Latest

PUBLIC

Original content: https://help.sap.com/docs/IRPA_S4HANA/1ba1de4bdbae4d3b85c71d1408c95f66?locale=en-


US&state=PRODUCTION&version=latest

Warning

This document has been generated from the SAP Help Portal and is an incomplete version of the official SAP product
documentation. The information included in custom documentation may not re ect the arrangement of topics in the SAP Help
Portal, and may be missing important aspects and/or correlations to other topics. For this reason, it is not for productive use.

For more information, please visit the https://help.sap.com/docs/disclaimer.

This is custom documentation. For more information, please visit the SAP Help Portal 1
4/18/2024

Automatic Creation of Sales Orders from Excel (4G5)


Companies frequently receive order requests from customers as email attachments in the form of Excel spreadsheets. The
Internal Sales Representatives must then manually and individually enter the sales order details from these spreadsheets to
create sales orders in the system. This is a time-consuming and error-prone process, which adds unnecessary manual effort and
poses potential risks and delays to the business.

The Automatic Creation of Sales Orders from Excel automation is used to automate the sales order creation process, allowing
companies to create a larger volume of sales orders in less time with reduced error.

The automation reads the Excel les placed in the base folder and/or scans unread emails with the Subject keyword Sales
Order having the Excel les as attachments. The Excel les are transformed to a structure that can be used by the sales order
creation API. The sales orders are created in the system based on the details in the Excel le and then relevant stakeholders
are noti ed with details of sales orders created in the SAP S/4HANA Cloud system.

 Note
This is an API automation and is available in both the attended and scheduled modes.

For security reasons, SAP recommends executing the API automation in the scheduled (unattended) mode. For more
details, see Generic Updates (May 2022) in the What's New section.

Prerequisites
This section summarizes all the prerequisites in terms of systems, software requirements, business role, and sample input data
required to run the automation.

System Access
The task automation is performed on the following systems:

Details

SAP S/4HANA Cloud Accessible via SAP Fiori launchpad. Your system administrator provides you with
the URL to access the various apps assigned to your role.

Software Requirements
To run the process automation, make sure you have the following software installed in your system.

Software Details Supported Version

Windows The operating system of the system. Windows 10


OS

This is custom documentation. For more information, please visit the SAP Help Portal 2
4/18/2024

Software Details Supported Version

Automation SAP Intelligent Robotic Process Automation


tool
SAP Intelligent Robotic Process Automation Cloud Studio -
To design/customize the template bot.

SAP Intelligent Robotic Process Automation Factory - To


import template automation package and con gure the
automation.

Or,

SAP Build Process Automation

To design/customize the process automation and perform necessary


con gurations to run the automation.

Desktop To run the automation. The desktop agent version must be equal to or
Agent higher than the version speci ed in the package.

Microsoft Microsoft Excel - Automation reads data from the Input Excel le, and 2013 and above
Office writes the Output log to the Excel le.
Microsoft Outlook - Automation scans the Inbox for the Sales Orders
emails, and sends an email noti cation to the recipients.

Con gurations
Before you run the automation, perform the following con gurations:

Automation Tool

SAP Intelligent RPA

Install and set up SAP Intelligent Robotic Process Automation tools with necessary user authorization and
con guration. For more details, see the Install and Con gure Process Automation Tools.

Perform tenant con guration in the SAP Intelligent RPA Desktop Agent to establish connection with the
SAP Intelligent Process Automation Factory. Refer to the Desktop Agent User Guide for the steps to
register the agent and add agent to an Environment.

SAP Build Process Automation

Set up SAP Build Process Automation with necessary user authorization and con guration. For more
details, see the SAP Build Process Automation subsections under Install and Con gure Process
Automation Tools.

Install the desktop agent, register your agent and connect it to an SAP Build Process Automation tenant
to run the automations. For more details, see the Install the Desktop Agent to Run Automations and
Manage Desktop Agent topics.

SAP S/4HANA Cloud

For SAP S/4HANA Cloud systems: Create a communication user, and then create a communication arrangement
between the communication user and the communication scenario in your SAP S/4HANA Cloud system. For more
details, see Communication Management.

For the SAP S/4HANA Cloud system, add the Communication Scenario SAP_COM_0109 to use the API/OData
service.

The following OData API service is used:.

This is custom documentation. For more information, please visit the SAP Help Portal 3
4/18/2024

API Details Description

API_SALES_ORDER_SRV/A_SalesOrder This synchronous OData API is used to read, create, update, and delete sales
order.

Assign the following business roles to your individual test users.

 Note
The following role is provided as example role from SAP. You can use the sample role as a template to create
your own roles.

Business Role Business Role ID as Delivered by SAP

Internal Sales Representative SAP_BR_INTERNAL_SALES_REP

Input Excel Template

The automation takes the input from an Excel le lled with required data. The sample Input Excel template is available
with the automation content package. For more details, see the Input Excel Template section.

Base Folder

Create a folder in your local drive where you want to save the input Excel template. Enter the folder path in the variable
for the automation to read the Excel le and to save the output log les. If the input is email-based (EMAIL_READ_4G5
variable is turned on), create a folder with the name To be processed and add the folder path in the
BASE_FOLDER_PATH_4G5 variable. For more details, see the Environment Variables section.

Input Excel Template


If the EMAIL_READ_4G5 variable is turned off, then you need to ll the Excel les with the Sale Order details and place the les
in a folder in your local drive. You must add the folder path in the variable BASE_FOLDER_PATH_4G5.

 Note
The input le must have .xlsx and .xls extension only.

The cell format of the input Excel template is in the Text format. You can add any number of Sales Order header or item data
in the input Excel le.

The sample input Excel le is available with the automation project. Download the project from the Store.

Sample Input Template Data


The table provides the sample input data. Refer the sample input Excel template provided with the automation package.

 Note
Fields marked with (*) are mandatory input.

Sample
Data Value Description

This is custom documentation. For more information, please visit the SAP Help Portal 4
4/18/2024

Sample
Data Value Description

SalesOrder* 000001 Sales Order ID

SalesOrderType* OR A classi cation that distinguishes between different types of sales documents.

SalesOrganization* 1710 An organizational unit responsible for the sale of certain products or services. The
responsibility of a sales organization includes legal liability for products and customer
claims.
Supports order types in sales document category C (Order).

DistributionChannel* 10 The way in which products or services reach the customer. Typical examples of distribution
channels are wholesale, retail, or direct sales.

OrganizationDivision* 00 A way of grouping materials, products, or services. The system uses divisions to determine
the sales areas and the business areas for a material, product, or service.

PurchaseOrderByCustomer PO_001 Customer reference number that the customer uses to identify a purchasing document (for
example, a sales inquiry or a purchase order).

CustomerPurchaseOrderDate 24-12- The reference date that is shown on the customer's purchase order. This date can be, for
2021 example, the date on which the customer created the purchase order.
Supports YYYY-MM-DD and YYYYMMDD date format.

RequestedDeliveryDate 21-01- The date that the system automatically suggests as the delivery date for schedule lines
2022 when you create further items in the sales order.
Supports YYYY-MM-DD and YYYYMMDD date format.

PricingDate 24-12- The date that determines date-related pricing elements, such as conditions and foreign
2021 exchange rate.
Supports YYYY-MM-DD and YYYYMMDD date format.

SoldToParty* 17100003 Alphanumeric key to identify the customer or partner sold-to-party. The customer who orders
the goods or services. The sold-to party is contractually responsible for sales orders.

Material* IF11 Alphanumeric key to identify the material.


The import is based on your given product, or on a product determined from your given
customer material.

If you do not specify "Product", ensure that the given customer material or GTIN has been
con gured in master data.

 Note
Mandatory for Standard Scenario.

MaterialByCustomer* XC123 To identify the material from the customer's point of view.
The import is based on your given product, or on a product determined from your given
customer material.

If you do not specify "Product", ensure that the given customer material or GTIN has been
con gured in master data.

RequestedQuantity 1 The number or volume of materials speci ed in an item.


Supports a maximum of three decimal places and the decimal mark (.).

ProductionPlant 10505 Key that identi es a plant.

SalesOrderItemCategory TAN A classi cation that distinguishes between different types of item (for example, free of
charge items and text items) and determines how the system processes the item.

Environment Variables
This is custom documentation. For more information, please visit the SAP Help Portal 5
4/18/2024
When you deploy the project, set the values for the following environment variables.

 Note
To set values to the Environment Variables in the Cloud Factory, see the Environment Variables from the Cloud Studio.

To set values to the variables in SAP Build Process Automation, see Set Values to Environment Variable During Project
Deployment.

Variable Name Type Sample Value Description

BASE_FOLDER_PATH_4G5 Text C:\Users\Desktop\RPA Location where the input les are placed. Automation
saves the output log les in this folder.

SYSTEMURL_ODATA Text https://<System>-api. System URL with the endpoint


<domain>/sap/opu/odata/sap

EMAIL_RECIPIENTS_4G5 Text email@yourdomain.com; Email id of the recipients. Multiple email IDs can be
email2@yourdomain.com entered, each separated by a semicolon (;).

S4H_USER_AUTH_4G5 Credential Username: COMM_USER_**** User Credentials of Technical User if on-premise


system, or Communication User if Cloud system.
Password: ********

EMAIL_READ_4G5 Radio On/Off If you turn on, the automation scans the emails with
Button subject line Sales Order to fetch the Excel input. If
you turn off, then the automation fetches the input
les in the base folder. By default, this option is
turned off.

SAP_CLIENT Text Client Number for example: 910 or This variable is used when the automation has to run
000 or 100 or 001 etc. directly on the SAP S/4HANA backend system on a
particular client.

 Note
Enter the correct client number to avoid
processing in default client set in the transaction
SICF.

 Note
If the input is email-based (EMAIL_READ_4G5 variable is turned on), create a folder with the name To be processed and
add the folder path in the BASE_FOLDER_PATH_4G5 variable. The automation saves the attachments from email to the To
be processed folder. The folder must be kept empty as any les present in the folder are overwritten if the name of the le
existing in the folder matches the latest les downloaded from the relevant email. Also, the automation attempts to process
the les that are already present in the folder.

Task Automation Overview


The section provides an overview of the task automation.

Process
Step/Scenario Process Flow

This is custom documentation. For more information, please visit the SAP Help Portal 6
4/18/2024

Process
Step/Scenario Process Flow

Fetch Sales Place the input Excel template in a base folder and set the variable EMAIL_READ_4G5 to False.
Orders input
Excel from Automation fetches the input Excel from the base folder, processes the data using the Excel transformation API, and
base folder creates/uploads sales order details into the SAP S/4HANA Cloud system.

After the task is complete, an email noti cation is sent to the recipients. The processed les are moved to the Success
folder within the base folder. Similarly, the unprocessed les are moved to the Error folder. If a le is partially
successful, the automation splits the records into two and moves them into Success and Error folders based on the
status.

You can also view the output logs in the automation tool. See Procedure for Running the Automation.

Fetch Sales Set the variable EMAIL_READ_4G5 to True.


Orders input
Excel from Automation monitors the unread emails in the Inbox with the subject Sales Order, and extracts the sales orders Excel
Outlook le attachments. The automation forwards the input Excel to the Excel transformation API and creates/uploads sales
order details into the SAP S/4HANA Cloud system.

After the task is complete, an email noti cation is sent to the recipients. The processed les are moved to the Success
folder within the base folder. Similarly, the unprocessed les are moved to the Error folder. If a le is partially
successful, the automation splits the records into two and moves them into Success and Error folders based on the
status.

You can also view the output logs in the automation tool. See Procedure for Running the Automation.

Procedure for Running the Automation


This section describes the steps required to run the task automation in attended and scheduled modes.

Attended Mode
The section describes the procedure to run the automation in attended mode.

Purpose
In this procedure, you can trigger the automation to read the input data based on the variable EMAIL_READ_4G5 setting, and
create the sales order details into the SAP S/4HANA Cloud system.

Procedure
Using SAP Intelligent RPA

Step # Step Name Instructions

1 Launch Desktop Launch SAP Intelligent RPA Desktop Agent. Make sure that the Interactive (Attended) mode is selected in
Agent the Projects tab. For more details, refer to the Desktop Agent User Guide.

2 Log in to the Under Environments, select or create an environment to deploy the packages. For more information, see
RPA Factory the Install and Con gure Process Automation Tools.

3 Add an To add the trigger, refer to the Add an Attended Trigger for more details.
Attended
Trigger

This is custom documentation. For more information, please visit the SAP Help Portal 7
4/18/2024

Step # Step Name Instructions

4 Run the Job Click the Desktop Agent icon on the taskbar and Start the job from the Projects window.

Again, click the Desktop Agent icon and select the Create Sales Orders scenario.

5 Monitor the Job Open the SAP Intelligent RPA Factory and select Monitoring Jobs . You should see your job in the list.
If not, adjust the date range on the Jobs page and refresh the page. For more details, refer to the Maintain
your Landscape section in the SAP Intelligent RPA Factory User Guide.

6 Check for Once your job status is Successful, verify that you have received the email with the report in the format you
Report speci ed. You can also verify that the report is saved in the base folder you set up.

Note that you need to specify the recipients' email IDs and base folder path in the Cloud Factory Variable.
See Environment Variables.

7 Check the Log in to SAP Fiori launchpad with a user with the same minimum authorizations as the Internal Sales
Results Representative (SAP_BR_INTERNAL_SALES_REP) business role template.
(Optional)
Copy a Sales Order number from the Excel report and search for it in the Manage Sales Orders app.

Open the item from the results list and check the details.

Using SAP Build Process Automation

Step # Step Name Instructions

1 Launch Desktop Launch Desktop Agent. Make sure that the agent mode is set to Attended mode. For more information on
Agent how to set the agent mode, see the Desktop Agent User Guide.

2 Open SAP Build Perform the following steps to release and deploy the task automation:
Process
1. Navigate to the Store and search for the automation project.
Automation

2. Click Add to add the project to the Lobby.

3. In the Lobby, click the project to open the Overview page.

4. Click Release and then click Deploy.

3 Set Variables Add values to the pre-de ned variables. For the procedure to set the variables, see Set Values to
Environment Variable During Project Deployment.

4 Add an Attended To add an Attended trigger, see Add an Automation Trigger to a Project.
Trigger

5 Run the Job Click the Desktop Agent icon on the taskbar and Start the job from the Projects window.

Again, click the Desktop Agent icon and select the Create Sales Orders scenario.

6 Monitor the Job Open SAP Build Process Automation and click Monitor Automation Jobs . You should see your job in
the list. If not, adjust the date range and refresh the page. For more details, refer the Monitor Automation
Jobs topic.

7 Check for Once your job status is Successful, verify that you have received the email with the report in the format you
Report speci ed. You can also verify that the report is saved in the base folder you set up.

Note that you need to specify the recipients' email IDs and base folder path in the variable. See
Environment Variables.

8 Check the Log in to SAP Fiori launchpad with a user with the same minimum authorizations as the Internal Sales
Results Representative (SAP_BR_INTERNAL_SALES_REP) business role template.
(Optional)
Copy a Sales Order number from the Excel report and search for it in the Manage Sales Orders app.

Open the item from the results list and check the details.

This is custom documentation. For more information, please visit the SAP Help Portal 8
4/18/2024

Scheduled Mode
This section describes the procedure to run the automation in scheduled mode.

Purpose
In this procedure, you can add a scheduled trigger to read the input data based on the variable EMAIL_READ_4G5 setting, and
create the sales order details into the SAP S/4HANA Cloud system.

Procedure
Using SAP Intelligent RPA

Step # Step Name Instructions

1 Launch Agent Launch SAP Intelligent RPA Desktop Agent. Make sure that the Background (Unattended) mode is
selected in the Projects tab. For more details, refer to the Desktop Agent User Guide

2 Log in to the Under Environments, select or create an environment to deploy the packages. For more information, see
RPA Factory the Install and Con gure Process Automation Tools.

3 Add a To add the trigger, refer to the Add a Scheduled Trigger for more details.
Scheduled
Trigger

4 Monitor the Job Open the SAP Intelligent RPA Factory and select Monitoring Jobs . You should see your job in the list.
If not, adjust the date range on the Jobs page and refresh the page. For more details, refer to the Maintain
your Landscape section in the SAP Intelligent RPA Factory User Guide.

5 Check for Once your job status is Successful, verify that you have received the email with the report in the format you
Report speci ed. You can also verify that the report is saved in the base folder you set up.

Note that you need to specify the recipients' email IDs and base folder path in the Cloud Factory Variable.
See Environment Variables.

6 Check the Log in to SAP Fiori launchpad with a user with the same minimum authorizations as the Internal Sales
Results Representative (SAP_BR_INTERNAL_SALES_REP) business role template.
(Optional)
Copy the Sales Order number from the report and search for it in the Manage Sales Orders app.

Open the item from the results list and check the details.

Using SAP Build Process Automation

Step # Step Name Instructions

1 Launch Desktop Launch Desktop Agent. Make sure that the agent mode is set to Unattended mode. For more information on
Agent how to set the agent mode, see the Desktop Agent User Guide.

2 Open SAP Build Perform the following steps to release and deploy the task automation:
Process
1. Navigate to the Store and search for the automation project.
Automation

2. Click Add to add the project to the Lobby.

3. In the Lobby, click the project to open the Overview page.

4. Click Release and then click Deploy.

This is custom documentation. For more information, please visit the SAP Help Portal 9
4/18/2024

Step # Step Name Instructions

3 Set Variables Add values to the pre-de ned variables. For the procedure to set the variables, see Set Values to
Environment Variable During Project Deployment.

4 Add a Scheduled To add a Scheduled trigger, see Add an Automation Trigger to a Project.
Trigger
 Note
In the Add Scheduled Trigger dialog box, click the Execute drop-down list to select an automation.

5 Monitor the Job Open SAP Build Process Automation and click Monitor Automation Jobs . You should see your job in
the list. If not, adjust the date range and refresh the page. For more details, refer the Monitor Automation
Jobs topic.

6 Check for Once your job status is Successful, verify that you have received the email with the report in the format you
Report speci ed. You can also verify that the report is saved in the base folder you set up.

Note that you need to specify the recipients' email IDs and base folder path in the variable. See
Environment Variables.

7 Check the Log in to SAP Fiori launchpad with a user with the same minimum authorizations as the Internal Sales
Results Representative (SAP_BR_INTERNAL_SALES_REP) business role template.
(Optional)
Copy a Sales Order number from the Excel report and search for it in the Manage Sales Orders app.

Open the item from the results list and check the details.

Mass Creation of Customer Returns (4HT)


In many companies, the Return Clerks create returns for customers in the system upon receiving their return requests through
emails. In most cases, customers attach an Excel spreadsheet with the details of returning different products for different
reasons. The Return Clerks then identify which return requests belong to which sales orders and then create return documents
with reference to the related sales order in the SAP S/4HANA Cloud system.

The Mass Creation of Customer Returns task automation reads the customer return data lled in an Excel le, and automates
the creation of customer returns into the SAP S/4HANA Cloud system. The Return Clerk receives an email noti cation after the
task is complete.

 Note
This is an API automation and is available in both the attended and scheduled modes.

For security reasons, SAP recommends executing the API automation in the scheduled (unattended) mode. For more
details, see Generic Updates (May 2022) in the What's New section.

Prerequisites
This section summarizes all the prerequisites in terms of systems, software requirements, business role, and sample input data
required to run the task automation.

System Access

Details

SAP S/4HANA Cloud Accessible via SAP Fiori launchpad. Your system administrator provides you with

This is custom documentation. For more information, please visit the SAP Help Portal 10
4/18/2024

Software Requirements
To run the automation, make sure you have the following software installed in your system.

Software Details Supported Version

Windows The operating system of the system. Windows 10


OS

Automation SAP Intelligent Robotic Process Automation


tool
SAP Intelligent Robotic Process Automation Cloud Studio -
To design/customize the template bot.

SAP Intelligent Robotic Process Automation Factory - To


import template automation package and con gure the
automation.

Or,

SAP Build Process Automation

To design/customize the process automation and perform necessary


con gurations to run the automation.

Desktop To run the automation. The desktop agent version must be equal to or
Agent higher than the version speci ed in the package.

Microsoft Microsoft Excel - Automation reads data from the Input Excel le, and 2013 and above
Office writes the output logs to the Excel le.
Microsoft Outlook - Automation sends an email noti cation to the
recipients.

Con gurations
Before you run the automation, perform the following con gurations:

Automation Tool

SAP Intelligent RPA

Install and set up SAP Intelligent Robotic Process Automation tools with necessary user authorization and
con guration. For more details, see the Install and Con gure Process Automation Tools.

Perform tenant con guration in the SAP Intelligent RPA Desktop Agent to establish connection with the
SAP Intelligent Process Automation Factory. Refer to the Desktop Agent User Guide for the steps to
register the agent and add agent to an Environment.

SAP Build Process Automation

Set up SAP Build Process Automation with necessary user authorization and con guration. For more
details, see the SAP Build Process Automation subsections under Install and Con gure Process
Automation Tools.

Install the desktop agent, register your agent and connect it to an SAP Build Process Automation tenant
to run the automations. For more details, see the Install the Desktop Agent to Run Automations and
Manage Desktop Agent topics.

SAP S/4HANA Cloud

This is custom documentation. For more information, please visit the SAP Help Portal 11
4/18/2024
For SAP S/4HANA Cloud systems: Create a communication user, and then create a communication arrangement
between the communication user and the communication scenario in your SAP S/4HANA Cloud system. For more
details, see Communication Management.

For the SAP S/4HANA Cloud system, add the Communication Scenario SAP_COM_0157 to use the API/OData
service.

The automation uses the following OData API service:

API Details Description

API_CUSTOMER_RETURN_SRV The synchronous inbound service used to create, read, update, and delete customer
returns.

Assign the following business roles to your individual test users.

 Note
The following role is provided as an example role from SAP. You can use the sample role as a template to
create your own roles.

Business Role Business Role ID as Delivered by SAP

Returns & Refund Clerk SAP_BR_RETURNS_REFUND_CLERK

Input Excel Template

The automation takes the input from an Excel le lled with required data. The sample Input Excel template is available
with the automation content package. For more details, see the Input Excel Template section.

Base Folder

Create a folder in your local drive where you want to save the input Excel template. Enter the folder path in the variable
for the automation to read the Excel le and to save the output log les. For more details, see the Environment Variables
section.

Input Excel Template


You need to create a base folder to place all the input Excel les that contains the customer returns details and enter the folder
path in the variable BASE_FOLDER_PATH_4HT.

The sample input Excel le is available with the automation project. Download the project from the Store.

Sample Input Template Data


The table provides the sample input data. Refer the sample input Excel template provided with the automation content
package.

 Note
Fields marked with (*) are mandatory input.

This is custom documentation. For more information, please visit the SAP Help Portal 12
4/18/2024

Sample
Data Value Description

CustomerReturn* 000001 Return Order.

CustomerReturnType* CBAR Customer Return Type.

SalesOrganization* 1710 Sales Organization.

DistributionChannel* 10 Distribution Channel.

OrganizationDivision* 00 Division.

SalesGroup 100 A group of sales people who are responsible for processing sales of certain products or
services.

SalesOffice 100 A physical location (for example, a branch office) that has responsibility for the sale of
certain products or services within a given geographical area.

SalesDistrict AT0001 A geographical sales district or region.

SDDocumentReason* 004 Indicates the reason for creating the customer return.

ReferenceSDDocument 16347 Identi es the sales document to which the customer return refers.

SoldToParty* 17100003 The customer who orders the goods or services. The sold-to party is contractually
responsible for sales customer returns.

CustomerReturnItem* 10 Speci es the customer return item number.

HigherLevelItem 0 The number of the higher-level item to which this item belongs in a hierarchy.

Material* IF11 Material.

MaterialByCustomer Test Uniquely identi es the material from the customer's point of view.

MaterialGroup L001 Key that you use to group together several materials or services with the same
attributes, and to assign them to a particular material group.

RequestedQuantity* 1 Requested quantity.

RequestedQuantityUnit EA Unit in which the requested quantity is speci ed.

ProductionPlant 1010 Key that uniquely identi es a plant.

StorageLocation 101A Number of the storage location in which the material is stored. A plant may contain one
or more storage locations.

ShippingPoint 101R The physical location (for example, a warehouse or collection of loading ramps) from
which you ship the item.

ShippingType 01 The means or mode of transport that can be used to carry out a shipment of goods (for
example, by road or rail).

DeliveryPriority 0 The delivery priority assigned to an item.

This is custom documentation. For more information, please visit the SAP Help Portal 13
4/18/2024

Sample
Data Value Description

ReturnReason* 001 Speci es the return reason code for a customer return in Advanced Returns
Management. You can choose 01 to 07:

001: Customer ordered too much

002: Customer bought wrong prod

003: Product damaged

004: Product defective

005: Too much delivered

006: Wrong product delivered

007: Recall by vendor

CustRetItmFollowUpActivity 0001 Speci es the code of the logistical follow-up activity for a returned material (or
product) in Advanced Returns Management.

0001: Receive into plant

0002: Immediately move to free available stock

0004: Ship to other plant

0005: Ship to supplier

0007: Direct shipment to supplier

0008: Inspection at customer site

0013: Product remains at customer site

0021: Send back to customer

ReturnsRefundType* 1 Speci es the type of refund a customer will get for a returned material.

<blank>: Credit memo

1: Replacement

ReturnsRefundProcgMode* I Refund control. Possible values are:

I: Immediately

R: By credit memo request

A: After Receipt of Credit Memo

N: No refund

P: Approved

ReplacementMaterial IF11 Speci es the material that is given to a customer as a replacement for a returned
material.

ReplacementMaterialQuantity 1 Indicates the quantity of the replacement material that you give as compensation in a
customer returns process created in Advanced Returns Management.

ReplacementMatlSupplyingPlant 1010 Speci es the plant from which the replacement material should be delivered to the
customer.

This is custom documentation. For more information, please visit the SAP Help Portal 14
4/18/2024

Sample
Data Value Description

ReturnsRefundExtent* R01 Used in pricing to calculate the refund amount:

R00: 00 % Reduction

R01: 10 % Reduction

R02: 20% Reduction

R03: 30 % Reduction

R04: 40 % Reduction

R05: 50 % Reduction

R06: 60 % Reduction

R07: 70 % Reduction

R08: 80 % Reduction

R09: 90 % Reduction

R10: 100 % Reduction

R11: unclear

CustomerReturnItemCategory TAN A classi cation that distinguishes between different types of item (for example, free of
Standard charge items and text items) and determines how the system processes the item.
Item

IncotermsClassi cation EXW Commonly used trading terms that comply with the standards established by the
International Chamber of Commerce (ICC).

IncotermsTransferLocation Darmstadt Provides additional information for the primary Incoterm.

CustomerPaymentTerms 0004 Key for de ning payment terms composed of cash discount percentages and payment
periods.

ProductTaxClassi cation1 1 Product tax classi cation indicates whether, during pricing, the system determines
taxes that relate to the product (that is, material). For example, state sales taxes.
Following are the options:

0: No tax

1: Full tax

2: Half tax

SalesDocumentRjcnReason 70 The reason for rejecting a customer return.

This is custom documentation. For more information, please visit the SAP Help Portal 15
4/18/2024

Sample
Data Value Description

ItemBillingBlockReason 01 Indicates if the item is blocked for billing. Following are the options:

00: Check day rate

01: Calculation Missing

02: Compl Con rm Missing

03: Prices Incomplete

04: Check Terms of Paymt

05: Check Terms of Dlv

08: Check Credit Memo

09: Check Debit Memo

30: Price Chg. Approval

89: Recipient blocked

RetsMgmtProcessingBlock R Speci es whether a customer returns order is to be blocked pending approval.

ReturnsMaterialHasBeenReceived No/Yes Indicates that material has been received during returns order processing.

PrelimRefundIsDetermined No/Yes Indicates that the refund for the customer has been determined preliminarily in a
returns order for Advanced Returns Management.

Environment Variables
When you deploy the project, set the values for the following environment variables.

 Note
To set values to the Environment Variables in the Cloud Factory, see the Environment Variables from the Cloud Studio.

To set values to the variables in SAP Build Process Automation, see Set Values to Environment Variable During Project
Deployment.

Variable Name Type Sample Value Description

BASE_FOLDER_PATH_4HT Text C:\Users\Desktop\RPA Path to place the Excel input les. The automation
saves the output log les in this folder.

SYSTEMURL_ODATA Text https://<System>-api. System URL with the endpoint


<domain>/sap/opu/odata/sap

EMAIL_RECIPIENTS_4HT Text email@yourdomain.com; Email id of the recipients. Multiple email IDs can
email2@yourdomain.com be entered, each separated by a semicolon (;).

EMAIL_RECIPIENTS_CC_4HT Text email@yourdomain.com; This is an optional variable. Email ID of the


email2@yourdomain.com recipients that you want to add in the CC eld to
send the Carbon Copy (CC) of the email. Multiple
email IDs can be entered each separated by a
semicolon (;).

This is custom documentation. For more information, please visit the SAP Help Portal 16
4/18/2024

Variable Name Type Sample Value Description

S4H_USER_AUTH_4HT Credential Username: COMM_USER_**** Communication User credentials of SAP S/4HANA


Cloud system.
Password: ********

SAP_CLIENT Text Client Number for example: 910 or This is an optional variable and is used when the
000 or 100 or 001 etc. automation has to run directly on the backend
system on a particular client.

 Note
Enter the correct client number to avoid
processing in default client set in the
transaction SICF.

Task Automation Overview


The section provides an overview of the task automation.

Process
Step/Scenario Process Flow

Mass Creation Place the input Excel template lled with customer returns details in a base folder. Enter the folder path in the variable
of Customer BASE_FOLDER_PATH_4HT.
Returns
The automation reads the input Excel from the base folder, processes the data using the API, and creates the return
orders into the SAP S/4HANA Cloud system.

After the task is complete, the processed les are moved to the Success folder within the base folder. Similarly, the
les that are unprocessed are moved to the Error folder. If a le is partially successful, the automation splits the
records into two, and moves into Success and Error folders based on the status.

An email noti cation is sent to the recipients. The email contains base folder path to check the log les.

You can also view the output logs in the automation tool. See Procedure for Running the Automation.

Procedure for Running the Automation


This section describes the steps required to run the task automation in attended and scheduled modes.

Attended Mode
The section describes the procedure to run the automation in attended mode.

Purpose
In this procedure, you can trigger the automation to read the customer returns details from the Excel template placed in the
base folder, and create the customer return orders into the SAP S/4HANA Cloud system.

Procedure
Using SAP Intelligent RPA

This is custom documentation. For more information, please visit the SAP Help Portal 17
4/18/2024

Step # Step Name Instructions

1 Launch Desktop Launch SAP Intelligent RPA Desktop Agent. Make sure that the Interactive (Attended) mode is selected in
Agent the Projects tab. For more details, refer to the Desktop Agent User Guide.

2 Log in to the Under Environments, select or create an environment to deploy the packages. For more information, see
RPA Factory the Install and Con gure Process Automation Tools.

3 Add an To add the trigger, refer to the Add an Attended Trigger for more details.
Attended
Trigger

4 Run the Job Click the Desktop Agent icon on the taskbar and Start the automation job.

Again, click the Desktop Agent icon and select the Mass Creation of Customer Returns scenario.

5 Monitor the Job Open the SAP Intelligent RPA Factory and select Monitoring Jobs . You should see your job in the list.
If not, adjust the date range on the Jobs page and refresh the page. For more details, refer to the Maintain
your Landscape section in the SAP Intelligent RPA Factory User Guide.

6 Check for Once your job status is Successful, verify that you have received the email with the log les in the format
Report you speci ed. You can also verify that the report is saved in the base folder you set up.

Note that you need to specify the recipients' email IDs and base folder path in the Cloud Factory Variable.
See Environment Variables.

7 Check the Log in to SAP Fiori launchpad with a user with the same minimum authorizations as the Returns & Refund
Results Clerk (SAP_BR_RETURNS_REFUND_CLERK) business role template.
(Optional)
Copy a Return Order number from the Excel report and search for it in the Manage Customer Returns app.

Open the item from the results list and check the details.

Using SAP Build Process Automation

Step # Step Name Instructions

1 Launch Desktop Launch Desktop Agent. Make sure that the agent mode is set to Attended mode. For more information on
Agent how to set the agent mode, see the Desktop Agent User Guide.

2 Open SAP Build Perform the following steps to release and deploy the task automation:
Process
1. Navigate to the Store and search for the automation project.
Automation
2. Click Add to add the project to the Lobby.

3. In the Lobby, click the project to open the Overview page.

4. Click Release and then click Deploy.

3 Set Variables Add values to the pre-de ned variables. For the procedure to set the variables, see Set Values to
Environment Variable During Project Deployment.

4 Add an To add an Attended trigger, see Add an Automation Trigger to a Project.


Attended
Trigger

5 Run the Job Click the Desktop Agent icon on the taskbar and Start the automation job.

Again, click the Desktop Agent icon and select the Mass Creation of Customer Returns scenario.

6 Monitor the Job Open SAP Build Process Automation and click Monitor Automation Jobs . You should see your job in
the list. If not, adjust the date range and refresh the page. For more details, refer the Monitor Automation
Jobs topic.

This is custom documentation. For more information, please visit the SAP Help Portal 18
4/18/2024

Step # Step Name Instructions

7 Check for Once your job status is Successful, verify that you have received the email with the log les in the format
Report you speci ed. You can also verify that the report is saved in the base folder you set up.

Note that you need to specify the recipients' email IDs and base folder path in the variable. See
Environment Variables.

8 Check the Log in to SAP Fiori launchpad with a user with the same minimum authorizations as the Returns & Refund
Results Clerk (SAP_BR_RETURNS_REFUND_CLERK) business role template.
(Optional)
Copy a Return Order number from the Excel report and search for it in the Manage Customer Returns app.

Open the item from the results list and check the details.

Scheduled Mode
This section describes the procedure to run the automation in scheduled mode.

Purpose
In this procedure, you can schedule a trigger to read the customer returns details from the Excel template placed in the base
folder, and create the customer return orders into the SAP S/4HANA Cloud system.

Procedure

Using SAP Intelligent RPA

Step # Step Name Instructions

1 Launch Agent Launch SAP Intelligent RPA Desktop Agent. Make sure that the Background (Unattended) mode is
selected in the Projects tab. For more details, refer to the Desktop Agent User Guide

2 Log in to the Under Environments, select or create an environment to deploy the packages. For more information, see
RPA Factory the Install and Con gure Process Automation Tools.

3 Add a To add the trigger, refer to the Add a Scheduled Trigger for more details.
Scheduled
Trigger

4 Monitor the Job Open the SAP Intelligent RPA Factory and select Monitoring Jobs . You should see your job in the list.
If not, adjust the date range on the Jobs page and refresh the page. For more details, refer to the Maintain
your Landscape section in the SAP Intelligent RPA Factory User Guide.

5 Check for Once your job status is Successful, verify that you have received the email with the log les in the format
Report you speci ed. You can also verify that the report is saved in the base folder you set up.

Note that you need to specify the recipients' email IDs and base folder path in the Cloud Factory variable.
See Environment Variables.

6 Check the Log in to SAP Fiori launchpad with a user with the same minimum authorizations as the Returns & Refund
Results Clerk (SAP_BR_RETURNS_REFUND_CLERK) business role template.
(Optional)
Copy a Return Order number from the Excel report and search for it in the Manage Customer Returns app.

Open the item from the results list and check the details.

Using SAP Build Process Automation

This is custom documentation. For more information, please visit the SAP Help Portal 19
4/18/2024

Step # Step Name Instructions

1 Launch Agent Launch Desktop Agent. Make sure that the agent mode is set to Unattended mode. For more information on
how to set the agent mode, see the Desktop Agent User Guide.

2 Open SAP Build Perform the following steps to release and deploy the task automation:
Process
1. Navigate to the Store and search for the automation project.
Automation
2. Click Add to add the project to the Lobby.

3. In the Lobby, click the project to open the Overview page.

4. Click Release and then click Deploy.

3 Set Variables Add values to the pre-de ned variables. For the procedure to set the variables, see Set Values to
Environment Variable During Project Deployment.

4 Add a To add a Scheduled trigger, see Add an Automation Trigger to a Project.


Scheduled
Trigger  Note
In the Add Scheduled Trigger dialog box, click the Execute drop-down list to select an automation.

5 Monitor the Job Open SAP Build Process Automation and click Monitor Automation Jobs . You should see your job in
the list. If not, adjust the date range and refresh the page. For more details, refer the Monitor Automation
Jobs topic.

6 Check for Once your job status is Successful, verify that you have received the email with the log les in the format
Report you speci ed. You can also ver y that the report is saved in the base folder you set up.

Note that you need to specify the recipients' email IDs and base folder path in the variable. See
Environment Variables.

7 Check the Log in to SAP Fiori launchpad with a user with the same minimum authorizations as the Returns & Refund
Results Clerk (SAP_BR_RETURNS_REFUND_CLERK) business role template.
(Optional)
Copy a Return Order number from the Excel report and search for it in the Manage Customer Returns app.

Open the item from the results list and check the details.

Automatic Creation of Sales Order from Unstructured Data (5LT)


Sales order processing forms an important part of the order-to-cash process for enterprises. In most B2B scenarios, the
Internal Sales Representatives get purchase order requests through unstructured les like pdf, tif, jpg, tiff, jpeg, and png
attached to the emails sent from the buyers. The Internal Sales Representatives have to create sales orders manually and
individually in the system based on the les received over emails. This is a time-consuming and error-prone process that adds
unnecessary manual effort and poses potential risks to the business in such a highly competitive business world.

The Automatic Creation of Sales Order from Unstructured Data task automation is used to automate the process by providing
two scenarios - Create Sales Order Requests and Create Sales Orders.

In Create Sales Order Requests scenario, the automation monitors the incoming unread emails with the Purchase Order in the
form of attachment. The automation scans the Inbox using the Subject keyword de ned in the variable. For example, if the
Subject keyword is de ned as ʻPurchase Order’, the automation scans each unread email and reads the Subject line to nd the
emails with the attachments. The automation extracts the attachments ( les of format pdf, jpg, jpeg, tif, tiff, and png) from the
email and uploads the les into the SAP S/4HANA system to generate the Sales Order Request numbers. After the task is
complete, the automation generates success and/or error Excel les to log the outcome, and an email noti cation is sent to the
recipients with the log les attachments.

This is custom documentation. For more information, please visit the SAP Help Portal 20
4/18/2024
In Create Sales Order scenario, the automation reads the Excel le that contains the Sales Order Request numbers from the
base folder, veri es the data, and creates the Sales Orders into the SAP S/4HANA system. When the task is complete, the
automation generates success and/or error Excel les to log the outcome, and an email noti cation is sent to the recipients
with the log les attachments.

The following video provides an overview of how the task automation is used to create sales orders from unstructured data in
the SAP S/4HANA Cloud system.

Open this video in a new window

Prerequisites
This section summarizes all the prerequisites in terms of systems, software requirements, business role, and API details
required to run the task automation.

System Access

Details

SAP S/4HANA Cloud Accessible via SAP Fiori launchpad. Your system administrator provides you with
the URL to access the various apps assigned to your role.

Software Requirements
To run the automation, make sure you have the following software installed in your system.

Software Details Supported Version

Windows The operating system of the system. Windows 10


OS

This is custom documentation. For more information, please visit the SAP Help Portal 21
4/18/2024

Software Details Supported Version

Automation SAP Intelligent Robotic Process Automation


tool
SAP Intelligent Robotic Process Automation Cloud Studio -
To design/customize the template bot.

SAP Intelligent Robotic Process Automation Factory - To


import template automation package and con gure the
automation.

Or,

SAP Build Process Automation

To design/customize the process automation and perform necessary


con gurations to run the automation.

Desktop To run the automation. The desktop agent version must be equal to or
Agent higher than the version speci ed in the package.

Microsoft Microsoft Excel - Automation writes the Output log into the Excel le. 2013 and above
Office Microsoft Outlook - Automation retrieves the input les from the
emails, and sends an email noti cation to the recipients.

Con gurations
Before you run the automation, perform the following con gurations:

Automation Tool

SAP Intelligent RPA

Install and set up SAP Intelligent Robotic Process Automation tools with necessary user authorization and
con guration. For more details, see the Install and Con gure Process Automation Tools.

Perform tenant con guration in the SAP Intelligent RPA Desktop Agent to establish connection with the
SAP Intelligent Process Automation Factory. Refer to the Desktop Agent User Guide for the steps to
register the agent and add agent to an Environment.

SAP Build Process Automation

Set up SAP Build Process Automation with necessary user authorization and con guration. For more
details, see the SAP Build Process Automation subsections under Install and Con gure Process
Automation Tools.

Install the desktop agent, register your agent and connect it to an SAP Build Process Automation tenant
to run the automations. For more details, see the Install the Desktop Agent to Run Automations and
Manage Desktop Agent topics.

SAP S/4HANA Cloud

Assign the following business roles to your individual test users.

 Note
The following role is provided as an example role from SAP. You can use the sample role as a template to
create your own roles.

Business Role Business Role ID as Delivered by SAP

This is custom documentation. For more information, please visit the SAP Help Portal 22
4/18/2024

Business Role Business Role ID as Delivered by SAP

Internal Sales Representative SAP_BR_INTERNAL_SALES_REP

Activate the scope item Create Sales Orders from Unstructured Data (4X9) in the system.

Input Excel Template

For the Create Sales Order scenario, the automation takes the input from an Excel le lled with the Sales Order
Request numbers. The sample input Excel template is available with the automation project. For more details, see the
Input Excel Template section.

Base Folder

Create a folder in your local drive where the automation can save the Output Excel les from the Create Sales Order
Requests and Create Sales Order scenarios. Enter the folder path in the variable. For more details, see the Environment
Variables section.

Input Excel Template


After you run the Create Sales Order Requests scenario, the automation saves the Sales Order Requests numbers into an Excel
le. Then, automation creates the 5LT_Create Sales Order folder within the base folder and saves the Excel le into that folder .

When you run the Create Sales Order scenario, the automation reads the Sales Order Requests number from the Excel le
saved in the 5LT_Create Sales Order folder and creates the Sales Orders into the SAP S/4HANA Cloud system.

You can directly run the Create Sales Order scenario by providing the Sales Order Requests numbers into an Excel le. You must
place the Excel le in the 5LT_Create Sales Order folder within the base folder.

 Note
You must create the 5LT_Create Sales Order folder within the base folder. Then, enter the base folder path in the variable
BASE_FOLDER_PATH_5LT.

The sample input Excel le is available with the automation project. Download the project from the Store.

Sample Input Data


The table provides the sample input data.

Data Sample Value Description

SalesOrderRequestNo 100000383 Sales Order Request Number

Environment Variables
When you deploy the project, set the values for the following environment variables.

 Note
To set values to the Environment Variables in the Cloud Factory, see the Environment Variables from the Cloud Studio.

This is custom documentation. For more information, please visit the SAP Help Portal 23
4/18/2024
To set values to the variables in SAP Build Process Automation, see Set Values to Environment Variable During Project
Deployment.

Applicable
Variable Name Scenario Type Sample Value Description

BASE_FOLDER_PATH_5LT Create Sales Text C:\Users\Desktop\RPA For the Create Sales


Order Requests Order Requests
and Create Sales scenario, the automation
Order scenarios stores the les
extracted from the
 Note
emails to this folder and
This variable creates a subfolder
is mandatory 5LT_Create Sales Order
for both the Requests to save the
scenarios output Excel le.

For the Create Sales


Order scenario, the
automation creates the
Error and Success
folders to store the
Output logs.

SYSTEMURL_APP Create Sales Text https://<System.wdf.sap.corp/ui> System URL to access


Order Requests SAP S/4HANA Cloud
and Create Sales logon page.
Order scenarios

 Note
This variable
is mandatory
for both the
scenarios

EMAIL_RECIPIENTS_5LT Create Sales Text email@yourdomain.com; (Optional) Email ID of


Order Requests email2@yourdomain.com the recipients to send
and Create Sales the output logs. Multiple
Order scenarios email IDs can be
entered, each separated
by a semicolon (;).

COMPANYCODE_5LT Create Sales Text 1010 Company Code to


Order Requests upload the les.
scenario
 Note
Enter only one
Company Code in
this variable.

This is custom documentation. For more information, please visit the SAP Help Portal 24
4/18/2024

Applicable
Variable Name Scenario Type Sample Value Description

S4H_USER_AUTH_5LT Create Sales Credential Username: INCOMING_USER (Optional) Login


Order Requests credentials of the
Password: ********
and Create Sales system.
Order scenarios
 Note
It is recommended to
add generic login
credentials of the
system.

Or,

You can enable Single


Sign-On (SSO) in
your Google Chrome
browser.

 Remember
This variable is
optional only for
attended mode. For
scheduled mode, it
is mandatory to
provide the login
credentials if the
SSO is not enabled.

EMAILID_TO_SCAN_5LT Create Sales Text email1@domain.com Email ID of the


Order Requests Microsoft Outlook
scenario account to scan.

EMAIL_SUBJECT_5LT Create Sales Text Purchase Order, Sales Order, Production To scan the unread
Order Requests Order. emails in the Inbox
scenario based on the given
Subject keyword.
Multiple keywords can
be entered, each
separated by a comma
(,).

Task Automation Overview


The section provides an overview of the task automation.

 Note
When you run the automation, make sure that you do not use or perform any tasks on the application/screen being used by
the automation.

Process
Step/Scenario Process Flow

This is custom documentation. For more information, please visit the SAP Help Portal 25
4/18/2024

Process
Step/Scenario Process Flow

Create Sales Automation reads the email ID whose Inbox has to be scanned from the variable EMAILID_TO_SCAN_5LT, and scans
Order the Inbox for the unread emails one-by-one with the Subject keyword provided in the variable EMAIL_SUBJECT_5LT.
Requests
 Note
The automation scans the unread emails by performing the partial-match of the Subject keyword on the Subject line.
You can provide multiple Subject keywords, each separated by a comma (,).

The automation creates the 5LT_Create Sales Order Requests folder within the base folder. The emails are scanned
one after the other, by saving the attachments extracted from the email to the 5LT_Create Sales Order Requests folder.

 Note
The supported les formats are pdf, jpg, jpeg, tif, tiff, and png.

 Note
The automation opens the application in the Google Chrome browser to upload the les.

Though automation logs into the application with the system credentials provided in the S4H_USER_AUTH_5LT
(optional) variable, it is recommended to enable Single Sign-On (SSO).

You can also log in to the system manually by entering the login credentials. Here, the automation waits for a
stipulated time to enter the credentials before sending the time-out error.

After uploading the le to the system, the automation generates the output Excel les and logs the Sales Order Request
number along with other details.

After the task is complete, the automation creates the Success, Error, and Failed Attachments folders in the
5LT_Create Sales Order Requests folder.

The output Excel les with the success logs are moved to the Success folder. For a success scenario, the Sales Order
Request attachments are deleted from the folder after the upload is complete.

Similarly, les with the error log move to the Error folder. For an error scenario, the attachments are moved to the Failed
Attachments folder with a time stamp appended to the le name.

The automation enters all the Sales Order Request numbers into an Excel le. The automation creates the 5LT_Create
Sales Order folder within the base folder and saves the le to the folder. The Sales Order Request numbers are used as
input data for the Create Sales Order scenario.

If the automation stops abruptly with a timeout error, then the execution results are logged into the success or error le.
When you rerun the automation, any unprocessed attachments in the folder are picked up rst for the upload and then
the pending unread emails are scanned for attachments.

You can also view the logs in the automation tool. See Procedure for Running the Automation.

An email noti cation, with the success and error Excel les, is sent to the recipients email ID speci ed in the variable
EMAIL_RECIPIENTS_5LT.

This is custom documentation. For more information, please visit the SAP Help Portal 26
4/18/2024

Process
Step/Scenario Process Flow

Create Sales The automation reads the Sales Order Requests numbers from the Excel les saved in the 5LT_Create Sales Order
Order folder.

The automation performs a search of the Sales Order Number in the Create Sales Orders – Automatic Extraction
application and veri es data for completeness. If the data completeness status is Complete, then the automation
creates the Sales Order and generates a Sales Order number.

After the task is complete, the automation creates the Success and Error folders in the 5LT_Create Sales Order folder.
The output Excel le with the success logs is moved to the Success folder. Similarly, the error logs le is moved to the
Error folder.

You can also view the logs in the automation tool. See Procedure for Running the Automation.

An email noti cation is sent to the recipients email ID speci ed in the variable EMAIL_RECIPIENTS_5LT.

Procedure for Running the Automation


This section describes the steps required to run the task automation in attended and scheduled modes.

Attended Mode
This section describes the procedure to run the automation in attended mode.

Purpose
In this procedure, you can trigger the automation to create the Sales Order Requests, from the purchase order attachments
received via email, into the SAP S/4HANA Cloud system, and then create the Sales Orders.

 Note
When you run the automation, make sure that you do not use or perform any tasks on the application/screen being used by
the automation.

Before you run the automation, clear all the applied lters on the Create Sales Order - Automatic Extraction app and reset
to default Standard view.

Procedure

Using SAP Intelligent RPA

Step # Step Name Instructions

1 Launch Desktop Launch SAP Intelligent RPA Desktop Agent. Make sure that the Interactive (Attended) mode is selected in
Agent the Projects tab. For more details, refer to the Desktop Agent User Guide.

2 Log in to the Under Environments, select or create an environment to deploy the packages. For more information, see
RPA Factory the Install and Con gure Process Automation Tools.

3 Add an To add the trigger, refer to the Add an Attended Trigger for more details.
Attended
Trigger

This is custom documentation. For more information, please visit the SAP Help Portal 27
4/18/2024

Step # Step Name Instructions

Create Sales Order Requests Scenario

4 Run the Job Click the Desktop Agent icon on the taskbar and Start the automation job.

Again, click the Desktop Agent icon and select the Create Sales Order Requests scenario.

5 Check the 1. Automation logs into the SAP S/4HANA Cloud system automatically only if the credentials are
screens speci ed in the variable S4H_USER_AUTH_5LT. Else, you need to enter the login credentials
scrapping manually.
process
2. Automation scans the Inbox for the unread emails as per the Subject keywords speci ed in the
variables, and downloads the attachments in the 5LT_Create Sales Order Requests folder within
the base folder location.

3. Automation opens the Create Sales Orders – Automatic Extraction app and clicks the Upload
button.

4. Automation enters the Company Code read from variable COMPANYCODE_5LT.

5. Automation clicks the Browse button to select the le saved in the base folder, and then clicks the
Upload button.

6. Automation checks the status of the upload for success and error, and captures the Sales Order
Request number in the log le along with other information.

7. The Automation enters all the Sales Order Request numbers into a le, and places the le into the
5LT_Create Sales Order folder within the base folder.

6 Monitor the Job Open the SAP Intelligent RPA Factory and select Monitoring Jobs . You should see your job in the list.
If not, adjust the date range on the Jobs page and refresh the page. For more details, refer to the Maintain
your Landscape section in the SAP Intelligent RPA Factory User Guide.

7 Check for Once your job status is Successful, check the output log le in the base folder location speci ed in the
Report variable. See the Environment Variables section.

8 Check the Log in to SAP Fiori launchpad with the same minimum authorizations as the Internal Sales Representative
Results (SAP_BR_INTERNAL_SALES_REP) business roles template.
(Optional)
Copy a Sales Order Request number from the report and search for it in the Create Sales Orders –
Automatic Extraction app.

Open the item from the results list and check the details.

Create Sales Order Scenario

9 Run the Job Click the Desktop Agent icon and select the Create Sales Order scenario.

10 Check the 1. Automation logs in to the SAP S/4HANA Cloud system automatically only if the credentials are
screens speci ed in the variable S4H_USER_AUTH_5LT. Else, you need to enter the login credentials
scrapping manually.
process
2. Automation opens the Create Sales Orders – Automatic Extraction app, and reads the Sales Order
Request number from the 5LT_Create Sales Order folder within the base folder.

3. Automation performs a search for the Sales Order Request number in the application, and veri es if
the status of Data Completeness is Complete.

4. If the status is Complete, the automation clicks the Create Sales Order button.

5. Automation checks the status of the Order Creation for success and error, and captures the Sales
Order number in the Output log le.

11 Monitor the Job Open the SAP Intelligent RPA Factory and select Monitoring Jobs . You should see your job in the list.
If not, adjust the date range on the Jobs page and refresh the page. For more details, refer to the Maintain
your Landscape section in the SAP Intelligent RPA Factory User Guide.

This is custom documentation. For more information, please visit the SAP Help Portal 28
4/18/2024

Step # Step Name Instructions

12 Check for Once your job status is Successful, check the output log le in the base folder location speci ed in the
Report variable. See the Environment Variables section.

13 Check the Log in to SAP Fiori launchpad with the same minimum authorizations as the Internal Sales Representative
Results (SAP_BR_INTERNAL_SALES_REP) business roles template.
(Optional)
Copy a Sales Order number from the report and search for it in the Create Sales Orders – Automatic
Extraction app.

Open the item from the results list and check the details.

Using SAP Build Process Automation

Step # Step Name Instructions

1 Launch Desktop Launch Desktop Agent. Make sure that the agent mode is set to Attended mode. For more information on
Agent how to set the agent mode, see the Desktop Agent User Guide.

2 Open SAP Build Perform the following steps to release and deploy the task automation:
Process
1. Navigate to the Store and search for the automation project.
Automation
2. Click Add to add the project to the Lobby.

3. In the Lobby, click the project to open the Overview page.

4. Click Release and then click Deploy.

3 Set Variables Add values to the pre-de ned variables. For the procedure to set the variables, see Set Values to
Environment Variable During Project Deployment.

4 Add an To add an Attended trigger, see Add an Automation Trigger to a Project.


Attended
Trigger

Create Sales Order Requests Scenario

5 Run the Job Click the Desktop Agent icon on the taskbar and Start the automation job.

Again, click the Desktop Agent icon and select the Create Sales Order Requests scenario.

6 Check the 1. Automation logs into the SAP S/4HANA Cloud system automatically only if the credentials are
screens speci ed in the variable S4H_USER_AUTH_5LT. Else, you need to enter the login credentials
scrapping manually.
process
2. Automation scans the Inbox for the unread emails as per the Subject keywords speci ed in the
variables, and downloads the attachments in the 5LT_Create Sales Order Requests folder within
the base folder location.

3. Automation opens the Create Sales Orders – Automatic Extraction app and clicks the Upload
button.

4. Automation enters the Company Code read from variable COMPANYCODE_5LT.

5. Automation clicks the Browse button to select the le saved in the base folder, and then clicks the
Upload button.

6. Automation checks the status of the upload for success and error, and captures the Sales Order
Request number in the log le along with other information.

7. The Automation enters all the Sales Order Request numbers into a le, and places the le into the
5LT_Create Sales Order folder within the base folder.

This is custom documentation. For more information, please visit the SAP Help Portal 29
4/18/2024

Step # Step Name Instructions

7 Monitor the Job Open SAP Build Process Automation and click Monitor Automation Jobs . You should see your job in
the list. If not, adjust the date range and refresh the page. For more details, refer the Monitor Automation
Jobs topic.

8 Check for Once your job status is Successful, check the output log le in the base folder location speci ed in the
Report variable. See the Environment Variables section.

9 Check the Log in to SAP Fiori launchpad with the same minimum authorizations as the Internal Sales Representative
Results (SAP_BR_INTERNAL_SALES_REP) business roles template.
(Optional)
Copy a Sales Order Request number from the report and search for it in the Create Sales Orders –
Automatic Extraction app.

Open the item from the results list and check the details.

Create Sales Order Scenario

10 Run the Job Click the Desktop Agent icon and select the Create Sales Order scenario.

11 Check the 1. Automation logs in to the SAP S/4HANA Cloud system automatically only if the credentials are
screens speci ed in the variable S4H_USER_AUTH_5LT. Else, you need to enter the login credentials
scrapping manually.
process
2. Automation opens the Create Sales Orders – Automatic Extraction app, and reads the Sales Order
Request number from the 5LT_Create Sales Order folder within the base folder.

3. Automation performs a search for the Sales Order Request number in the application, and veri es if
the status of Data Completeness is Complete.

4. If the status is Complete, the Automation clicks the Create Sales Order button.

5. Automation checks the status of the Order Creation for success and error, and captures the Sales
Order number in the Output log le.

12 Monitor the Job Open SAP Build Process Automation and click Monitor Automation Jobs . You should see your job in
the list. If not, adjust the date range and refresh the page. For more details, refer the Monitor Automation
Jobs topic.

13 Check for Once your job status is Successful, check the output log le in the base folder location speci ed in the
Report variable. See the Environment Variables section.

14 Check the Log in to SAP Fiori launchpad with the same minimum authorizations as the Internal Sales Representative
Results (SAP_BR_INTERNAL_SALES_REP) business roles template.
(Optional)
Copy a Sales Order number from the report and search for it in the Create Sales Orders – Automatic
Extraction app.

Open the item from the results list and check the details.

Scheduled Mode
This section describes the procedure to run the automation in scheduled mode.

Purpose
In this procedure, you can add a schedule to trigger to create the Sales Order Requests, from the purchase order attachments
received via email, into the SAP S/4HANA Cloud system, and then create the Sales Orders.

 Note

This is custom documentation. For more information, please visit the SAP Help Portal 30
4/18/2024
When you run the automation, make sure that you do not use or perform any tasks on the application/screen being used by
the automation.

Before you run the automation, clear all the applied lters on the Create Sales Order - Automatic Extraction app and reset
to default Standard view.

Procedure
Using SAP Intelligent RPA

Step # Step Name Instructions

1 Launch Desktop Launch SAP Intelligent RPA Desktop Agent. Make sure that the Background (Unattended) mode is
Agent selected in the Projects tab. For more details, refer to the Desktop Agent User Guide

2 Log in to the Under Environments, select or create an environment to deploy the packages. For more information, see
RPA Factory the Install and Con gure Process Automation Tools.

3 Add a To add the trigger, refer to the Add a Scheduled Trigger for more details.
Scheduled
Trigger  Note
You must create separate triggers for each automation - Create Sales Order Requests and Create Sales
Order. In the Add Scheduled Trigger dialog box, click the Execute drop-down list to select an
automation and then set appropriate Recurrence and Job expire after values for the selected
automation.

Create Sales Order Requests Scenario

4 Check the 1. Automation logs into the SAP S/4HANA Cloud system automatically using the credentials speci ed
screens in the variable S4H_USER_AUTH_5LT.
scrapping
process 2. Automation scans the Inbox for the unread emails as per the Subject keywords speci ed in the
(Optional) variables, and downloads the attachments in the 5LT_Create Sales Order Requests folder within
the base folder location.

3. Automation opens the Create Sales Orders – Automatic Extraction app and clicks the Upload
button.

4. Automation enters the Company Code read from variable COMPANYCODE_5LT.

5. Automation clicks the Browse button to select the le saved in the base folder, and then clicks the
Upload button.

6. Automation checks the status of the upload for success and error, and captures the Sales Order
Request number in the log le along with other information.

7. Automation enters all the Sales Order Request numbers into a le, and places the le into the
5LT_Create Sales Order folder within the base folder.

5 Monitor the Job Open the SAP Intelligent RPA Factory and select Monitoring Jobs . You should see your job in the list.
If not, adjust the date range on the Jobs page and refresh the page. For more details, refer to the Maintain
your Landscape section in the SAP Intelligent RPA Factory User Guide.

6 Check for Once your job status is Successful, check the output log le in the base folder location speci ed in the
Report variable. See the Environment Variables section.

This is custom documentation. For more information, please visit the SAP Help Portal 31
4/18/2024

Step # Step Name Instructions

7 Check the Log in to SAP Fiori launchpad with the same minimum authorizations as the Internal Sales Representative
Results (SAP_BR_INTERNAL_SALES_REP) business roles template.
(Optional)
Copy a Sales Order Request number from the report and search for it in the Create Sales Orders –
Automatic Extraction app.

Open the item from the results list and check the details.

Create Sales Order Scenario

8 Check the 1. Automation logs in to the SAP S/4HANA Cloud system automatically using the credentials speci ed
screens in the variable S4H_USER_AUTH_5LT.
scrapping
process 2. Automation opens the Create Sales Orders – Automatic Extraction app, and reads the Sales Order
(optional) Request number from the 5LT_Create Sales Order folder.

3. Automation performs a search for the Sales Order Request number in the application, and veri es if
the status of Data Completeness is Complete.

4. If the status is Complete, the automation clicks the Create Sales Order button.

5. Automation checks the status of the Order Creation for success and error, and captures the Sales
Order number in the Output log le.

9 Monitor the Job Open the SAP Intelligent RPA Factory and select Monitoring Jobs . You should see your job in the list.
If not, adjust the date range on the Jobs page and refresh the page. For more details, refer to the Maintain
your Landscape section in the SAP Intelligent RPA Factory User Guide.

10 Check for Once your job status is Successful, check the output log le in the base folder location speci ed in the
Report variable. See the Environment Variables section.

11 Check the Log in to SAP Fiori launchpad with the same minimum authorizations as the Internal Sales Representative
Results (SAP_BR_INTERNAL_SALES_REP) business roles template.
(Optional)
Copy a Sales Order number from the report and search for it in the Create Sales Orders – Automatic
Extraction app.

Open the item from the results list and check the details.

Using SAP Build Process Automation

Step # Step Name Instructions

1 Launch Desktop Launch Desktop Agent. Make sure that the agent mode is set to Unattended mode. For more information on
Agent how to set the agent mode, see the Desktop Agent User Guide.

2 Open SAP Build Perform the following steps to release and deploy the task automation:
Process
1. Navigate to the Store and search for the automation project.
Automation
2. Click Add to add the project to the Lobby.

3. In the Lobby, click the project to open the Overview page.

4. Click Release and then click Deploy.

3 Set Variables Add values to the pre-de ned variables. For the procedure to set the variables, see Set Values to
Environment Variable During Project Deployment.

This is custom documentation. For more information, please visit the SAP Help Portal 32
4/18/2024

Step # Step Name Instructions

4 Add a To add a Scheduled trigger, see Add an Automation Trigger to a Project.


Scheduled
Trigger  Note
You must create separate triggers for each automation - Create Sales Order Requests and Create Sales
Order. In the Add Scheduled Trigger dialog box, click the Execute drop-down list to select an
automation and then set appropriate Recurrence and Job expire after values for the selected
automation.

Create Sales Order Requests Scenario

5 Check the 1. Automation logs into the SAP S/4HANA Cloud system automatically using the credentials speci ed
screens in the variable S4H_USER_AUTH_5LT.
scrapping
process 2. Automation scans the Inbox for the unread emails as per the Subject keywords speci ed in the
(Optional) variables, and downloads the attachments in the 5LT_Create Sales Order Requests folder within
the base folder location.

3. Automation opens the Create Sales Orders – Automatic Extraction app and clicks the Upload
button.

4. Automation enters the Company Code read from variable COMPANYCODE_5LT.

5. Automation clicks the Browse button to select the le saved in the base folder, and then clicks the
Upload button.

6. Automation checks the status of the upload for success and error, and captures the Sales Order
Request number in the log le along with other information.

7. Automation enters all the Sales Order Request numbers into a le, and places the le into the
5LT_Create Sales Order folder within the base folder.

6 Monitor the Job Open SAP Build Process Automation and click Monitor Automation Jobs . You should see your job in
the list. If not, adjust the date range and refresh the page. For more details, refer the Monitor Automation
Jobs topic.

7 Check for Once your job status is Successful, check the output log le in the base folder location speci ed in the
Report variable. See the Environment Variables section.

8 Check the Log in to SAP Fiori launchpad with the same minimum authorizations as the Internal Sales Representative
Results (SAP_BR_INTERNAL_SALES_REP) business roles template.
(Optional)
Copy a Sales Order Request number from the report and search for it in the Create Sales Orders –
Automatic Extraction app.

Open the item from the results list and check the details.

Create Sales Order Scenario

9 Check the 1. Automation logs in to the SAP S/4HANA Cloud system automatically using the credentials speci ed
screens in the variable S4H_USER_AUTH_5LT.
scrapping
process 2. Automation opens the Create Sales Orders – Automatic Extraction app, and reads the Sales Order
(optional) Request number from the 5LT_Create Sales Order folder.

3. Automation performs a search for the Sales Order Request number in the application, and veri es if
the status of Data Completeness is Complete.

4. If the status is Complete, the automation clicks the Create Sales Order button.

5. Automation checks the status of the Order Creation for success and error, and captures the Sales
Order number in the Output log le.

This is custom documentation. For more information, please visit the SAP Help Portal 33
4/18/2024

Step # Step Name Instructions

10 Monitor the Job Open SAP Build Process Automation and click Monitor Automation Jobs . You should see your job in
the list. If not, adjust the date range and refresh the page. For more details, refer the Monitor Automation
Jobs topic.

11 Check for Once your job status is Successful, check the output log le in the base folder location speci ed in the
Report variable. See the Environment Variables section.

12 Check the Log in to SAP Fiori launchpad with the same minimum authorizations as the Internal Sales Representative
Results (SAP_BR_INTERNAL_SALES_REP) business roles template.
(Optional)
Copy a Sales Order number from the report and search for it in the Create Sales Orders – Automatic
Extraction app.

Open the item from the results list and check the details.

This is custom documentation. For more information, please visit the SAP Help Portal 34

You might also like