Some document type definition (DTD) files indicate that quantities or other numbers are sent without decimal places, and that a decimal place indicator is sent in a different element. For example, a trading partner's XML document contains a Quantity element that contains a dollar quantity, such as 50000. A nested element, NumOfDecimals within the Quantity element indicates that there are two decimal places in any number sent in the Quantity element. Therefore, the quantity 50000 is actually 500.00.
Use the decimal conversion operation to convert the decimal places in this circumstance.
Note: Map both the value and the decimal indicator to the same target to convert the decimal places using the decimal conversion operation.
To convert decimal formats in XML data:
Right-click a transaction in the Trading Partner Tree and select Edit Transaction Map to display the transaction map.
In the Target XML column of either the received map or the reply/sent map, right-click the element to modify and select Modify Mapping to display the XML Mapping Conversion Editor dialog box.
If the element you selected has a source element mapped to it, the source element displays in the Operation Stack field. If the element is not mapped, the Operation Stack field is blank.
From the Operations field, double-click DecimalConversion to add it to the Operation Stack field.
If necessary, move the operation to the correct place in the operation stack. Decimal conversions fall after the element that indicates the decimal conversion value.
Add additional sources and operations, as necessary.
Click OK to return to the, mapping utility main window.
From the File menu, select Save Transaction Map to save the map.
See Also: