Back to

Approving and rejecting files

Publishing a web service from a TRANSACTION script

If your environment includes Winshuttle CENTRAL with Winshuttle SERVER, you can publish a TRANSACTION script as a web service. TRANSACTION scripts that are based on DIRECT templates can also be published as web services. The script, or web service, can then be consumed by any forms designer application to create forms that are based on TRANSACTION script fields. Examples of forms designer programs include InfoPath and Adobe LiveCycle (and Adobe Acrobat Pro to enter data into the finished form). End users can then easily fill out these forms and run them to upload data to SAP.

Features not supported in TRANSACTION scripts for web services

To create a script for web publishing

  1. In TRANSACTION, record the business process.
  2. Specify XML as a data source.
  3. To map the recording, click XML to SAP or use Auto Map to map all fields as XML to SAP mapping type.
  4. Specify output fields as mapped to SAP to XML. No preview is displayed. Click Back to save the script and continue to the Run pane.
  5. On the Run pane, click Submit.
  6. Complete the TRANSACTION script information page of the wizard. Click Next. Note that no data template can be attached. Therefore, the wizard skips to the Complete supporting document information page. Complete the information and submit the file for the approval process.

    Because no data is attached, the review process is set to "No data review". However, you must still select a reviewer for the TRANSACTION script. You will receive a task notification email to complete this task.

  7. In the task notification email that appears, click Open Task.
  8. Select Allow publishing as Web Service. If this option is not selected when the web service is called, the process will not continue, and you must resubmit the script with the option selected.
  9. Select a reviewer. Click Task Complete.

    The Mapper for a web service. Notice that there is no preview and that you must type in the value of the fields you wish to map.

Publishing a script as a web service

When you publish your web service, you can specify how the data submitted through the web service is posted. Posting can be delegated to the user who submits the data via the form or posting can be conducted through one of the system post accounts that are available for the selected SAP system.

If you are not a system post designer or no system accounts exist for the selected SAP system, the system post option is not available. For more information on system posts, see the CENTRAL Help.

  1. When the script is approved, click Publish as web service that appears in the Run pane.
  2. Type a unique name for the web service and a description of the service. Click Publish. Select the SAP system on which this service will be published.
  3. Select how the data will be posted. You can delegate posting to the web service user, or select a system post.
  4. If you want, select to overwrite web service.
  5. If you want, select to generate asynchronous operations.

    The web service, or WSDL, URL is generated. Use this URL to create your form in a form designer program.

Testing

Before you submit a file for approval or while reviewing a file, or after the file is approved but before it is published, you can test the TRANSACTION script. Use the in-built form and, based on the status of the file, run the form on a either a non-production system or a production system. Note that your test data is uploaded to SAP.

The in-built form for testing web services.

To test a script using the in-built form

  1. In the Run pane, click Test or Run.
  2. Enter data in the fields.
  3. To enter multiple line items, right-click the box and the click Add Rows.
  4. For nested loops, click the button next to each row in the outer loop and fill the subitems where needed. Click Run.

IF condition in web services

Scripts that contain IF conditions can be used in web services. Custom field names are required and fields can be compared. For more information, see Setting conditions—IF statements.

F4 lookup

If the Winshuttle Function Module is installed on your SAP system, you can add F4 lookup capability to your web services. Search options include an exact match, a pattern match using the star symbol (*), all values using either the star symbol (*) or a blank field.

Validate form data

If the TRANSACTION script has Validate enabled, validate will be available in the data fields section in the forms designer application. You can drag it to the form to make it appear in the form as a check box. When you use the Submit button on the form with the Validate option checked, data is not posted into SAP, but the form data is validated. To submit the data to SAP, clear the Validate check box.

We do not recommend that you use for Read list BAPI or function modules for publishing a web service.

Applying SAP user settings

During the web service call, date and decimals formats are converted to the format defined in SAP. Conversion applies to all t-codes in all locales. However, fields marked in the TRANSACTION Mapper for "convert to string" are not converted.

Skipping fields and uploading blank fields

In scripts for web services, it is particularly important to use the skip field indicator "\" because empty fields are uploaded to SAP as blanks and are not skipped.

Publishing text boxes by converting field types to strings

When creating forms, you may want to add text boxes in place of the SAP data types. You specify the conversion to strings for each field in the Advanced Mapper pane. Convert to string is available in all data sources, but can apply only to rows that are mapped for upload.

Displaying SAP data types

When working with legacy scripts or for other reasons, such as after converting data types to strings, you may want to display SAP data types. You do this through the Synchronize function in the Mapper. You can synchronize selected fields or Synchronize All fields.

Run a form in InfoPath or LiveCycle. To run a form, the following must be true:

Posting data

You can post forms data in two ways:

Also in this section

Submitting a file for approval

Approving, rejecting, and reassigning .TXR files

Approving, rejecting, and reassigning data files

Approving and rejecting from within Excel

Working with CENTRAL