cancel
Showing results for 
Search instead for 
Did you mean: 

Adding a unique identifier in file name

former_member216353
Participant
0 Kudos

Dear all,

In one of the scenario(n IDOCs to 1File),

IDOCs keep coming from SAP and at XI we are appending it in one file.

XI transmits this file on particular time of a day(say everyday at 6 PM) to the receiver system. It implies that it is a per day interface.

XI creates the file with the this convention: <DocName>>_<Date>.txt

Now a new requirement has come up to add a unique identifier to this filename for every transmission, Say for ex:

<UniqueIdentifier>_<DocName>_<Date>.txt

The receiver system wants this, UniqueIdentifier to be in sequence, say

0001_OrderData_20090224.txt

0002_OrderData_20090224.txt

Is it possible to achieve this in XI, Do we have any standard feature. or is there any workaround.

Kindly drop in your comments.

Thanks in advance,

Younus

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Mohammed.

Your interface won't work like this. If this is the situation you want to archieve then you should use the IDOC.txt as a secondary input as well.

if you do an append on the file there is no way you can duplicate that.

else i'd suggest you create a CMD function which does a copy and append number to that. There is a function within SAP Xi to execute a CMD line function when done.

In this batch (or.sh) file you can copy the last file and append a number to that. Alllthough i'm not sure how dynamically that is.

greets

former_member216353
Participant
0 Kudos

Sorry, a small correct,

The file construction mode is "Append", so I will not be able to use the option "Addcounter" in receiver file channel.

Let me know if we have any other altenative/approach.

Regards,

Younus

Former Member
0 Kudos

Ohhhps... My mistake... The link was not applicable for your case.

Edited by: Pooja Pandey on Feb 24, 2009 3:33 PM

former_member216353
Participant
0 Kudos

Hi Pooja,

In my scenario, file construction mode is "Append", so I can use the "AddCounter" option.

Do we have anyother way to achieve this.

Regards,

Younus

Former Member
0 Kudos

Hi, Mu:

Just a hints

If you use XI to achieve it, it might be a bit complicated.

however you can use external program, which can be called from adapter.

Liang

Former Member
0 Kudos

Hey Mohammad,

The "Add Counter" option at the file receiver adapter should help in adding a counter in your file names.

http://help.sap.com/saphelp_nwpi71/helpdata/en/44/6830e67f2a6d12e10000000a1553f6/frameset.htm

Not that this option is available only if you select the Transport Protocol as File System (NFS).

Thanks,

Pooja Pandey