cancel
Showing results for 
Search instead for 
Did you mean: 

Count the files and send it to PI

Former Member
0 Kudos

Hi,

A job runs weekly and creates 6 files on one of the prod folders in a windows system. The files are FTP to PI. Before picking the files we need to ensure that the count for the files on that folder is 6. If it is 6 or greater then we can pick all those 6 files and send it across to PI (also with archiving it on another folder structure in the legacy system) where PI will send it to another system. If the count is less than 6, then we do not need to do any thing. If count 6 is reached and the files are picked, reset the counter to 0.

The source system is Windows. On a Saturday, if we run a job at say 1:00 pm then within an hour or two, if 6 files are not present then an alert/mail should be sent to the Business informing that 6 files are not present in the folder.

Please suggest how to approach on this.

Advance Thanks,

Nageswari.P

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Experts,

How can I map these lines into my target using java mapping uml??

can you guys provide some code using java? coz I have no idea using java code.

<A_06>0</A_06>

<AB_07>256</AB_07>

<A_08>0</A_08>

<AB_09>257</AB_09>

<A_10>0</A_10>

<AB_11>259</AB_11>

<A_12>0</A_12>

<AB_13>260</AB_13>

<A_14>0</A_14>

<AB_15>262</AB_15>

<A_16>-1</A_16>

Thanks.

kkram
Contributor
0 Kudos

SAP has provided a servlet for starting and stopping a communication channel externally. This is well documented in SAP help for PI. Now, you can write an ABAP program to read your file directory and if there are 6 files or more, start the communication channel automatically by calling the servlet. Then after few more minutes, you can check if all the files have been processed and if yes, stop the channel.

KK

Former Member
0 Kudos

Hi,

Could you please suggest on this.

Advance Thanks & Regards,

Nageswari.P

Former Member
0 Kudos

Try through BPM with counter 6 and use exception handeller as exit if at particular point of time count is less then.

If file is more then 6 in a folder the counter will take only first 6 files there and process.

regards

ram

Former Member
0 Kudos

Hi Ram,

If count is less than 6, we need to send an E-mai*l instead of raising exception. And please provide the steps for the same.

Reward point*s would be available.

Advance Thanks & Regards,

Nageswari.P

Former Member
0 Kudos

Are you still looking for the solution ?

-Sid