on 05-19-2009 10:04 AM
Hi All,
I have a file to file scenario where mapping is not used. My Input file name is "XXXX.txt" and i want the output file name as "XXXX.dat". But the problem is XXXX is not a constant value but a dynamic value and i cant use a UDF because there is no mapping for this interface. Is there any other method by which this can be achived?
Thanks,
Siva
use a simple java mapping that will pass the inputstream to the outputstream... that means no transformation of the data is done and in this java mapping use dynamic configuration to set the file name.
You will find all required details in this blog - /people/shabarish.vijayakumar/blog/2009/03/26/dynamic-configuration-vs-variable-substitution--the-ultimate-battle-for-the-file-name
chk the wiki links etc in the blog for sample codes
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
in case you don't want to do it in a java mapping like Shabarish suggested
you can also do it (set dynamic configuration attribute Filename) inside an
adapter module - this way there will be no need for any mapping nor interface
mapping and you can handle everything inside the file comminication channel
both approaches require exactly the same amount of code writing in my opinion
Regards,
Michal Krawczyk
Hi,
Easily you can acheive it by using Adapter Specific Message attrributes property without writing Java code
Sameer
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Select the Adapter Specific Message attrributes (Filename,File Type) for both Sender and Receiver communi. Channel.
Regards
Jagesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi!
For your input file you can work as follows:
Put the file in a special directory and then read this directory using wildcard filename definition:
e.g. *.txt looks for and processes all files ending with *.txt
For your output file (receiver file adapter) you may work with os command "rename" and/or try it using this stuff:
http://help.sap.com/saphelp_nwpi71/helpdata/en/44/6a316af5a23672e10000000a114a6b/content.htm
Regards,
Volker
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
11 | |
10 | |
9 | |
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.