Mapping a conditional variable

There are times when the mapping of one EDI element depends upon the value in another (generally related) EDI element. The EDI element whose value determines the mapping of the other EDI element is called a Conditional Variable. The EDI element whose mapping is determined by the conditional variable has a Condition placed on it.

A conditional variable is a special memory variable to which ECMap gives the name XXXNNSS, where XXX is the correct segment ID, NN is a sequence number that gives the position of the field name in the segment, and SS is the sub-element (if it exists). When you make an element a conditional variable, ECMap checks to see if the name already exists for this element and creates one if it does not exist. (All field names are case sensitive - a lower case beg01 is not the same variable as an upper case BEG01.)

The program checks to see whether data was mapped to an EDI element to which a Condition is attached and if so, maps a specified constant value to one or two related EDI elements that have been specified as Conditional Variables.

StepsMapping an element to a conditional variable

  1. Right-click the element containing the data to will be evaluated and select Conditional Variable from the drop-down list.

    You see the results of your selection in all three sections of the Mapping window: