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.
To create an EDI map:
In EDI Mapper, enter a name for the map in the Map field.
Click the New button in the ribbon.
Enter a standard for the map in the Standard field.
Enter a version for the map in the Version field.
Enter a transaction for the map in the Transaction field.
Select the direction for the map.
Expand the document sections and segments you want to map in the left box, which represents the EDI document.
Right-click each element that your trading partner requires you to map (in their EDI specifications), and select Implement Element.
Expand the Apprise tables in the right boxes to view fields you can map.
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.
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.
Click the OK button in the ribbon. The location of the compiled map is displayed.
EDI Mapper allows you to create two types of loops, as follows:
Static loops - Use static loops if elements in a segment must be mapped to fields for a specific number of instances. For example, you may want to use a static loop to store three different addresses. To create a static loop, right-click a segment, and select Create Static loop, then enter the number of instances for the loop.
Dynamic loops - Use dynamic loops if elements in a segment must be mapped to an unknown number of records. For example, you may want to use dynamic loops to store notes, which may vary in number. To create a dynamic loop, right-click a segment, and select Create Dynamic loop. You can then map multiple fields to the same elements in the loop.
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:
Right-click an element or a field, and select Assign Constant Value.
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.
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:
Sum
Count
Average
Minimum
Maximum
You can add notes to document sections, segments, and elements to provide additional information or enter comments.
To add a note:
Right-click a document section, segment, or element, and select Add Note.
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.
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:
Expand Child Nodes - Expand segments or elements
Collapse Child Nodes - Collapse segments or elements
Show Unimplemented - Show or hide unimplemented segments and elements.
Show Implemented Mapped - Show or hide implemented and mapped segments and elements.
Show Implemented not Mapped - Show or hide implemented segments and elements that are not mapped.
Show Optional - Show or hide optional segments and elements.
The shortcut menu for the database tables and fields includes the following options:
Show Full Table Name - Display field and table names
Show Flat File Name - Display flat file record, position, and length information for fields
The shortcut menu for the empty space between database tables and fields includes the following options:
Reset Layout - Display the map in its default state (collapse expanded data).
Show Relations - Display arrows between related database fields.
The shortcut menu for arrows includes the following options:
Reset Layout - Display the map in its default state (collapse expanded data).
Show Relations - Display arrows between related database fields.
From - Display the object from which data is mapped.
To - Display the object to which data is mapped.
Additionally, you can select Go To from the shortcut menu for any mapped object to navigate to the object to which it is mapped.
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:
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.
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.
Select the function you want to use.
Click the OK button. A new box for the function is added to the map.
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.
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.
You can also create variables to use in your maps.
To create a new variable:
Right-click a blank area that is not within any boxes, and select Create Variable.
Enter a name for the variable.
Click the Type drop-down arrow, and select the type of data the variable will store.
Click the button to save the variable.
After you create variables, to assign a variable to a value:
Right-click an element, field, or function, and select Use Variable.
Click the drop-down arrow, and select the variable name.
Click the button.