Real Time Information Director User Documentation

RTID Metadata Language
Hewlett-Packard Company 21 529618-002
Specifying a Unique IDoc
To specify an IDoc, you create a class that has a unique name, such as the name of the
IDoc, and that extends the BaseDocumentDefinition class. (Remember that a native
document extends NativeDocumentDefinition.)
You construct a DocumentRecord, just as for a native document, to specify the document
content metadata, but you also construct an IDocSegment, which describes how to map
specific IDoc elements to the data store.
When the constructor for your class calls the superclass constructor, the parameters need
to refer not only to the document record (the content metadata) but also to the IDoc
segment (the format metadata).
Let’s look at an example.
Metadata Excerpts: An IDoc Definition
The next few pages present the metadata for a document type called ORDERS05, which
represents the SAP ORDERS05 IDoc.
For your convenience, the same metadata is presented repeatedly with different
statements emphasized to match the supporting text.
Again, you’ll see examples of metadata statements before you see the general
descriptions of the statements.
The first excerpt from ORDERS05 comes from the top of the document definition.
package com.hp.rtsc.documents;
import com.hp.rtsc.metadata.*;
import com.hp.rtsc.metadata.format.*;
import java.sql.SQLException;
/**
* Metadata class to define an ORDERS05 IDoc.
*/
public class Orders05 extends BaseDocumentDefinition {
// XML IDoc Mapping Metadata.
// This array of tags is declared separately,
// since these tags occur both under <E1EDKA1> and <E1EDPA1>
private static final FieldElement[] ORDER_EVENT_TAGS =
new FieldElement[] {
new FieldElement("PARVW", "PARTNER_FUNCTION_CD"),
new FieldElement("PARTN", "EVENT_SPEC_CUSTOMER_NO"),
new FieldElement("LIFNR", "EVENT_SPEC_SUPPLIER_NO"),
new FieldElement("NAME1", "EV_SPEC_DOING_BUSINESS_AS_NM"),
Notice that the class Orders05 extends BaseDocumentDefinition. (Don’t worry about all
the FieldElement statements for now.)