on 02-08-2006 12:00 PM
Hi,
I need to insert the filename in the XML structure when the file is read by File Sender Adapter (FTP).
Example
<document>
<filename>file_200602081000.dat</filename>
<record>
<row>
<line>Line 1</line>
<line>Line 2</line>
</row>
</record>
</document>
It's possible?
Hi,
If you are giving a single filename in the File adapter configuration then you can easily get the filename using the Module.
The code to get the filename is
Channel channelid = moduleContext.getChannelID();
String file = channelid.getValueAsString("file.sourceFileName");
Then you can add this to your XML structure in that module itself.
regards,
P.Venkat
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Answered
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Evandro,
please go through the link. This may help you.
http://help.sap.com/saphelp_nw2004s/helpdata/en/e2/e13fcd80fe47768df001a558ed10b6/frameset.htm
Thanks and Regards
Vishal Kumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Evandro,
Its possible using the extended source file option where you can send it and receive it using the same option in the receiver file adapter and write it with the same name which is possible from SP14 onwards.
But if you want it in the payload you need to use it by modifying the payload using adapter module.
Cheers
JK
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 are using XI SP14, you have inbuilt options to retrieve the file name in the File Sender Adapter. Once you choose that option in the Adapter configuration , in Mapping you can access the file name.
For more info refer to /people/sap.user72/blog/2005/10/01/xi-new-features-in-sp14
Following link tells about Release Notes:
http://help.sap.com/saphelp_nw04/helpdata/en/43/161682de3c04bae10000000a11466f/frameset.htm
If XI is below SP14, then you need to use Module Processor to retrieve the File Name.
regards,
Moorthy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
yes very easily (few lines of code)
you can do it inside an adapter module:
SAP note
819761 - XI 3.0 File Sender: Accessing source file name from a module
Regards,
michal
-
<a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions">XI FAQ - Frequently Asked Questions</a>
There is no inbuilt options available in SP13.
So in this case you need to write Java Module code and you need to deploy it in the Sender file Adapter.
You have How to Create Adapter Modules guide from SAP itself. You can refer the same.
You can go thru following blog for more details in SP14.
/people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14
(in SP14)
Hope this helps,
Regards,
Moorthy
Hi Evandro,
This link contains a list of all standard functions available in XI. Just go through them and check if it helps,
http://help.sap.com/saphelp_nw04/helpdata/en/43/c4cdfc334824478090739c04c4a249/content.htm
Regards,
Bhavesh
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.