cancel
Showing results for 
Search instead for 
Did you mean: 

receiver channel not invoking the .bat file

dichaudhuri
Explorer
0 Kudos

Hi ,

     I am facing difficulty in invoking a batch file from the receiver communication channel. I am using a very simple command :-

     move /-y D:\usr\sap\STP\SYS\src\PI\IN\".*"  D:\usr\sap\STP\SYS\src\PI\IN\Encrypt\*.* - the file channel is just unable to invoke this bat file placed on the server. I have asked the SAP Security people to add SAP_XI_CONFIG_FILE_OS_CMD_J2EE role on my user id.

But it still fails to invoke the batch file placed on the application layer. I am pretty much sure it is a system glitch as a command as simple as the above one is not getting invoked.

Are there any other roles which needs to be added to my id - or any specific configuration required from BASIS? I checked the PI ABAP stack in the status information and found the PI is running in Windows NT. So, the .bat file will work.

Can there be anything like - PI is on Windows NT and AL11 folders or any such application run on UNIX? - i know this is not possible but i am just thinking aloud from the configuration standpoint.

Accepted Solutions (1)

Accepted Solutions (1)

dichaudhuri
Explorer
0 Kudos

this is resolved now! - had put echo in every line and traced out the error!

used cmd.exe /C < command > - created log file to trace the error. was a good analysis - ask BASIS to give access to OS or work with BASIS to resolve any such command prompt related issues. Most of the time an experienced PI developer will do it correctly,

%F% etc was not required. Refer Michael's blog to trace out the error.!

Answers (2)

Answers (2)

former_member202642
Participant
0 Kudos

Hi,

If u want to execute the .bat file after message processing then put "%F" in OS command line after message processing.

Regards,

Aamir

Former Member
0 Kudos

Hello Diptendu,

Please try putting only the .bat file path in the Command Line parameter, as given in the wiki SAP XI File Adapter OS Command Line Feature - Process Integration - SCN Wiki.

BR,

Diptee

dichaudhuri
Explorer
0 Kudos

hey diptee - how r u ? - did u see the screen shots i attached?

i am only calling the batch file in the file channel. I have tested with and without using "cmd.exe" - have checked all of these but nothing worked. I am pretty much sure it is not a batch file issue because same thing when i am writing on my local machine it is working just fine!

Former Member
0 Kudos

Hello Diptendu,

I am doing good , hope you are doing good too!

I did see the screenshots attached and it had the cmd.exe before the bat file path in the command line parameter and even the message log had it .

Would you post the screenshots of the channel config and message log you get after you keep only the bat file in the command line? Also please restart the adapter after the change.

BR,

Diptee

dichaudhuri
Explorer
0 Kudos

yo all good here! thanks!

screenshots are already there right? - hv restarted many times.

Former Member
0 Kudos

Hey Diptendu,

The screenshot here is this

I want you to send me the one without cmd.exe and the message log for this.

regards,

Diptee