cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to call Shell script in Communication Channel

former_member644654
Participant
0 Kudos

Hi All,

I've a scenario which is File to IDoc, in which the source is placing the file in PI dropzone and if the script is executed successfully then PI processing is started.

When I run the script in UNIX prompt it is executed properly, however when I call the script in the sender communication channel, it is not even being triggered.

I've read the blogs & threads which were posted and I've done the configuration accordingly but couldn't succeed.

To call the script in the communication channel I'm giving the command:

Configuration o Channel:

Transport Protocol: NFS

Message Protocol: FCC

Adapter Engine: Integration Server

sh /home/testscript.sh and also tried giving sh -x /home/testscript.sh but in both cases the script is not getting triggered through the communication channel.

Kindly let me know if we can go with SM69 for triggering the script. If yes please guide me how to proceed with SM69.

Please find the screenshot below.

Regards,

Sreedhar, Av

Accepted Solutions (1)

Accepted Solutions (1)

former_member644654
Participant
0 Kudos

Hi All,

Thank you all for support. The solution which I'm working on for my requirement is through SM69. Once I get the desired output I'll post the detailed description of it.

I've implemented the script and scheduled it based on my interface polling, I've also created 2 extra folders and now I'm able to restrict PI from picking up files with wrong validation.

Answers (2)

Answers (2)

Shabarish_Nair
Active Contributor
0 Kudos

Additionally check that the <SID>adm user has the proper access to the folder where you have placed the script on your PI server and if it has execute permissions.

former_member644654
Participant
0 Kudos

Hi Shabarish,

I've checked the permissions now it is running fine, the problem was with the connectivity.

Now I've a new issue that if the script validation fails PI should stop processing, but as Greg said PI processing can't be stopped. So wanted to know if by any means we can stop PI processing if script validation fails.

former_member184681
Active Contributor
0 Kudos

Dear Sreedhar,

I am afraid the only option is to move or delete the file, or change its contents, before PI processes it.

Regards,

Greg

Shabarish_Nair
Active Contributor
0 Kudos

No. There is no control on the failure of the script to handle any action within SAP PI since it executes independently.

former_member644654
Participant
0 Kudos

Hi Greg,

Before script moves or deletes the file, it is already picked as the script is being called in the Sender Communication Channel.

Is there any option of calling the script before Sender Communication Channel through SM69? If yes could you guide me how to do that.

former_member181962
Active Contributor
0 Kudos

I think you might want to consider a ccBPM for your scenario.

Best Regards,

Ravi

former_member184681
Active Contributor
0 Kudos

Hi,

Did you see 's blog about debugging OS command scenarios? Have a look:

The example command there is windows-specific, but you could use the idea described to catch the error of the script into some log file and check what is your problem related to. Also, did you check the sender CC log in communication channel monitor? Does it show like "os command called successfully" or so?

By the way, "if the script is executed successfully then PI processing is started" -> this isn't really true. According to SAP Help, processing is started no matter if os command execution is successful or not.


Regards,

Greg