cancel
Showing results for 
Search instead for 
Did you mean: 

Pick a file based upon its extension

former_member194786
Active Contributor
0 Kudos

Hi Experts,

I have a requirment. I have to pick a file based upon its extension, i.e., the file having a particular extension, should be picked up before fiiles having a diferent extension.

Is this possible using only the adapter configuration?

Thanks and Regards,

Sanjeev.

Accepted Solutions (1)

Accepted Solutions (1)

sunil_singh13
Active Contributor
0 Kudos

Hi Sanjeev ,

It's bit Tricky.

One Possible solution is we can use some Concept of Scheduling here

1)put the file of desired extention to be picked up first and keep its mode as delete so that after processing it will no longer remain there ,but in file name keep .

2)then use other file adapter that will keep other files at that location and the previous adpter will pick those files ,

Other option is you can keep some time difference in picking up of two files so that file of desired extention will be picked up first and after some time stamp other files will be picked up

Reward Points if Helpful

Thanks

Sunil Singh

2) use another file adapter that will keep the other files there

former_member194786
Active Contributor
0 Kudos

Hi Sunil,

Other option is you can keep some time difference in picking up of two files so that file of desired extention will be picked up first and after some time stamp other files will be picked up

Can you please elaborate on this. How to avhieve this?

Thanks and Regards,

Sanjeev.

Former Member
0 Kudos

Hi Sanjeev,

While configuring the file sender adapter, I would suggest you put .xml and .txt files in two different directories. Then,

1) Give the File name as .

2) Check the checkbox named 'Advance selection for source file'

3) Enter the directory name and file name mask (.xml) and then (.txt)

I think it should solve your problem.

Thanks,

Varun

Answers (6)

Answers (6)

sunil_singh13
Active Contributor
0 Kudos

Hi Sanjeev ,

Have a look at following PDF .These will be helpful to create your Road map

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/4f61fddf-0601-0010-7ab5-fb7...

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/d458a870-0601-0010-caab-b99c7974...

/people/krishna.moorthyp/blog/2005/06/09/walkthrough-with-bpm

BPM Steps..

http://help.sap.com/saphelp_nw04/helpdata/en/62/dcef46dae42142911c8f14ca7a7c39/frameset.htm

/people/shabarish.vijayakumar/blog/2006/11/26/adapter-scheduling--hail-sp-19-

Reward points if it is useful

Thanks

Sunil Singh

former_member194786
Active Contributor
0 Kudos

Hi Sunil,

Thanks for the reply. But it doesnt solves my problem. My question was can i achieve the requirment without using BPM, just by adapter configuration? I dont think its possible. Anyway experts i am closing the thread now. But if you get any work arounds please update me on the same.

Thanks and Regards,

Sanjeev.

Edited by: Sanjeev Shekhar Singh on May 6, 2008 3:33 PM

nisarkhan_n
Active Contributor
0 Kudos

Try this....in the sender adapter write an VB script which will add an timestamp to the file depening upon your choice may be an count

for Ex you have two set of files with different extension

a.xml

b.xml

c.xml

1.txt

2.txt

3.txt

that VB script should rename these files to the below format

name_a_1.xml

name_b_2.xml

name_c_3.xml

name_1_4.txt

name_2_5.txt

name_3_6.txt

the last value in the filename name_a_last value can be any value in ascending order for example timestamp also

now in sender adapter write the filename to be name_.

if the sender file adapter treats the name_* in specific ascending order then it should work...............else this will not work in above methods

Note: I am not sure this will work...just an wild guess......

Former Member
0 Kudos

Can you please elaborate on this?

What I understood is:

source directory has 2 files :

input.xml

input.txt

now based on extension you have to pick the file, means first input.xml and then input.txt or vice versa?

Thanks

Farooq

former_member194786
Active Contributor
0 Kudos

Hi Farooq,

Yes. You got it right. I want that files with extension .txt should be picked first. And then the files with extension .xml. Is this possible using Adapter configuration?

Thanks and Regards,

Sanjeev.

GabrielSagaya
Active Contributor
0 Kudos

under file name give *.txt or *.xml or *.csv which is used to get corresponding all same type of files.

http://help.sap.com/saphelp_nw04s/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/frameset.htm

Former Member
0 Kudos

Hi,

Yah it should be possible,

Suppose it is text file then you should mention the file name as *.txt in the sender side communication channel.

Suppose it is document file then use *.doc like all files.

aashish_sinha
Active Contributor
0 Kudos

Hi,

Please refer these link and web log...

http://help.sap.com/saphelp_nw2004s/helpdata/en/84/e8763c997fda50e10000000a11405a/frameset.htm

/people/mickael.huchet/blog/2006/09/18/xipi-how-to-exclude-files-in-a-sender-file-adapter

Regards

Aashish Sinha

PS : reward points if helpful

Former Member
0 Kudos

Hi,

In the Sender File CC, use *.txt or *.xml like this format

then this time it will pick all the files which are having this extension

Check Under section File Access Parameters

http://help.sap.com/saphelp_nw70/helpdata/EN/ae/d03341771b4c0de10000000a1550b0/frameset.htm

Regards

Seshagiri

Edited by: N V Seshagiri on May 6, 2008 10:57 AM

former_member194786
Active Contributor
0 Kudos

Hi Seshagiri,

I want that my files with an extension, lets say .xml, are picked up before another set of files, lets say *.txt. I hope its clearer now.

Thanks and Regards,

Sanjeev.

Former Member
0 Kudos

Hi,

Yes, it will be possible,

Check as io said and use the doc which i sent

Regards

Seshagiri

Former Member
0 Kudos

Hi Sanjeev,

As far as I understand your query you need to pick the files from both the extensions, say .xml as well .txt

but the condition is, .xml files should get picked up early.

I suggest:

1) You create two communication channels for it.

2) Try to get and estimated time, i.e. till what time in a day, all the .xml files would get picked up, then

3) Time your communication channel accordingly.

Another approach:

If you wish to accomplish this functionality through a single communication channel, then you can also go ahead and develop a module for it.

Thanks,

Varun

former_member194786
Active Contributor
0 Kudos

Thanks Varoon,

I just wanted to know if this can be achieved without using BPM or adapter modules. And also the files will be coming simultaneously. So can not define the time interval. And also wanted to do it using a single adapter.

Is it possible?

Regards,

Sanjeev.

former_member194786
Active Contributor
0 Kudos

Hi Experts,

Anybody having idea about this requirement?

Thanks and Regards,

Sanjeev.