You use this module to convert an XML document, which is in the main payload of the XI message to text format.
You can define whether a recordset type in the document is displayed as text with a fixed field width, or in a separate list with a user-defined separator.
Within an XML document, different recordset types can be displayed either separately or with a fixed field length (mixed display).
The structure of the document is checked based on the entries you make in the module. If any structures are found in document that do not correspond to your definition, a processing error is triggered at runtime.
You can use the module in receiver adapters.
For example, you can use the module in the receiver file/FTP adapter in place of the File Content Conversion message protocol. The module provides more conversion options and a check of the structure that is to be converted.
More information: Converting XML in the Receiver File /FTP Adapter to Text Format
Add the Module in the Processing Sequence
If the adapter comprises multiple modules, for information about the position of the module, see: Extending the Module Chain for SAP Adapters in the Module Processor
AF_Modules/StrictXml2PlainBean
Local Enterprise Bean
The default module key is displayed.
Add Parameters in the Module Configuration
You must specify exactly one parameter, which excludes you from specifying the other parameter.
recordTypes
For example, you could name the recordset types as follows: RecordType1,RecordType2,RecordType3.
In the remainder of this documentation the parameters are specified by the prefix <RecordType>. In your configuration, replace this name with the name of the recordset type.
Specify Conversion Type List with Separators
This specification is mandatory.
Specify Conversion Type List with Fixed Field Length
For example, you want to write a recordset with three elements that have field widths of five, ten, and fifteen characters. Specify the following:
<RecordType>.fieldLengths = 5,10,15
This specification is mandatory.
Interrupts processing of message with error
Cuts off superfluous characters
Ignores the field length restriction
Make Other Entries
The string is placed in front of the first field of a recordset.
The string is appended to the last field of a recordset as a concluding character. The default is \r\n.
Enter a string. The string is appended to the last field of a recordset as a concluding character. The default is \r\n.
The default value is text/plain.
Only define this parameter if you have already defined singleRecordType.
Define whether a header line is to be added to the result of the conversion.
Does not insert a header line
The header line is generated from the element name of the first recordset of the XML document
The header line is determined by the configuration parameter headerLine.
Only define this parameter if you have already set addHeaderLine=fromConfiguration.
A separator specified by lineSeparator is inserted in the resulting document every n characters.
The default is \r\n.
Only define this parameter if you have already defined fixedLineWidth.
Use Special Characters
<code>indicates the hexadecimal character code of the character to be displayed.
A document to be converted has exactly three levels. The recordset types are on the second level, while the actual data is on the third level.
<root>
<RecordType1>
<column-name1>column-value</column-name1>
<column-name2>column-value</column-name2>
<column-name3>column-value</column-name3>
</RecordType1>
<RecordType2>
<data>column-value</data>
<data2>column-value</data2>
<data3>column-value</data3>
</RecordType2>
</root>
For this document, you can define a configuration for the recordset types RecordType1 and RecordType2. Specify in addition: recordTypes=RecordType1,RecordType2
You then have the option of defining a different conversion for each recordset type.
If you use the parameter singleRecordType, both recordset types are converted in the same way.