Back to

Advanced mapping

Attaching documents

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

In TRANSACTION, document attachment is available for recordings in GUI scripting, and also for recordings in non-batch and batch mode. Document attachment is particularly adapted to use with forms. It is not currently available for create transactions, but is available for the following t-codes, which are defined in ShuttleRule.xml:

T-code

Required metadata

AS02/AS03

Company Code, Main Asset Number, Asset Subnumber

MM02/MM03

Material Number

FB02/FB03

Company Code, Document Number, Fiscal Year

VA02/VA03

 Order Number

ME52N/ME53N

Requisition Number

ME22N/ME23N

 Order Number

XD02/XD03

FD02/FD03

Customer Number

 

 

XK02/XK03

MK02/MK03

FK02/FK03

 Vendor Number

 

PA30

 Personnel Number

The following document formats can be uploaded:

Using attached documents with CENTRAL and web services

Document attachment is available for web services.

Note: Documents can be attached only for manual runs and not for autopost jobs or scheduled jobs.

Special considerations when attaching documents

Only one document can be attached per run. It best practice is to attach only essential documents. A 5MB limit per document exists, so consider limiting the number of documents that you attach.

To attach documents

  1. In TRANSACTION, record a transaction or open a script that was made from an appropriate transaction.
  2. Open the script in the Mapper.
  3. On the Edit tab, click Add File Attachment RowsAttach doc.

    The new row is added below the Log Column row

    file attach row.

  4. For ease of mapping, click the Basic tab. Drag the Preview column that you want to map to the Attachment Location row. Save the Excel preview file.
  5. Open the Excel template in Excel. Under the Attachment Location column, add the local path to the document.
  6. Click Run. The document is uploaded to SAP.

Also in this section

Editing in the Mapper

Filtering mapper settings

Advanced looping capability

Setting conditions: IF statements

Validating data

Validate by list

Compensating for missing SAP screens and fields

Undo and Undo All

Mapping long text

Auto mapping

Downloading from SAP

Editing a TRANSACTION script