Dear all,
I have a input that looks like this:
HeaderKeySomeHeaderInformationItemKeySomeItemInformationItemKeySomeItemInformation...
Here's the actual input
TEHGMESS0026000000288S0001TEI2____026200006112410400000000 18010000000000 00126000000000126000120600000000002000000000 000WESTMONOBERTBE2014052309422408120003 000000000000000000000000000000JTEI2____026200006112410400000000 19010000000000 00126000000000126000120600000000002000000000 000WESTMONOBERTBE2014052309422408120003 000000000000000000000000000000J
HeaderKey = TEHGMESS
ItemKey = TEI2____
Is it possible to process this via MessageTransformBean (my actual scenario is JMS to IDoc)? I already tried but I only succeeded when having new lines in my input to separate between Header and (multiple) Items.
So when the input and my configuration looks like below it works, but when I only have a single row input it doesn't work, even when specifying xml.recordHeader.endSeparator = '0' / xml.recordItem.endSeparator = '0'. I even tried xml.endSeparator = '0' but no luck.
Input that works
TEHGMESS0026000000288S0001
TEI2____026200006112410400000000 18010000000000 00126000000000126000120600000000002000000000 000WESTMONOBERTBE2014052309422408120003 000000000000000000000000000000J
TEI2____026200006112410400000000 19010000000000 00126000000000126000120600000000002000000000 000WESTMONOBERTBE2014052309422408120003 000000000000000000000000000000J
Matching configuration that works for input which structures are delimited by new line.
| Paramentername | Parametervalue |
|---|---|
| Transform.Class | com.sap.aii.messaging.adapter.Conversion |
| Transform.ContentType | text/xml;charset=utf-8 |
| xml.conversionType | StructPlain2XML |
| xml.documentName | MT_TEI2Split |
| xml.documentNamespace | http://hansgrohe.com/pi/MQ/TEI2/10 |
| xml.keyFieldName | SATZARTKey |
| xml.keyFieldType | CaseSensitiveString |
| xml.processFieldNames | fromConfiguration |
| xml.recordHeader.fieldFixedLengths | 8,4,9,1,4 |
| xml.recordHeader.fieldNames | SATZARTKey,SATZLENHG,NUTZLEN,MESSAE,MESSNR |
| xml.recordHeader.keyFieldValue | TEHGMESS |
| xml.recordItem.fieldFixedLengths | 8,4,2,10,8,19,3,3,2,10,6,2,10,6,2,10,6,6,6,6,6,11,9,2,10,6,2,10,6,3,4,3,7,14,8,1,31 |
| xml.recordItem.fieldNames | SATZARTKey,SATZLEN,BUCHART,TRNR,ANDGNR,MITEM,TEIVARI,BSTSTATU,REFTYP,ORNO,POS,REFTYP1,ORNO1,POS1,CHATYP,CHARGE,CHAPOS,ABBVONL,ABBNACH,ZUBVONL,ZUBNACH,I2MENG,I2BUNR,REFTYPN,ORNON,POSN,REFTYP1N,ORNO1N,POS1N,BSTSTATN,ABUSERAB,ABUSERFN,ABUSERNA,I2TIME,I2LIDNR,I2FMCODE,FILLER |
| xml.recordItem.keyFieldValue | TEI2____ |
| xml.recordsetName | records |
| xml.recordsetStructure | recordHeader,1,recordItem,* |
Any clues on this? Is it even possible to have multiple structures in one row? Many thanks in advance
Jens
Request clarification before answering.
Thanks both,
different workarounds that sounds more or less feasible.
I did some more research and figured (on PI 7.0 SP 25) that the xml.recordHeader.endSeparator / xml.recordItem.endSeparator in fact seems not to have any effect. I could specify '0' or '0x09' or some other arbitrary stuff but the scenario keeps working if my file delimits header and items with newline no matter what I specify in xml.recordHeader.endSeparator or xml.recordItem.endSeparator.
Could this be considered a bug or does MTB simply not support xml.<structure>.endSeparator?
Cheers
Jens
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.