on 04-20-2006 8:40 PM
Hi all,
I'm trying to translate a XML message to a text line file.
My XML message is this:
<?xml version="1.0" encoding="UTF-8"?>
<ns1:Proveedor_100011 xmlns:ns1="http://sap.com/xi/webservices/buyordint">
<config>
<directory>c:/tmp</directory>
<filename>dynamicFile3.txt</filename>
</config>
<root><string>Header;423423</string>
<lines>
<value>LINE;</value>
</lines>
</root>
</ns1:Proveedor_100011>
I only want to write to text file the "root" TAG content.
I try different "Content conversion parameters" in the integration builder (configuration)
For example:
*************************************
RecordSet Structure: root
root.addHeaderLine 0
root.fieldSeparator ;
root.endSeparator ;
*************************************
but the better result is all XML content.
Can someone tell me how to skip "Config" TAG and only write the "ROOT" one?
I'll apreciate any help.
Thanks in advance,
Diego.
Not sure if this was ever answered, but in case someone is referencing this link and still having issues, please make sure the Content Conversion parameter is 'Cut' in this exact text.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Moorthy,
it keeps not working. If I do it work, i'll tell what was happening.
Regards,
Diego.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Moorthy,
Thanks for your responde. I readed the note, it is for underscore problem solution. I finally removed the underscore from my message.
Could you please send me your message where the Cut parameter is working?
Best regards,
Diego.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sravya,
I've tried again without better luck.
I change the root element of my message from
Proveedor_100011 to Proveedor100011. (removed underscore)
I created the next message as in your weblog:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://sap.com/xi/webservices/buyordint" targetNamespace="http://sap.com/xi/webservices/buyordint">
<xsd:element name="Proveedor100011" type="Proveedor100011" />
<xsd:complexType name="Proveedor100011">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
54650790d48f11dab96c001438eb3b44
</xsd:appinfo>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="root">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
45f01f20d48e11dab854d06ec0a8004a
</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="head" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
45f01f21d48e11da8f1dd06ec0a8004a
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="rows" minOccurs="0" maxOccurs="unbounded">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
45f01f22d48e11da894ad06ec0a8004a
</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
45f01f23d48e11dab889d06ec0a8004a
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="filenode">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
45f01f24d48e11daab91d06ec0a8004a
</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="filename" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
45f01f25d48e11da8becd06ec0a8004a
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="filepath" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
45f01f26d48e11dac56cd06ec0a8004a
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
<Proveedor100011>
<root>
<rows>
<value></value>
</rows>
</root>
<filenode>
<filename></filename>
<filepath></filepath>
</filenode>
</Proveedor100011>
I've tried to set "Recordset Structure" in file adapter configuration to "root,filenode" and to "Proveedor110001, filenode" but no output is writed
We are using XI version: SAPKB64015, which version did you use in your weblog?
Thanks and regards,
Diego.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
can you please rename the Proveedor_100011 to any name without underscore?That is the problem and then follow the blog written by me.Try giving the filename in the same way I have given..add filenode and filename inside it...it should definetly work.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello krishna,
Thanks for your response.
Every message in message monitor has state Success. No error appears.
Does any one have a Content Conversion document (pdf,...) that shows more complex escenarios than SAP help site?
Thanks in advance,
Diego.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Moorthy,
I tried your last solution and but it didn't work.
I have changed the document to this new structure:
<?xml version="1.0" encoding="UTF-8"?>
<ns1:Proveedor_100011 xmlns:ns1="http://sap.com/xi/webservices/buyordint">
<dtroot>
<root>
<string>12312312</string>
</root>
<config>
<directory>c:/tmp</directory>
<filename>directory7.txt</filename>
</config>
</dtroot>
</ns1:Proveedor_100011>
In Recordset structure I set "dtroot,config,root"
And in parameters:
dtroot.fieldSeparator = 'nl'
dtroot.endSeparator= 'nl'
config.fieldFixedLengths = 0
config.fixedLengthTooShortHandling = CUT (or Cut)
root.addHeaderLine = 'nl'
root.fieldSeparator = 'nl'
It generates no output.
When I replace parameters for "config" TAG
config.fieldFixedLengths = 0
config.fixedLengthTooShortHandling = CUT (or Cut)
By
config.addHeaderLine = 0
config.fieldSeparator = 'nl'
It writes all content to file.
**********************************************
I don't know how to continue with this issue...
Any other suggestion?
Thanks for your time.
Regards,
Diego.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Moorthy,
Thank you for your response. I tried it, exactly, but it didn't work for me.
When I set the two Recordset Structure (config and root) and set parameter values, no content is sent to file.
If I set only root as Recordset Structure, then everything goes to file, including filename and directory.
Do you know if I'm missing anything?
Best regards,
Diego.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Moorthy
Thanks for your response but i've tried the blog solution and it doesn't work for me. When I specify all TAG names in recordset structure inbox field and set "fieldSeparator" for everyone of them it works, when I change for the TAG "config" fieldSeparator by (fieldFixedLengths and fixedLengthTooShortHandling) as the blog says, no output is writed.
Thanks,
Diego.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
If your structure is like this
<?xml version="1.0" encoding="UTF-8"?>
<ns1:Proveedor_100011 xmlns:ns1="http://sap.com/xi/webservices/buyordint">
<config>
<directory>c:/tmp</directory>
<filename>dynamicFile3.txt</filename>
</config>
<root>
<string>Header;423423</string>
<lines>
<value>LINE;</value>
</lines>
</root>
</ns1:Proveedor_100011>
Then your content conversion is -
RecordSet Structure: config,root
root.fieldSeparator = ;
root.endSeparator = 'nl'
config.fieldFixedLenghts = 0
config.fixedLenghtTooShortHandling = CUT
Try out this. And one more thing, do you want to get Header and Line details in the same line?
If so make the strucure like this
<root>
<String>Header...</String>
<Line Value>...</Line Value>
</root>
Try this out.
http://help.sap.com/saphelp_nw2004s/helpdata/en/d2/bab440c97f3716e10000000a155106/frameset.htm
Hope this helps,
regards,
Moorthy
Diego
First of all you dont map them in Message Mapping and you create the text file of fixed lenghth and you give the content conversion parameters.
---Mohan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You can use Cut Parameter in the Receiver File Adapter to cut the Config structure from the xml.
/people/sravya.talanki2/blog/2005/08/11/solution-to-the-problem-encountered-using-variable-substitution-with-xi-sp12
Hope this helps,
Regards,
Moorthy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.