cancel
Showing results for 
Search instead for 
Did you mean: 

REG: Output File Name

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Shabarish_Nair
Active Contributor
0 Kudos

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

MichalKrawczyk
Active Contributor
0 Kudos

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

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

Easily you can acheive it by using Adapter Specific Message attrributes property without writing Java code

Sameer

jagesh_lakdawala
Active Participant
0 Kudos

Hi,

Select the Adapter Specific Message attrributes (Filename,File Type) for both Sender and Receiver communi. Channel.

Regards

Jagesh

Former Member
0 Kudos

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