How to automate email into SAP ECC 6.0
Short answer
Read a shared mailbox over IMAP or Microsoft Graph, extract the document with an AI model, validate against ECC master data, and create sales orders, PO confirmations or parked invoices through BAPIs with a human review queue for anything below the confidence threshold. SAPconnect handles outbound mail only.
Order desks on ECC often receive customer purchase orders as PDF or Excel attachments and rekey them into VA01. Purchasing receives order acknowledgments and delay notices the same way. Each is a few minutes of typing, but across hundreds of emails it becomes a team.
The pattern is the same in all cases: understand the email, match it to master data, propose a transaction, and let a person confirm. The details differ by document type, and ECC's strict data model is both the challenge and the safeguard.
What teams use it for
Customer PO to sales order
Extract customer, PO number, materials, quantities and dates, map customer material numbers via the customer-material info record, and propose a VA01 order.
Supplier acknowledgments
Match replies to the PO number and propose confirmed dates or quantities for the buyer to accept.
RFQ intake
Turn emailed requests for quotation into draft inquiries and route them to a salesperson with the line items parsed.
Delay and change notices
Detect delay emails from carriers or suppliers and attach them to the delivery or PO as a note.
Remittance and dunning replies
Classify payment confirmations and disputes and route them to accounts receivable with the invoice numbers extracted.
SAP ECC 6.0 integration surface
- BAPI_SALESORDER_CREATEFROMDAT2 and BAPI_SALESORDER_SIMULATE for sales orders; simulate first to catch pricing and availability errors.
- BAPI_PO_CHANGE and PO confirmation handling for supplier replies; check what your release exposes for confirmations.
- BAPI_INCOMINGINVOICE_PARK or BAPI_INCOMINGINVOICE_CREATE for vendor invoices; parking keeps accounting in control.
- SAPconnect (transaction SCOT) for outbound mail and SO50 or SBWP for the SAP inbox; inbound mailbox reading is better done outside SAP with IMAP or Microsoft Graph.
- Master data lookups: KNA1, KNVV, MARA, customer-material info records (KNMT), vendor LFA1 and info records EINA/EINE.
How it works
- 1
Connect the mailbox
Use IMAP or Graph with a dedicated shared mailbox. Move processed emails to folders so nothing is handled twice.
- 2
Classify and extract
A model classifies the email type, reads body and attachments, and returns structured fields with confidence per field.
- 3
Match against ECC
Resolve sender to customer or vendor, material identifiers to MATNR, and units to SAP units of measure.
- 4
Simulate in ECC
Run the BAPI in simulate mode, capture pricing, credit and availability messages, and show them in the review UI.
- 5
Human review
A clerk accepts, edits or rejects. High-confidence repeat customers can later go straight through under rules.
- 6
Post and reply
Create the document through the BAPI, store the original email as an attachment via GOS or ArchiveLink, and send an acknowledgment.
Example flows
Emailed PO becomes a sales order
Trigger: A customer sends a PDF purchase order to the orders mailbox.
- The model extracts header and lines.
- Customer and materials are matched, with fuzzy matches flagged.
- The BAPI simulation returns pricing and ATP messages.
- A clerk reviews and confirms.
- The order is created and the email is archived on it.
Result: Order entry drops from several minutes of typing to a quick review.
Supplier delay notice
Trigger: A supplier emails that a PO line will ship late.
- The PO number is detected and validated.
- A proposed new date is shown to the buyer.
- The buyer accepts and the confirmation is updated.
Result: Delays are visible to planners the same day.
Keeping data on-prem
The mailbox may be Exchange on-prem or Microsoft 365, but the extraction and matching can run entirely on your own servers. Use an open-weight model for classification and extraction on local GPUs so customer orders, prices and supplier terms never reach a public AI API. The ECC interaction is plain RFC from the same host, with no inbound exposure.
Security checklist
- Treat attachments as untrusted: scan for malware and ignore active content.
- Guard against prompt injection in email text; extracted values are data and never commands.
- Use a service user limited to the specific BAPIs and document types in use.
- Keep an audit trail linking email message ID, extracted fields, reviewer and SAP document number.
- Check sender domain and SPF, DKIM results before trusting a customer match.
Ways to get it done
SAP ecosystem add-on or document processing product
Effort: Weeks to months, licence cost.
Standardised invoice or order formats with vendor support.
Build in-house
Effort: 6 to 12 weeks to production quality.
A team with ABAP, integration and ML skills for a narrow document set.
Partner such as Netray
Effort: Pilot on one mailbox in weeks.
Varied formats, local models, review UI and BAPI posting handled together.
Pitfalls
- !Customer material numbers differ from yours; without KNMT or a mapping table, matching fails quietly.
- !Units and decimal formats (comma vs period) cause wrong quantities if not normalised.
- !Pricing conditions fail on simulate for reasons the email can't fix; route those to a human with the message text.
- !Reply-chains contain old quantities; extract from the newest message only.
Frequently asked questions
Can SAP ECC read emails by itself?
ECC can send mail through SAPconnect and has an inbox, but it is not built to parse inbound emails into documents. Do the reading and extraction outside SAP and post results through BAPIs.
Which BAPI creates a sales order from an email?
BAPI_SALESORDER_CREATEFROMDAT2 is the common one, with a simulate call first. Check parameters and user exits against your enhancement packs and any custom pricing.
How accurate is AI extraction?
It depends on the document variety. Clean repeat formats can be very high, while messy scans and free text need review. Use per-field confidence and start with review for everything.
Is auto-posting safe?
Only for narrow, well-understood cases such as repeat customers with stable materials. Keep simulation, thresholds and an undo path.
What about invoices?
Vendor invoices are usually better handled through a dedicated OCR flow that parks invoices; see the document OCR page. Email automation feeds that flow with the attachments.
Want Email automation working on your SAP ECC 6.0?
A free 30 minute assessment: we map the integration path for your version and setup, and where it should run.
Get a free assessment