Left_Next_Arrow_Blue_Bkgd_Icon

Right_Next_Arrow_Blue_Bkgd_Icon

Uploading documents

Sales order and material processes in SAP often include the capability to attach and upload supporting documents along with the data upload. You can upload attached documents through web forms.

For the following types of transactions, you might want to attach these types of documents:

Step 1: Create a TRANSACTION script with document attachment upload

Document attachment is available only for supported t-codes. Because "create" t-codes are not supported, you may need to use linked scripts to create the record with one script and then attach the document in another script. See the table below for a list of support T-codes.

Supported t-codes

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

  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 Rows Attach doc.

    The new row is added below the Log Column row

    file attach row.

  4. For ease of mapping, click Basic. 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.

Step 2: Create a web form with attached document upload

  1. In Designer, click the Tools menu, and then click Manage Field Mappings.
  2. Add your Web service.
  3. Under Input Values, map both DocumentUploadListAttachment_Location and DocumentUploadListFILE_BYTES to FILE_BYTES.
  4. In the Manage Field Mappings dialog box, click Generate Form.
  5. In the form, open properties for the ShareVis.Attachment control.
  6. Change the binding of the DocumentUpload field to FILE_BYTES. Ensure that the binding is changed on all views of the form.
  7. Click the AttachProp tab. Ensure that Allow Upload is selected.
  8. Only one file should be uploaded per t-code. Therefore, on the AttachProp tab, set Maximum to 1. Click OK.
  9. Ensure that both the SAP Web Service button and the ShareVis.Attachment control are displayed on the same form view.

See Also

Components of Winshuttle Workflow Solutions

Creating and publishing a solution

How to import an InfoPath form into a Workflow solution

Retrieving solutions from CENTRAL