Setting Up Create Sales Orders from Unstructured Data(Fiori App Available in S/4 HANA Cloud 2011)
With Create Sales Orders from Unstructured Data fiori application, you as an internal sales representative can create sales orders from PDF files. After a purchase order file in PDF format is uploaded, the system automatically extracts data from the file and determines master data (for example, identify the sold-to party based on the purchaser’s name and address, sales area, and product ) from the extracted data. This data is saved in a sales order request, which you can later convert into a sales order. The automated process reduces the manual effort required to create sales orders from PDF files.
The overall processing flow in this app is displayed as shown in the following figure:
- The Document Information Extraction service has been enabled using the SAP Cloud Platform Cockpit.
- The scope item 4X9 (Create Sales Orders from Unstructured Data) has been activated in SAP S/4HANA Cloud.
This session describes how you can implement the cloud-to-cloud de-ployment option without the SAP Cloud Platform Integration middleware in between, as depicted in the following figure:
Document Information Extraction Activation:
Document Information Extraction helps you to process large amounts of business documents that have content in headers and tables. You can use the extracted information, for example, to automatically process payables, invoices, or payment notes while making sure that invoices and payables match. After you upload a document file to the service, it returns the extraction results from header fields and line items in JSON format.
This service runs in the Cloud Foundry environment and carries out the following steps to extract information from the uploaded document file:
- The document is submitted to optical character recognition
- The information from the document is extracted to a JSON file, which the user can query.
Service Configuration in SAP Cloud Platform:
- Create Customer owned SCP consumer account (or identify it if it already exists)
- Check the available entitlements of the service plan for this subaccount, If you do not find the service in your list, proceed as follows:
- Click Configure Entitlements
- Click Add Service Plans
- Select Document Information Extraction and choose the default service plan. Click Add 1 Service Plan
- Save your Entitlements changes
- Create Customer owned SCP space if not exists in the subaccount
4. Click Service Marketplace on the navigation side bar, and search for Document Information Extraction and click the tile to access the service. .
5. Create DOX service instance for “document-information-extraction” service
- Click Instances on the navigation side bar
- Click New Instance to start the creation dialog
- In the dialog, leave the default value for the service plan and click Next
- Leave the parameters empty and click Next
- Do not assign any application and click Next
- Finally, enter a name for your new instance as sales-order-request-dox
- Click Finish to create the instance
6. Create service key in SCP (Contains SCP Oauth2.0 URL/ClientID/Client Secret)
- To create service keys, first access your service instance by clicking its name
- Now select Service Keys on the navigation side bar
- Click Create Service Key to start the creation dialog
- In the dialog, enter sales-order-request-dox -keys as the name for your service keys. Leave the Configuration Parameters (JSON) box empty.
- Click Save to create the service keys
S/4 Hana Cloud Communication Setup:
Now we need to enable the communication between SAP S/4HANA Cloud and Document Information Extraction. This scenario enables the Create Sales Order – Automatic Extraction app in SAP S/4HANA Cloud to retrieve extracted purchase order data from the Document Information Extraction service on SAP Cloud Platform.
Create Communication Systems:
- Open the Communication Systems app by choosing Communication Management – >Communication Systems.
2. Choose New to create a communication system.
3. On the New Communication System screen, make the following entries:
- ID: <SCP DOX ID>, for example, SCP_DOX
- System Name: <SCP DOX Description>, for example, SCP DOX Service System
4. Choose Create.
5. On the Communication Systems screen, make the following entries:
- Host Name: <SCP DOX Service System> For example, cfapps.sap.hana.ondemand.com
- Port: 443
For example, xxx.authentication.sap.hana.ondemand.com/oauth/token/authorize
4. Token Endpoint: <Token Endpoint in SCP dox service instance
For example, authentication.sap.hana.ondemand.com/oauth/token
6. In the User for Outbound Communication User screen, choose Add.
7. On the New Outbound Communication User screen, enter the following details:
- Authentication Method: OAuth 2.0
- OAuth 2.0 Client ID: <Client ID in SCP dox service instance>
- Client Secret: <Password in SCP dox service instance>
8. Choose OK and then save.
Maintain Communication Arrangement:
- Select Communication Management -> Communication Arrangements.
- Open Communication Arrangement
- Choose New.
- On the Communication Arrangement screen, make the following entries:
- Scenario: SAP_COM_0641
- Choose Create.
- On the Communication Arrangement screen, make the following entries:
- Communication System： <SCP DOX ID>, for example, SCP_DOX
- Maintain the paths for the following services:
- Outbound Services:
- Service – Documents REST service
- Path – /document-information-extraction/v1/
- The system now automatically updates default information from the communication system and communication scenario. For example, user IDs as well as inbound and outbound services.
- Choose Save.
Application Create Sales Orders from Unstructured Data Testing:
Finally we have completed all the configurations and its time for testing. Before testing please make sure this application role was assigned to the user in fiori launchpad.
To access this app, add either of the following to your user:
- Business role template Internal Sales Representative (SAP_BR_INTERNAL_SALES_REP)
- Business catalog Sales – Sales Order Automation (SAP_SD_BC_SO_EXTRACTION_PC)
- Open the fiori launchpad and Click on Create Sales Orders Automatic Extraction Tile
- Click on the Upload File button as shown below
- Enter the Company code and Upload the Purchase Order pdf file
- After the file is successfully uploaded, the system creates a sales order request, which contains the uploaded file as an attachment, and starts data extraction. You need to wait some time to view the extraction result. You can retry if data extraction fails
- After the purchase order data is extracted into a sales order request, the system performs master data determination and checks the data completeness of the sales order request. As shown below, you have option to Edit, Delete and Create Sales Order.
- Before you create a sales order,please verify the Header details
- Before you create a sales order, please verify the Item details
- Once you verify all the details, please click on the Create Sales Order button
- Once the sales order has been created, you can see the Sales Order Number and navigate to related apps through its document number (ID).
- For integration details, see https://help.sap.com/viewer/0f69f8fb28ac4bf48d2b57b9637e81fa/2011.500/en-US/aee553e6ddbb4af69a3b798722edfec3.html
- To learn more about Document information Extraction, see https://help.sap.com/viewer/5fa7265b9ff64d73bac7cec61ee55ae6/SHIP/en-US/dc933b03badd406086fd1dee7708cc9d.html
- To learn more about scope item 4X9, see https://rapid.sap.com/bp/#/browse/scopeitems/4X9
- Document information Extraction API, see https://aiservices-dox.cfapps.eu10.hana.ondemand.com/document-information-extraction/v1/
- Output Management, see https://wiki.wdf.sap.corp/wiki/display/SimplSuite/Output+Management
- SAP S/4HANA Cloud – Sales Order Automation Video from SAP Technology
Thanks & Regards,