cancel
Showing results for 
Search instead for 
Did you mean: 

SAP PI 7.31 single stack: Writing to multiple files

Former Member
0 Kudos

Hi All,

I have a fairly basic requirement from our client.  I have to pick up a file from a network folder convert it into a csv file and write it to a new shared folder.  This is all very easy.

The little bit of complexity comes in with the file name.  The file should either be X1 or Y1 depending on the contents of the file.  Adding the counter works but how can I do the X or Y?  I considered using variable substitution but then the counters will not work properly.  I might get files X1 X2 Y3 X4.

I also tried creating multiple business components, one for writing each file.  I tried using the conditions in the receiver tab in my integrated configuration file, but it always chose the one with the unequals sign.  (See screenshot for a quick example of what I tried)

Why would it always choose the first one communication component?

Any other ideas how I can approach this?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Well, you have to verify your conditions. There is something wrong with them.

Alternatively, to work with one single communication component, you can create 2 service interfaces, one for X and one for Y, and then you need to choose the appropriate interface in the interface determination, again by using conditions.

Former Member
0 Kudos

Thank you I will try this and get back to you.  Any general ideas about what can go wrong with the conditions?

Former Member
0 Kudos

I have managed to solve the issue issue with my condition.

I am not using the absolute path anymore.  Found the solution here: http://scn.sap.com/message/1152250

So in summery I am using the two business components with a condition in the receiver tab of the integrated configuration.

Thanks for all the help!

Answers (1)

Answers (1)

allamudi_loordh
Active Participant
0 Kudos

Hi ,,

can you please explain  bit clearly what you need at output side by just giving the i/p & o/p files..

it is possible if you use time stamp.. u can send same message to different places at a time..

Regards,

Loordh.

Former Member
0 Kudos

Input file: .xml file containing purchase orders.

outputfiles: X00001.csv or Y00001.csv depending on the contents of the input file (looking at the area code in the xml file). 

Both output csv files have the same contents, layout etc.