Attach documents - Automate_Studio - 20.3

Automate Studio with Connect User Guide

Product type
Software
Portfolio
Integrate
Product family
Automate
Product
Automate > Automate Studio
Version
20.3
Language
English
Product name
Automate Studio
Title
Automate Studio with Connect User Guide
Topic type
Administration
Overview
Installation
How Do I
First publish date
2018

If the Automate Function Module (WFM) is installed on the SAP system, you can attach documents to transactions for some t-codes that are recorded in Batch Input mode, Non-Batch with Controls mode, or Non-Batch without Controls mode. See below for a list of supported t-codes and the recording modes to use for them, as well as a list of the supported attachment file types.

If the WFM is not installed on the SAP system, documents can be attached only to Transaction scripts that are recorded in GUI Scripting mode, and only the BDS attachment type is available.

Attach a document

  1. Click Add File Attachment Rows on the Map tab.
  2. Choose the method that you want to use. Studio 20.3 supports three ways to attach a document:
    • GOS: Store the business document in an archival table, so that main tables are not affected by large attachments.
    • DMS: SAP DMS enables the capture and management of electronic documents, CAD models and drawings, MS-Office files, scanned images, multi-media files, and any other electronic files that must be stored and controlled in a secure environment.
    • BDS: Create an attachment. This attachment option was offered in previous versions of Transaction.
      Note:

      If the WFM is not installed on the SAP system, only the BDS method is available.

      For Create External Document (URL), use WFM “/WINSHTLQ/DOC_GOS_ATTACH_URL“ via Direct in Studio.

  3. Map the field to the data file.
  4. Open File Explorer and locate the document that you want to attach.
  5. Copy the file path and file name.
  6. In Studio, click the Run tab.
  7. Paste the file path and name in the Location field.
Important: The upload speed depends on the network and on the SAP system.
Note:

You can use Attach current file for a document attachment, when the attachment location is defined inside the If condition for the script. A Runner can also attach the current file as an attachment by defining the <Use Current File> tag in the Attachment Location column of a Data File.

Supported t-codes

  • AS02
  • AS03
  • CS03
  • CV02N
  • CV03N
  • FB02
  • FB03
  • FB50
  • FB60
  • FB70
  • FB75
  • FBD1
  • FBD3
  • FBS1
  • FD02
  • FK02
  • FV50
  • IW22
  • IW23
  • KS02
  • ME22N
  • ME23N
  • ME52N
  • ME53N
  • MIR4
  • MK02
  • MM01
  • MM02
  • MM03
  • ML81
  • ML81N
  • PA30
  • VA02
  • VA03
  • XD02
  • XD03
  • XK02
  • XK03
Note:
  • To request an enhancement to incorporate new t-codes into Automate Function Module, raise a new enhancement request on Customer Portal.

  • KS01 is a create transaction code. Automate Studio supports attachment for 'Create' Transactions since version 12.1 but it is a limited feature. This does not include transaction code KS01.

Document types

  • PDF
  • TIFF
  • JPEG
  • PNG
  • DOC(X)
  • XLS(X)
  • TXT

Add other document types

You can customize which document types you can attach.

  1. Open the ShuttleRule.xml file (in C:\Program Files\Automate\STUDIO or in C:\Program Files (x86)\Automate\STUDIO).
  2. Enter the MIME type for the document type that you want to add.

    For example, to add .mht files, enter the following:

    <TypeEntry MimeType="message/rfc822">

    <Extension>MHT</Extension>

    <Extension>MHTML</Extension>

    </TypeEntry>

Note:

You can check Use Current File for a document attachment, when the attachment location is defined inside the If condition for the script.

Maximum file size

The default maximum file size is set at 30 MB.

The tested maximum file size for attachments for web services is 20 MB.

You can change the maximum file size in the Studio Options box.

  1. Click File, and then click Options.
  2. Click the SAP Settings tab.
  3. Under Advanced, in the Document attachment limit (MB) box, type the maximum size for attached documents.
Note: For documents attached during AutoRun, the maximum file size must be changed on SAP Integration Server. For more information, see Add Attachment plug-in properties.

Document attachment scenarios

Sales order and material processes in SAP often include the capability to attach and upload supporting documents along with the data upload. Depending on the transaction, you might want to attach and upload the following types of documents:

  • Personnel (PA30): Social Security/national insurance paperwork, proof of residency or citizenship, work permits, passport scans, personnel photos, training certificates
  • Sales Order: Faxed orders, PDF files, invoices, POs, purchase requisitions
  • Material Master: Drawings
  • BOMs: Drawings
  • Customer: Credit reference, registration certificates
  • Vendor: Credit reference, registration certificates

You can also attach the current document to use for the next script in a chain. For example, you can run an FB50 script to return document numbers and then link it to an FB03 script, with the data file as an attachment so that FB03 can use the document numbers and return the attachment and run logs to that data file.

Note:

This is not available for scripts that use the data file type XML Form.

  1. Record and map the first script.
  2. Record the second script and map it to the data file that you used for the first script.
  3. Click Add File Attachment Rows, and click Use Current File.
  4. Save and close the second script.
  5. In the first script, click the Run tab, and then click Chain Scripts.
  6. Add the second script to the chain.
  7. Run the first script. Studio will automatically run the second script.
    Note:

    The run logs from the second script will not be available in the Excel file that is attached to the SAP document.

Attach supporting documents to be uploaded to SAP

To upload supporting documents to SAP, Solution Developers and Runners can also define a Supporting Document tag in Data file and then run the solution.

  1. Open a Transaction script.
  2. Click Add file attachment.
  3. Select any file attachment mode and click OK.
  4. Map columns to the Excel data set.
  5. Add a Supporting File tag for your selected row or rows, in the Attachment location field column.
    Note:

    Use the following tag for the supporting file: <Supporting Doc>. If you try to upload the same attachment by mentioning it twice in the tag (for example: <A.xlsx,A.xlsx>), only one copy of it will be uploaded to SAP in a single Transaction run.

  6. Submit the solution and follow the script approval process.
  7. Open the Data template from the Add-in. Note: Runners can also define a supporting document tag for a selected row(s) in the Attachment location field column.
  8. Submit the Data file (this will include the supporting file tag).
  9. On the Supporting Documents tab, add the supporting documents. Note that these documents can be zipped
  10. Click Next and submit the Data file.
  11. Approve the Data Review task.
  12. Run the task. All supporting documents attached to this Data file will be uploaded to SAP.
Note:

A Runner can also attach the current file as an attachment with the data file by defining a <Use Current File> tag in the Attachment Location column of a Data file.Both <Use Current File> and <Supporting Doc> tags work with Manual and AutoRun. Each record must contain only one tag, and this tag must either be <Use Current File> or <Supporting Doc>.