Real Time Information Director User Documentation
    RTID Metadata Language 
Hewlett-Packard Company  47  529618-002   
Variant Documents 
Typically, each SAP instance handles some data elements differently, or the same 
instance requires different tag mappings in different circumstances. Variant document 
definitions provide a way to deal with the differences, by creating a separate document 
metadata class for each SAP instance or circumstance. You can use a file-comparison 
tool to see the differences between variant document definitions. 
Information in the header of an inbound document identifies the variant. (This 
characteristic distinguishes a variant document from an aliased or substitute document, to 
be described later.) For example, the header identifies the sending system; when source 
systems use slightly different forms of the same document, this header element is the best 
choice for selecting among variants. 
An important distinction between variant and base documents is that, whereas a base 
document definition specifies both format and content metadata, a variant document 
definition specifies only format metadata. The variant document definition uses the 
content metadata of the corresponding base document.  
Specifying a Variant Document 
To specify a variant document, you create a class that has a unique name and extends 
VariantDocumentDefinition. 
You implement a constructor for your Variant Document. This constructor calls the 
superclass with the following parameters: 
•  Selectable variantSelector. This parameter specifies the header information used 
to establish which variant an inbound IDoc represents. 
•  String variantName. This parameter specifies the variant form of the IDoc in an 
outbound document. 
•  IDocSegment idocSegment. This parameter contains the format metadata for the 
variant IDoc. 
•  Update and query options. See “Update and Query Options for Document 
Definitions.” 
Example: 
Here is an excerpt from a variant of the ORDERS05 IDoc. The class 
IhubOrders05FusionAP extends VariantDocumentDefinition. The document definition 
contains only format metadata. 
The class constructor calls the superclass constructor with three parameters: 
•  The first parameter identifies the variant, which is Sources.FusionAP. This 
header field is used to recognize the inbound documents defined by this variant. 










