Actions in Import Scenarios

As you create the 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 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 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.

Mapping of Actions with Dialog Boxes

If an action displays a dialog box, you may need to specify certain values for the fields whose elements are shown in this dialog box. In an import scenario, you map each field whose default value you want to change, and then you add a row that maps the action itself. You map a field by doing the following:

  1. Selecting the name of the dialog box as the Target Object
  2. Selecting the name of the field as the Field /Action Name
  3. Specifying the needed value of the field as the Source Field /Value

You map the check boxes in the same way. Suppose that you are importing invoices to the Invoices and Memos (AR301000) form. Further suppose that in the Recalculate Prices dialog box, you need to select the Override Manual Prices check box and clear the Recalculate Discounts check box. To reflect these actions, you add the following rows to the scenario mapping.

Target Object Field / Action Name Commit Source Field / Value Execute Action
Recalculate Prices OverrideManualPrices Selected ='True'
Recalculate Prices RecalcDiscounts Selected ='False'
Invoice Summary <Action: Recalculate Prices> Cleared Once, for Last Detail Line

Notice that the row that maps the Recalculate Prices action is added after the rows that map the selection and clearing of check boxes in the Recalculate Prices dialog box.

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 screenshot below 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.