Real Time Information Director User Documentation
RTID Metadata Language
Hewlett-Packard Company 28 529618-002
private static final IDocSegment idocSegment =
new IDocSegment("ORDERS05", "SALES_ORDER", new TagDefinition[] {
IDOC.HEADER,
new Segment("E1EDK01", new TagDefinition[] {
new FieldElement("ACTION", "SALES_ORDER_ACTION_CD"),
new FieldElement("CURCY", "CURRENCY_CD"),
new FieldElement("WKURS", "PRICING_STATISTICS_EXCHANGE_RT"),
new FieldElement("ZTERM", "PAYMENT_TERMS_CD"),
new FieldElement("BSART", "CUSTOMER_PURCHASE_ORDER_TY"),
new FieldsElement("BELNR", new String[]
{"SALES_ORDER_NO", "PRECEDING_DOCUMENT_NO"}),
new FieldElement("BSTZD", "PURCHASE_ORDER_NUMBER_DS"),
new FieldElement("VSART", "SHIPPING_CONDITION_CD"),
new FieldElement("VSART_BEZ", "SHIPPING_CONDITION_DS"),
new FieldElement("RECIPNT_NO", "CUSTOMER_SOLD_TO_NO"),
new FieldElement("KZAZU", "ORDER_COMBINATION_IN"),
. . .
new FieldElement("DELCO", "AGREED_DELIVERY_TM")
}),
Not only can you map an element to a field that has a different name, but you can map a
single element to more than one field. For example, the highlighted lines map the
BELNR element to both SALES_ORDER_NO and PRECEDING_DOCUMENT_NO.
Remember that the SALES_ORDER_NO column in the SALES_ORDER table links to
the PRECEDING_DOCUMENT_NO column of the ORDER_FLOW table.
This FieldsElement object takes care of populating both columns.
Note that FieldsElement is not a typographical error but the name of an object distinct
from FieldElement.
IDocSegment
The IDocSegment class identifies the top-level XML tag of the IDoc. Normally, this tag
has the same name as the IDoc. All the other format metadata is nested under this object.
You pass the IDocSegment (along with the DocumentRecord) to the superclass
constructor.
IDocSegment has the following required parameters:
• The name of the top-level XML tag.
• The name of the table to which the top record belongs (tableName). This table
must be the same as the table specified in the DocumentRecord.
• An array of segment tags nested under this tag (Segment[]) Segment tags are
discussed briefly below and in detail later in this document.
You can also specify a Segment Formatter (SegmentFormatter), which applies special
processing to the segment. For more information about segment formatters, see
“Segment Formatter Classes,” later in this document.