cancel
Showing results for 
Search instead for 
Did you mean: 

Standard File adapter Query !!

Former Member
0 Kudos

HI Guys,

Does standard File adapter has got ability to pick a file based on required file name.

Ex: If we have 30 files in one folder, 6 file name are like xml_666778_001.xml, xml_666778_002.xml,xml_666779_001.xml, xml_666778_003.xml, xml_666779_002.xml, xml_666780_001.xml.

First I need to pick xml_666778_001.xml,xml_666778_002.xml,xml_666778_003.xml process it and keep with the same name like xml_666778.xml

Next I need to pick xml_666779_001.xml,xml_666779_002.xml process it and keep with xml_666779.xml etc.,

In this customer landscape, We have got 20 distribution centres. Each Distribution center sends more than 5 files a day. File name comes like xml_divisionnumber_001,xml_divisionnumber_002.xml etc. One division all files comes in one shot like ex:10:30:52. Sometimes we get 2 divisions with only one minute difference, but I need to pick only one division all fiels at a time, first I need to process all that one division files to bundle it(i developed this interface) and keep it on application server folder. I deleloped one more interface to pick this bundle message and split this message into ABAP proxy.

I am expecting your wonderful ideas please about this situation.

Thanks in advance

Kind Regards

San

Edited by: ASandhya on Jul 20, 2010 7:06 AM

Accepted Solutions (0)

Answers (1)

Answers (1)

udo_martens
Active Contributor
0 Kudos

Hi ASandhya,

i think there is a solution: You send the file name inside the header fields and map its value to a certain field of an abstract interface. You need dynamic configuration for that, there are several blog available how to implement that:

[Effective XSL : for Multimapping, getting Source filenames in Legacy-Legacy scenarios|https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/2695] [original link is broken] [original link is broken] [original link is broken];

[ SAP NetWeaver XI: Variable Substitution with Adapter-Specific Message Attributes via DynamicConfigurationBean |https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/6400] [original link is broken] [original link is broken] [original link is broken];

The messages are received by a Business Process instance which is correlating the messages with same (new) field value (SAP help: [Correlating Messages|http://help.sap.com/saphelp_nw2004s/helpdata/en/a5/64373f7853494fe10000000a114084/content.htm]).

Regards,

Udo

Former Member
0 Kudos

Hi Udo,

Many thanks for your quick reply. I do agree, incase if work for one divion we can take dynamic field inside with file name. But in my case 20 divions sends 100 files, need to pick in that 100 files 5 or 6 per division each to merge those. Do you think is it possible?

Kind Regards

San

udo_martens
Active Contributor
0 Kudos

Hi San,

yes, why not? You create just one Business Process and this will create an instance for each division. You merge and process after a time interval. This is pretty easy with BPM, one day for experienced developers, some more for beginners. All required help at help.sap.com, so nothing new or out of standard. 100 message shouldnt be a performance issue, even by use of BPM.

Look forward having a nice challenge

Udo

Former Member
0 Kudos

Hi Udo,

I do agree and I have developed BPM messages merge. But my question is in 100 files I need to pick only 5 or 6 files with the file name like xml_00666787_001.xml like xml_00666787_005.xml and bundle it with as a target file with the name of xml_00666787.xml. In next process again I need to pick only 5 or 6 files with the file name like xml_00876778_001.xml like xml_xml_00876778_002.xml and bundle it with as a target file with the name of xml_00876778.xml etc I need to pick all that 100 files by 20 times like this.

Q. How can we take dynamic file name this in Sender side fileadapter to pick particular files??

Many Thanks

Kind Regards

San

udo_martens
Active Contributor
0 Kudos

Hi San,

as i explained: you map the filename into a new field and extract a substring: From xml_00666787_001.xml your pick now character 5-12 and you get 00666787. For xml_00666787_00e.xml you get the same result. The BP will correlate just by this value. So this both values will get to one process instance and will be merged.

xml_00876778_001.xml will be mapped to 00876778 and this will create a new instance. Clear?

Regards,

Udo