on 06-07-2011 10:14 AM
Hi XI/PI experts,
I am working on one scenerion where I have to poll the files from one server and send them to target FTP server with no content conversion( no Mapping involved).
for example:
if the source file is ABC_Invoice_item.csv
then the target file is expected as invoice_YYYYMMDD.csv
Please advise how we can acchive this?
Many Thanks in advance for your valuable inputs.
Cheers,
Mohan
thanks all for ur help.
closing thread.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
chk this:
http://wiki.sdn.sap.com/wiki/display/Snippets/DynamicfilenameinaFiletoFilepassthroughscenario
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi All,
if there are 4 files from sender at the same time with diffrent files names and same have to sent to Target system with diffrent file names. So can we put condition in one java mapping or we need to do java mapping for all four files. do we need one sender channel and 1 reciver channel or 4 sender chanel and 4 reciver channel?
Please advise.
thanks.
Hi,
I have to create the target file name with the first character of the source file name,
like source file is Order.txt - target should be order_20110609.txt
Invoice.txt target should be invoice_20110609.txt
I tried that with if else condition but its not working.
Could you please let me know how we can write the the code for this in java
many thanks.
Hi Mohan,
it seems you are using PI server as file transfer agent. If I have understood your requirements correctly then
1. There is no mapping involved
2. no FCC required
3. change in filename of target file by adding a timestamp.
All this can be achieved by shell scripts.
The scripts will transfer the file using sftp.
You can also rename them using mv command and use of shell variables.
By this method you can prevent overloading of PI server.
regards
Anupam
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 keep a dynamic part of your source filename in the receiver, since the source and target filenames differ, you will need to use mapping to populate the filename in adapter specific attributes.
If you don't want to use any mapping, the only other alternative would be to write a custom adapter module where you populate the filename dynamically.
Otherwise, as per your example, if the receiver filename format is Invoice_YYYYMMDD.csv, you can simply use File Construction mode as "Add Time Stamp" in the receiver file adapter
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Thanks for the response.
is there any other alternative except to go for adapter module.
and if we have 4 files with diffrent names then how the file channel will find the correct file. do we need to configure 4 comm channel for the same?
since it is file pass through ( no structure given , no mapping involved), how we can achive this requirement.
Please advise.
Many Thanks.
Cheers,
Mohan
If you need to keep only a part of the original filename, which itself is not constant, then you would need to go for either a mapping or adapter module.
To pick up 4 different files, if these are the only files in the particular directory, you can simply define filename as * in the sender adapter.
If this is not the case and there are other files in the directory that should not be retrieved, you can use the option Advanced Selection for Source File to define additional filenames that will be picked by the same comm channel.
Regards
hi,
Please also refer these blogs :-
/people/stefan.grube/blog/2009/06/19/unknown-use-case-of-dynamicconfigurationbean-store-file-name-to-jms-header-without-mapping
/people/jin.shin/blog/2007/04/27/sap-netweaver-xi-variable-substitution-with-adapter-specific-message-attributes-via-dynamicconfigurationbean
Regards,
Ninu
Hi,
You can refer the following link for selecting additional files using a single comm channel :
http://help.sap.com/saphelp_nwpi71/helpdata/EN/44/692ab8a4b633eae10000000a1553f6/content.htm
You can also use a Java mapping instead of adapter module to store the filename dynamically in the message header. In this case, use a data type that has just one field under it. Use the same data type for both sender and receiver.
In your Java mapping, use the code for dynamic configuration to retrieve the sender filename, alter it and then store it in the message header again for use by the receiver adapter.
No changes will be required in the sender comm channel. There will not be any conversion to xml format and the data will pass through as is.
Regards
User | Count |
---|---|
73 | |
26 | |
10 | |
9 | |
7 | |
6 | |
4 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.