cancel
Showing results for 
Search instead for 
Did you mean: 

receiver file name with counter

Former Member
0 Kudos

While working on proxy to file scenario. I have to maintain receiver file name as ddmmyyyyxxx_nnn.xml,where xxx is constant and nnn is a counter which is suppose to be reset everyday.Anybody can help me on how to achive this...?

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

thanks guys My Question is Answed. point rewarded.

manoj_khavatkopp
Active Contributor
0 Kudos

Hi Amit,

Can you please tell how did u achieve this.

Br,

Manoj Khavatkopp

Former Member
0 Kudos
former_member472138
Active Contributor
0 Kudos

Hello Amit,

Yes. You can achieve this but only using File - NFS Protocol.

A new file is created for each document. The file name is extended with a counter, which is inserted before the file name extension (for example, default002.file). This selection is only available for the File System (NFS) transport protocol.

Make specifications for Counter Definition:

Prefix

Specify one or more characters that you want to add before the counter in the file name.

Format

Specify the first counter to be used. It must be a valid integer number. Leading zeros are permitted.

Step

Specify the counter increment.

Mode

Specify when the counter is to be added.

After First File

The counter is added when the file name is used unaltered for the first time.

Thanks

Pothana

Former Member
0 Kudos

Hi pothana, this is about adding the counter ,but I need to reset the counter on every new day.

former_member472138
Active Contributor
0 Kudos

According to my previous update you can add a counter for every file . Lets say nnn001.txt then nnn002.txt then nnn003.txt in a particular day.

Dont understand if not this is what your requirement. May be you can add here with an example, so that some one would help you out.

Regards

Pothana

former_member192079
Participant
0 Kudos

Hi,

If i am correct u r requirement is : Day one : 17112010xxx_001.xml

17112010xxx_002.xml

17112010xxx_003.xml

next day 18112010xxx_001.xml

18112010xxx_002.xml

The counter is reset to initial if any above variants changes...

This is functionality work with file protocol NFS only.

Regards,

Ashu

Former Member
0 Kudos

Hi Ashu,

My problem is same as you said but date is not coming from payload ,so how I can set that in the name of XML file...?

former_member192079
Participant
0 Kudos

Hi,

Date value can be created in UDF in mapping, map it to some dummy target field(may be end of u r payload). then use variable substitution to read the last field name as FileName in receiver file adapter. Content conversion u need to add more parameter to remove the last dummy field to written to your target file content... ( NameA.fixedLengthTooShortHandling = Cut )

[Variable Substitution|http://help.sap.com/saphelp_nwpi711/helpdata/en/44/6a316af5a23672e10000000a114a6b/frameset.htm]

Regards

Ashu