Configure document attachments

Winshuttle SAP Attachment is used for appending documents to SAP objects. You can use the admin page to set which management system WFM will prioritize.

Enter the transaction code /n/WINSHTLQ/ADMPANEL.

type the WFM admin t code

Click the Sap Attachments tab.

sap attachments tab

If no data is maintained, the default screen looks like this:

sap attachments screen

Activate or deactivate an SAP Attachment service

To activate an SAP Attachment service, check the box for that service. For example, check the box next to Document Management System (DMS). After you check the box, Activated! appears.

document option check box

To deactivate a service, uncheck the box.

Note: Before you deactivate a service, make sure that it is not set as the Default Document option.

Change the Winshuttle Default Document option

Activate the option that you want to use as the default. For example, check the box next to Document Management System (DMS). After you check the box, Activated! appears.

document option check box

Click the corresponding option button. For example, click the DMS option button.

Maintain the document attachment table

To ensure success when including attached documents in a script, do the following:

  1. Start transaction SM30.
  2. Enter the table name /WINSHTLQ/TCD_BO, and click Maintain.

    enter table name click maintain

  3. To use attachments with a t-code that isn't already in the list, click New Entries, and then enter the transaction code, the attachment type, and the SAP business object type.

    mapping of t codes with relevant business object

    To find the SAP business object for your transaction, use t-code SWO4.object in swo4If you cannot find the object by using SWO4, you can search for the object in the technical information at http://scn.sap.com or contact your Basis/ABAP team.
  4. Test the document attachment functionality from Studio v11.

If the changes that you have made to the /WINSHTLQ/TCD_BO table do not work, or if you have other document attachment needs, such as custom security requirements, you can configure them in the WINSHTLQ/DEFVAL table.

  1. Start transaction SM30.
  2. In the Table/View box, enter /WINSHTLQ/DEFVAL.
  3. Click Display.
  4. Make the changes that you need.

Configuring document attachments as 10.x

If version 11 of Winshuttle Function Module is not installed on the SAP system, you can add the UseBDSModeForDocumentUpload parameter in AppOptions and set it to true. You can then use the 10.x method to configure document attachments.

You can find the AppOptions.xml file at C:\users\<user name>\AppData\Roaming\Winshuttle\Studio. Add the UseBDSModeForDocumentUpload parameter to the Transaction group:


<Transaction>
  <VirsaFirefighter>false</VirsaFirefighter>
  <AllowMultiThread>false</AllowMultiThread>
  <TranslateMessage>false</TranslateMessage>
  <DefaultRecordingMode>NonBatchWithControls</DefaultRecordingMode>
  <SapDefSize>X</SapDefSize>
  <SapNoBiend></SapNoBiend>
  <UseBDSModeForDocumentUpload>true</UseBDSModeForDocumentUpload>
</Transaction>

After you add the parameter, you can configure document attachment in the ShuttleRule.xml file. If you later use an SAP system that has WFM v11 installed, you can set the parameter to false.

  1. Open the ShuttleRule.xml file (in C:\Program Files\Winshuttle\STUDIO or in C:\Program Files (x86)\Winshuttle\STUDIO).
  2. In the DOCUMENTUPLOAD section, enter the information. For example, to add document attachments for t-code MIR4, enter
    
    <OBJECTNAME Name="BUS2081">
      <TXCODE>MIR4</TXCODE>
      <FIELD Name="Inv_num" Description="Invoice number" Padding="true" Length="10"> </FIELD>
      <FIELD Name="Fisc" Description="Fiscal Year" Padding="true" Length="4"> </FIELD>
    </OBJECTNAME>

To find the SAP business object for your transaction, use t-code SWO4.

object in swo4

Double-click the business object and expand key fields to see the parameters that the transaction expects and the order of the fields.

Double-click each field and then the field name to see the table, which will provide the correct order, length, and padding. Use these values when you add the t-code to ShuttleRule.xml.

For example:


<FIELD Name="Inv_num" Description=Invoice number" Padding="true" Length="10"></FIELD>
<FIELD Name="Fisc" Description="Fiscal Year" Padding="true" Length="4"></FIELD>
Important: You can use the field name and description that you want, but the order, type, length, and padding must match the values that are in SWO4.

If you cannot find the object by using SWO4, you can search for the object in the technical information at http://scn.sap.com or contact your Basis/ABAP team.