on 01-30-2007 9:43 AM
Hi everybody,
I have to convert a XML Record to a String with fix field length.
The XML has multiple child elements and I have to Loop over this elements, pick up every single field, fill up the field with a given fieldlength (taken from a commaseperated fieldlength-list and append it to the targetstring.
Has anyone an idea how to realize this?
Hi,
the source is the following:
<?xml version="1.0" encoding="UTF-8" ?>
<MT_RecType>
<RecType>
<RecIdent1>01111</RecIdent1>
<RecIdent2>02222</RecIdent2>
<Name1>Miller</Name1>
<Name2>Schulz</Name2>
</RecType>
<RecType>
<RecIdent1>999</RecIdent1>
<RecIdent2>999</RecIdent2>
<Name1>Mik</Name1>
<Name2>Debbie</Name2>
</RecType>
<RecType>
<RecIdent1>888</RecIdent1>
<RecIdent2>22</RecIdent2>
<Name1>Joe</Name1>
<Name2>Doe</Name2>
</RecType>
</MT_RecType>
I want to loop over the RecType and create a string like:
01111 02222 Miller Schulz /nl999 999 Mik Debbie /nl888 22 Joe Doe /nl
with the following fieldlegth:
RecIdent1 = 10
RecIdent2 = 10
Name1 = 15
Name2 = 15
What I forgot.....
I have to send this string as an eMail attachment with the mail package. My problem is to fill this in the content field..... sorry!
Message was edited by:
Heiko Stach
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
- I'd try to use standard content conversion adapter module to change it to your string
- then a simple adapter module to take this payload and put it in the attachment
this way you could you the standard adapter module
and put this content inside the attachment
BTW
I would't use the mail package for that
Regards,
michal
-
<a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>
Hi,
I hope this can be possible with MAIL adapter with configurations,but no need to use file adapter ,
see below link
http://help.sap.com/saphelp_nw2004s/helpdata/en/23/c093409c663228e10000000a1550b0/content.htm
Regards
Chilla..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
if you need to create file with FixedLengths all you need
to use is content conversion
BTW
you can also use content conversion with many other adapters
(JMS, SOAP etc.)
Regards,
michal
-
<a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Can you give an example?
Regards
Bhavesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
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.