Using EDI Mapper

EDI Mapper provides flexibility in allowing you to map EDI data. Most of the functionality in EDI Mapper is accessed through context-sensitive shortcut menus.

Creating EDI Maps

To create an EDI map:

  1. In EDI Mapper, enter a name for the map in the Map field.

  2. Click the New button in the ribbon.

  3. Enter a standard for the map in the Standard field.

  4. Enter a version for the map in the Version field.

  5. Enter a transaction for the map in the Transaction field.

  6. Select the direction for the map.

  7. Expand the document sections and segments you want to map in the left box, which represents the EDI document.

  8. Right-click each element that your trading partner requires you to map (in their EDI specifications), and select Implement Element.

  9. Expand the Apprise tables in the right boxes to view fields you can map.

  10. For an outgoing document, click a field in a box on the right and drag to the related element on the left. For an incoming document, click an element in the box on the left and drag to the related field on the right. An arrow appears between the related field and element, and a check mark appears to the right of the field.

  11. Repeat steps 7-10 to complete the mapping. Be sure to map all elements that have star icons (these are required fields). If elements need to be mapped to multiple fields, create loops, and then map fields to elements in the loops. For more information, see Creating Loops below.

Note You can also assign constant values to elements and fields, create aggregate columns to perform simple calculations, and use functions to perform more complex calculations. For more information, see the sections below.

  1. Click the OK button in the ribbon. The location of the compiled map is displayed.

Creating Loops

EDI Mapper allows you to create two types of loops, as follows:

Assigning Constant Values

If an element for an outgoing document or field for an incoming document should always equal the same value, you can assign a specific value to it.

To assign a constant value:

  1. Right-click an element or a field, and select Assign Constant Value.

  2. Enter the value, or click the drop-down arrow to select a valid value.

If you want to remove a constant value from an element, right-click the element, and select Unimplement Element. If you want to remove a constant value from a field, right-click the field, and select Clear Column.

Note When assigning a numeric value as a constant value, which will be mapped to an EDI element that stores a string of characters, enclose the value in single quotation marks. For example, if assigning 0000, enter '0000' (not 0000 or "0000"). If you do not use single quotation marks, you may receive an "Incompatible Datatype" error when compiling the map.

Creating Aggregate Columns

If you want to map a calculated value to an element for an outgoing document, you can create an aggregate column. For example, if you wanted to map the sum of all charges on an invoice, you could create an aggregate column to store this sum, and then map it just as you map fields. To create an aggregate column, right-click the field that you want to use for the calculation, select Set Aggregate Column, and then select one of the following mathematical functions:

Using Notes

You can add notes to document sections, segments, and elements to provide additional information or enter comments.

To add a note:

  1. Right-click a document section, segment, or element, and select Add Note.

  2. Enter the contents of the note.

If you decide you no longer need the note, right-click the document section, segment, or element, and select Delete Note.

Changing the Display of Maps

EDI Mapper includes many options for changing the display of data. These options are available from the shortcut menu.

The shortcut menu for the EDI document includes the following options:

The shortcut menu for the database tables and fields includes the following options:

The shortcut menu for the empty space between database tables and fields includes the following options:

The shortcut menu for arrows includes the following options:

Additionally, you can select Go To from the shortcut menu for any mapped object to navigate to the object to which it is mapped.

Using Functions

If your EDI maps require computations, data conversion, or more complex relationships between data, you can add functions to perform these tasks. For example, you can use a function to compare two values in the Apprise database, and return a different value if the two values are equal. You can then map the returned value to a related element. The following table summarizes the functions you can use in a map:

Function

Category

Purpose

Combine

String Functions

Map the combination of two or more values

Length

String Functions

Map the length of a field

Lookup

String Functions

Map the position of a value in a list

Replace

String Functions

Map a value after replacing part of the value with a different value

Substring

String Functions

Map a part of a value

Contains

String Functions

Map whether or not a value contains a different value

Get Store ID

String Functions

Map the store ID with two qualifiers from your trading partner.

Note Only use this function for inbound 850's and outbound 875's..

Keep Case

String Functions

Map a value so that case-sensitive text is not changed. If this function is not used, values are capitalized automatically. This function is only available for outbound maps.

Add

Numeric Functions

Map the sum of two values

Subtract

Numeric Functions

Map the difference between two values

Multiply

Numeric Functions

Map the result of one value multiplied by another value

Divide

Numeric Functions

Map the result of one value divided by another value

Remove Decimal

Numeric Functions

Map a value without any decimal places

Insert Decimal Places

Numeric Functions

Map a value with an added number of decimal places

Counter

Numeric Functions

Map a counted value, starting with a value, and changing by a different value

Round Up

Numeric Functions

Map a value rounded up to a specific number of decimal places

Round Down

Numeric Functions

Map a value rounded down to a specific number of decimal places

Round Nearest

Numeric Functions

Map a value rounded up or down (whichever is nearest) to a specific number of decimal places

UM Conversion

Numeric Functions

Map a quantity converted from one unit of measure to another unit of measure. This function is only available for outbound transactions.

Current Date

Date and Time Functions

Map the current date

Current Time

Date and Time Functions

Map the current time

Convert to EDI Date

Date and Time Functions

Map a date after converting it to an EDI date

Convert to System Date

Date and Time Functions

Map a date after converting it to a system date

Increment Date

Date and Time Functions

Map a date increased by a number of days

Decrement Date

Date and Time Functions

Map a date decreased by a number of days

If Not Null

Conditional Functions

Map a value if another value is not null

If Then Else

Conditional Functions

Map values based on whether a value is true or false

Case

Conditional Functions

Map values based on whether a value matches one of multiple cases, or if the value does not match any of the cases

If (a=b) Then Else

Conditional Functions

Map values based on whether or not two different values are equal

If (a <> b) Then Else

Conditional Functions

Map values based on whether or not two different values are not equal

If (a > b) Then Else

Conditional Functions

Map values based on whether or not a value is greater than another value

If (a >= b) Then Else

Conditional Functions

Map values based on whether or not a value is greater than or equal to another value

If (a < b) Then Else

Conditional Functions

Map values based on whether or not a value is less than another value

If (a <= b) Then Else

Conditional Functions

Map values based on whether or not a value is less than or equal to another value

If (not a) Then Else

Conditional Functions

Map values based on whether a value is true or false

If (a or b) Then Else

Conditional Functions

Map values based on whether or not one of two values is true

If (a and b) Then Else

Conditional Functions

Map values based on whether or not two values are both true

If (a xor b) Then Else

Conditional Functions

Map values based on whether or not only one of two values is true

Custom Code Execution

Custom Code Functions

Enter custom Progress 4GL code. After you add this function, right-click it, and select Add Code to enter the custom code.

Equals (a=b)

Logic Functions

Map whether or not two values are equal

Not Equals (a <> b)

Logic Functions

Map whether or not two values are not equal

Greater Than (a > b)

Logic Functions

Map whether or not a value is greater than another value

Greater Than or Equals (a >= b)

Logic Functions

Map whether or not a value is greater than or equal to another value

Less Than (a < b)

Logic Functions

Map whether or not a value is less than another value

Less Than or Equals (a <= b)

Logic Functions

Map whether or not a value is less than or equal to another value

Not (! a)

Logic Functions

Map whether or not a value is true or false

Or (a | b)

Logic Functions

Map whether or not one of two values is true

And (a & b)

Logic Functions

Map whether or not two are values are both true

Exclusive Or (a xor b)

Logic Functions

Map whether or not only one of two values is true

For more information on functions, see the Progress OpenEdge ABL Reference.

To add a function to a map:

  1. Right-click a blank area that is not within any boxes, and select New Function. The New Function dialog box appears and lists the available function categories.

  2. Click the plus sign to the left of the category that contains the function you want to use. For information about which functions are in each category, see the table above.

  3. Select the function you want to use.

  4. Click the OK button. A new box for the function is added to the map.

  5. Drag fields or elements to each of the parameters of the function. If necessary, you can right-click the function to add or delete parameters.

  6. Drag the results of the function to the appropriate elements, fields, or functions.

After you add a function to a map, you can right-click it to change, delete, or copy it. You can also see the sequential ID of a function, by right-clicking the function or its parameters.

You can also add notes to a function or a function's parameters. To add a note, right-click a function or parameter, select Add Note, and enter the text of the note.

Note To edit an existing note, right-click the function or parameter associated with the note, select Add Note, and edit the text of the note.

If you want to delete a note, right-click the function or parameter, and select Delete Note.

Variables

You can also create variables to use in your maps.

To create a new variable:

  1. Right-click a blank area that is not within any boxes, and select Create Variable.

  2. Enter a name for the variable.

  3. Click the Type drop-down arrow, and select the type of data the variable will store.

  4. Click the button to save the variable.

After you create variables, to assign a variable to a value:

  1. Right-click an element, field, or function, and select Use Variable.

  2. Click the drop-down arrow, and select the variable name.

  3. Click the button.