on 06-26-2007 2:51 PM
Hi guys,
I have a proxy to file scenario.
First what do I need to change to get a TXT file like this:
EmpNo = 11
EmpName = Toto
Because at the moment it's creating an XML file with tags like that
<?xml version="1.0" encoding="utf-8"?>
<EmpNo >11</EmpNo>
<EmpName >Toto</EmpName>
Thanks,
Regards,
Murai
One method would be to use two tags in ur data type and do a custom mapping.
I mean for 1st tag, value = "EmpNo = " + (input from source message type tag value)
And finally, You need to use file content conversion
Thanks
Varun
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What do I need to do in conversion to get this in my file
80101
Toto
Netweaver
instead of this
- <EmpProfile_Msg>
<Empno>80101</Empno>
<EmpName>Toto</EmpName>
<DepartmentName>NetWeaver</DepartmentName>
</EmpProfile_Msg>
I 've tried to fill the "box" in "Content conversion parameters" but wihout success.
Does anybody know?
Thanks in advance,
Regards,
Murai
Murai,
As per your given XML structure, the conversion parameters which I specified in my earlier replies will work perfectly.
See the below URL for references.
<b>Structure</b>
http://www.flickr.com/photo_zoom.gne?id=640561850&size=o
<b>Receiver comm-channel(1)</b>
http://www.flickr.com/photo_zoom.gne?id=640561854&size=o
<b>Receiver comm-channel(2)</b>
http://www.flickr.com/photo_zoom.gne?id=640561858&size=o
<b>Results</b>
http://www.flickr.com/photo_zoom.gne?id=639719931&size=o
If still you have doubts, do reply back.
Best regards,
raj.
Excellent Raj thank you very much, it's ok now.
I have just a last question. Imagine I have the following structure :
<?xml version="1.0" encoding="utf-8" ?>
- <nr1:EmpProfile_Msg xmlns:nr1="urn:Test:createflatfile">
- <EmpProfile_detail>
<Filename>Toto.txt</Filename>
<i_strCFNumber>i_strCFNumber=011666</i_strCFNumber>
</EmpProfile_detail>
</nr1:EmpProfile_Msg>
How can I use the File name scheme? I mean how can I create the file name with the value of "filename"(the tag)?
Thanks again Raj,
Kind regards,
Murai.
Murai,
Sorry for the late reply. Ok, u want the payload Filename to be ur receiver comm.channel File name scheme right?
Do u have any mapping program?If yes then please see the below logic to achieve the same.
Create simple UDF with single input parameter.
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
conf.put(key,<b>yourinputparameter</b>);
return "";
The mapping logic is
According to your XML structure given above.
Filename[Source]---->UDF--
> Root Node[Target]
Click the checkbox of Adapter Specific Message Attributes- Filename in both Sender/Receiver comm.channel.
If you don't want the above UDF and if you want only variable substitution , then do reply back.
Best regards,
raj.
Any idea?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Murai,
Create Data type,Message Type, Inbound Asynch Message Interface
<Details> 0..Unbounded
<Empno/> 0..1
<Empname/> 0..1
</Details>
Best regards,
raj.
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 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.