cancel
Showing results for 
Search instead for 
Did you mean: 

SAP PI - File To Proxy - Sender Channel Start And Stop

vishnu_pallamreddy
Contributor
0 Kudos

Hi All,

I have a requirement where I have to start and stop the channel by processing button/event in ECC.

My scenario is File to Proxy.

If an event or Button processed in ECC then Sender SFTP channel has to start and after processing all files to Proxy from SFTP the should stop.

Any one please suggest me the procedure.

Any abap code for Start and Stop the channel.?

Thanks In Advance,

Vishnu.

Accepted Solutions (1)

Accepted Solutions (1)

former_member186851
Active Contributor
0 Kudos

Hello Vishnu,

See if the below link helps

vishnu_pallamreddy
Contributor
0 Kudos

Hi Raghu,

Thank You.

I have one doubt here.

if in SFTP folder we have 10 files .

After 10 th file processing the channel will stop right?

vishnu_pallamreddy
Contributor
0 Kudos

Hi Raghu,

I will try and let you know.

former_member186851
Active Contributor
0 Kudos

Hello Vishnu,

It wont stop processing,It will keep on polling until you stop it.

former_member182412
Active Contributor
0 Kudos

Hi Vishnu,

  • First write the files from ABAP program
  • After finish writing the files in application server then start the SFTP channel from ABAP program.
  • After 30 minutes you stop the channel from ABAP program.
  • You create a background job with two steps, first step is to write the files in application server, the second step put the program which start the channel.
  • After 30 minutes you can schedule the program to stop the channel.

Regards,

Praveen.

vishnu_pallamreddy
Contributor
0 Kudos

Ok Raghu.

But I need to stop after processing of all files automatically.

we don't know the number of files generated every day.

after processing of last file it automatically stop the sender channel.

vishnu_pallamreddy
Contributor
0 Kudos

Thank You Praveen.

I will check.

former_member186851
Active Contributor
0 Kudos

Hello Vishnu,

If the number of files are not fixed,how you decide the last file?.

It should be based on either time or count or any content.

You need to re-write the code accordingly.

vishnu_pallamreddy
Contributor
0 Kudos

Hi Raghu,

I have the same question.
I am checking with Client.

Thank You.

former_member182412
Active Contributor
0 Kudos

Hi Raghu,

  • No need to know the number of files up front.
  • We are going to create the background job with two steps.
  • First step is the program which create the files in the application server, so the program will create n number of files not need to be fixed.
  • After the first program finished successfully then second step will be executed which is the program to start the channel, so when second program runs at that time all the files will be there in the directory.
  • After 30 minutes we can schedule other program to stop the channel.

Regards,

Praveen.

former_member186851
Active Contributor
0 Kudos

Hello Praveen,

Seems to be a nice idea.

But if more files are created and if the SAP SFTP is not able to process that in the stipulated 30 mins will it not be a problem?

Guess polling interval also should be kept low.

former_member182412
Active Contributor
0 Kudos

Hi Raghu,

We can adjust the second background job based on the requirement, they can change from 30 minutes to one hour or two hours, i just gave the example.

Regards,

Praveen.

former_member197830
Participant
0 Kudos

Hi Praveen/Raghu,

Is there any way to STOP file communication channel automatically if file sever contains no files(means  is there any module configuration parameters available in PI to stop communication channel automatically if server doesn't contain any file ).

Thank you,

Narasaiah T

manoj_khavatkopp
Active Contributor
0 Kudos

Narsaiah,

Existence of the file can be checked when the channel is active only , so there is no standard way to do this , however channels can be controlled externally .

Like the Sender application can call the http url whenever it places a file in the folder so that PI channel gets started and the file is picked .

https://wiki.scn.sap.com/wiki/display/XI/Externally+Controlling+the+Communication+Channel

Br,

Manoj

Answers (0)