cancel
Showing results for 
Search instead for 
Did you mean: 

Execution of remote script in File Adapter OS Command

Former Member
0 Kudos

Hello.

I'm having issues with a remote script placed on a file adapter which fails to execute in a clustered PI (Version 7.1), running on Windows 2008.

Our current setup is as follows.

- Machine A and Machine B make up a SAP PI Cluster node.

- Machine C is our network file share, used as a sandbox for receiving and sending files.

One given scenario would be having the Cluster picking up a file from a FTP folder (Machine D) and copying it over to a given location in Machine C. This is working without problems in the cluster environment.

Now, a very specific scenario requires that after copying the file (to folder INPUT), a given script shall be executed over the received file and decide which folder should that file be archived, TO_PROCESS or NO_PROCESS folders.

So, Outbound Channel is reading from the FTP, Inbound Channel stores in Machine C and has to run a script after message processing.

The problem here is that the script is stored also in Machine C, so placing the OS Command should refer to a shared path:

Example:


sap-machine-c.gca.ad.root\InboundFiles\INPUT


sap-machine-c.gca.ad.root\InboundFiles\TO_PROCESS


sap-machine-c.gca.ad.root\InboundFiles\NO_PROCESS


sap-machine-c.gca.ad.root\Scripts\procFile.bat

If I give the command of "
sap-machine-c.gca.ad.root\Scripts\procFile.bat %F" on the receiver channel, checking RWB, Communication channel says the command was executed with success but the file doesn't leave the INPUT folder.

The script is know to execute with success from both instances, I have logged into each one of them and executed with RFCUSER in SE38 w/transaction RSBDCOS0.

I have tried to replicate this issue, reducing even the procFile.bat script to just do an "echo" command but still doesn't work (RWB PI says it does).

It seems to me that executing scripts from remote shares is a no go? Does anyone have a previous experience dealing with these cases?

Thanks,

Romeu

Accepted Solutions (0)

Answers (1)

Answers (1)

kenny_scott
Contributor
0 Kudos

Hi Romeu,

have you checked that the script (procFile.bat) can be run the the user -

SAPService<SID>

Regards

Kenny

Former Member
0 Kudos

Hi Kenny, thanks for replying.

I believe our "RFCUSER" is a service user. As stated previously, I can simulate the usage of the procFile.bat with this user, through SE38. This is also the user used in our Integration Infrastructure.

Best regards,

Romeu

kenny_scott
Contributor
0 Kudos

Hi Romeu,

the File adapter will use the OS service user. On a Windows system this is SAPService<SID>.

Regards

Kenny

Former Member
0 Kudos

Hi all.

After taking some hints from this thread, we have found out that the problem lied some where in the installation part of PI.

We've set up a basic script, local and not remote, and still the system would not execute that command.

The RWB logs showed successful processing but the Application Server logs were full of errors and stack traces regarding the execution of any command. A support note was raised with SAP support in order to trace these errors.

I'm therefore closing this question as the original question is not related with remote scripting.

Thanks all for your help.

Best regards,

Romeu