cancel
Showing results for 
Search instead for 
Did you mean: 

adding custom code in the intregration builder to send files

Former Member
0 Kudos

Hello,

we are using PI 7.1 and I am new to this. What I would like to do is use PI to send a series of files for the delivery notes process from a directory in SAP to a server. the files are labelled A,B,C,D,E,F, and G. The prerequisites for sending the files are

1) the oldest file in the directory has to be the A file.

2) the E file has to be present before sending the files.

3) sometimes the F file and the G file are created and sometimes they are not. if the F and the G file are present, send them.

I am not sure if there is a place is PI to put this type of logic. I have checked the intregration builder and I do not see any place where you could add code or call a custom function.

does anyone know if this functionality is possible and if so, could you let me know what steps I would need to do to get this to work.

thank you in advance for the help

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Timoty,

One thing you can do is write a script for checking all the files which are in (ABC directory) and mention your conditions. If your conditions satisfies then move all the files to a different folder(XYZ).

Call the script in the sender communication chanel before message processing and give the directory in sender communication cahnnel as xyz. So initially you dont have any files in xyz since all are in abc. Now next time your channel runs it runs the script and if satisfies then it moves to xyz and then next time it will process these files.

But you need to write the script on the PI system only. I am not sure whether it is feasible for you or not.

Regards,

---Satish

Former Member
0 Kudos

Satish

thanks for the quick reply.

when you mention "script", is this a UNIX shell script? we do not have access to the UNIX layer to write scripts.

but what I could do is write a ABAP process that would check the files in the ABC directory and moved them to XYZ directory and I could start the PI process to send the files from the XYZ directory

does this sound ike it would work

Former Member
0 Kudos

Timothy,

Ok, in this process then you dont need OS script in sender communication channel. Point the sender channel to XYZ itself and let it keep looking for files.

Let you abap process move the files to xyz once the conditions satisfies. But you need to take care of error handling in ABAP only for your conditions, because in production if your conditions is not satisfied then there should be something happened to these files.

Regards,

---Satish

Former Member
0 Kudos

Satish

sorry for the delay. I was on vacation and am back in the office today.

thanks for the help on this. points will be awarded

Answers (0)