Actions in Import Scenarios

As you perform mapping for an import scenario on the Import Scenarios (SM206025) form, when you need to reflect a button or menu command being clicked on a form, you should map the corresponding action. Actions are available for all buttons on a form, as well as for all commands on the More menu or any other menu.

In import scenario mapping, to use an action, you always have to select the summary object as the target object. No matter where the button or command that corresponds to the action appears on the form (in the Summary area, on the form toolbar, on the table toolbar of a tab, on the More menu, or in a dialog box), all actions use the summary object as the target object. Action names have the Action: prefix and are surrounded with angle brackets—for example, <Action: Save> or <Action: Delete>.

For an action, you should not select any external field in the Source Field/Value column of the Mapping tab of the Import Scenarios form.

Importing of Documents with Detail Lines

When you import documents (such as invoice and shipments) with detail lines, by default, the system executes all instructions in the mapping of the scenario, including actions, for each detail line of each document. In most cases, certain actions should be executed only once for a document.

To ensure that the documents are processed correctly during import, you can specify how the system should execute a particular action by using the Execute Action column on the Mapping tab of the Import Scenarios (SM206025) form. The following options are available:

  • For Each Record
  • Once, for First Detail Line
  • Once, for Last Detail Line

Suppose that you want to update existing invoices by importing prices from a file. During the import, for each of the invoices, the system should put the invoice on hold, update its detail lines by using the data from the file, and then remove the invoice from hold. The following screenshot shows the mapping of a scenario on the Import Scenarios form that imports accounts receivable invoices. The instructions in the mapping indicate that the system should perform the actions as follows:

  • <Action: Cancel> (system action): For every row in the file—that is, for each detail line of each invoice (see Item 1 in the screenshot).

    This is a service command that the system adds for the key fields.

    Tip: You do not need to add this command manually or edit it in any of the import scenarios.
  • <Action: Hold> (PutOnHold): For only the first detail line of each invoice (Item 2).

    The system puts the invoice on hold (once).

  • <Action: Remove Hold> (ReleaseFromHold): For only the last detail line of each invoice (Item 3).

    The system removes the invoice from hold after all its detail line have been updated (also once).

Figure 1. The mapping with the types of action execution


By default, for each row that contains an action, the value in the Execute Action column is For Each Record.