Configure Conditional Execution of BDC

Using the BDC Template Editor, parts of the BDC can be configured to execute only if certain conditions are met.

To add a conditional execution to a screen:

  1. On the Templates page, select a template.
  2. Click Edit Template.
  3. In the Template Editor, go to the BDC Contents tab.
  4. Click on the screen name to highlight all the items in the screen. See Figure 1 for an example.
  5. Click Properties.

    Figure 1 - Select a Screen and Click Properties

In the Edit Item Properties dialog (Figure 2), conditional executions can be set up for the three scenarios described below.

Figure 2 - Edit Item Properties Dialog

Execute a Field/Screen Based on the Value of Another Field

This can be extremely useful for a screen that only appears if a certain value is entered in SAP.

  1. In the Edit Item Properties dialog, check the Only execute if option.
  2. Select the field in the template to check a value against.
  3. To the right of the equals '=' sign, enter a value to compare the field value against.

For example, to execute a screen if the PRICE field in the template is equal to $800, check Only execute if, then select PRICE in the drop-down, and enter 800 as the value to compare.

Execute a Field/Screen for Limited Records

This can be useful if a dialog is displayed when an upload starts.

  1. In the Edit Item Properties dialog, check the Only execute for the first x records option.
  2. Enter the number of times in the field to the right.

    If you only need this screen to execute one time then you would enter a 1 in the text box. (To execute this screen for the first 10 records, enter 10 in the field.)

For example, if a screen appears only for the first record during a mass upload, check Only execute for the first x records and enter a 1 in the field.

Execute a Field/Screen Every Few Records

This is very useful if a page down code is needed every 4 or 5 records.

  1. In the Edit Item Properties dialog, check the Only execute every x line item(s) option.
  2. Enter the number of records in the field to the right. (To execute every four records, enter 4 in the field).

For example, if, after 4 items in the grid, SAP expects a page down to occur, select the Page Down action in the template and click Properties. Check Only execute every x line item(s) and enter a 4 in the field to the right. The page down action is sent to SAP every 4 records.