cancel
Showing results for 
Search instead for 
Did you mean: 

Output File name

Former Member
0 Kudos

Hi Experts,

How can i create an Output file with name FIle_Price+<timestamp>.txt for the input file name File.txt using a File(FTP) Adapter.

I know we can add timestamp using Adapter specific attributes, but how we can add the word Price to the output file name.

Please suggest to achieve it.

Thanks in advance,

MK

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Experts need your urgent attention.

Former Member
0 Kudos

Hi Experts,

If the Input file name is input_11.txt, then i am able to add the Timestamp in the output file name but how can i add the word 'price' to the file name.

output file name can look like input_11_price<timestamp>.txt

Note: i am not developing any objects in the Repository.

Please suggest.

thank you.

MK

Former Member
0 Kudos

Please suggest further to achieve it, its urgent.

Thank you,

MK

former_member194786
Active Contributor
0 Kudos

Hi MK,

Did you try concatenating the pricr field along with the File ? I think it should work.

Thanks and Regards,

Sanjeev.

Former Member
0 Kudos

Hi sanjeev,

thanks for ur reply.

can u please eloborate your answer. And can we make use of option Temporary file name scheme in Processing parameters of File Adapter to achieve the below requirement

If input file name is File11_IN.txt

then output file name should be File11_Price_IN_<Timestamp>.txt

please suggest.

Thank you,

MK

prateek
Active Contributor
0 Kudos

If ur XI is >= SP 14, then see this

/people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14

Here in step 3, instead of

String ourSourceFileName = conf.get(key);

use the following

String ourSourceFileName = conf.get(key) + "_Price";

Regards,

Prateek

Former Member
0 Kudos

Thanks Prateek,

I am new to XI environment, can u please suggest, how to implement this UDF in the File adapter configuration.

Thank you,

MK

prateek
Active Contributor
0 Kudos

U may take any field from the payload to represent the filename. In the graphical mapping, just create a UDF and copy this code. Now map the UDF to the required target field. So at this moment ur target structure is holding the filename.

Now perform variable substitution with the payload field as the variable and u ll get the required output

http://help.sap.com/saphelp_nw04/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/content.htm

Regards,

Prateek

Former Member
0 Kudos

Hi Prateek,

the scenario is FIle(FTP) to File(FTP) and the requirement is to move files from(with in same FTP server) the /downlod to /Archive directory. Hence i hav'nt created any data types, message types, mappings.

just did the communication channel configuration to move the files.

please suggest how to implement the UDF.

or can be achieved by using Dyanmic Configuration module :1 *AF_Modules/DynamicConfigurationBean *

thank you,

MK

Former Member
0 Kudos

Please suggest further to achieve it, its urgent.

Thank you,

MK

prateek
Active Contributor
0 Kudos

Hence i hav'nt created any data types, message types, mappings.

I think these requirements should be made clear in the question itself.

or can be achieved by using Dyanmic Configuration module

In ur case as mentioned in last post, the DynamicConfigurationBean will be helpful.

/people/jin.shin/blog/2007/04/27/sap-netweaver-xi-variable-substitution-with-adapter-specific-message-attributes-via-dynamicconfigurationbean

Regards,

Prateek

Former Member
0 Kudos

Hi Mk,

Did you try Variable substitution?

Have a look at the foll links:

/people/jayakrishnan.nair/blog/2005/06/20/dynamic-file-name-using-xi-30-sp12-part--i

/people/jayakrishnan.nair/blog/2005/06/28/dynamic-file-namexslt-mapping-with-java-enhancement-using-xi-30-sp12-part-ii

Regards,

Divija.

Former Member
0 Kudos

Sorry prateek, for not mentioning it earlier.

i have followed the web blog /6400, but the output file name i am getting is INPUT_11_IN.TXT_PRICE_<TIMESTAMP>

but the requirement is INPUT_11_IN_PRICE_<TIMESTAMP>.TXT.

Please suggest to correct it.

thank you,

MK

Former Member
0 Kudos

Sorry prateek, for not mentioning it earlier.

i have followed the web blog /6400, but the output file name i am getting is INPUT_11_IN.TXT_PRICE_<TIMESTAMP>

but the requirement is INPUT_11_IN_PRICE_<TIMESTAMP>.TXT.

Please suggest to correct it.

thank you,

MK