cancel
Showing results for 
Search instead for 
Did you mean: 

Run Operating System Command After Message Processing!

Former Member
0 Kudos

Hi Experts,

I am working on a file to file scenario where PI picks a file from SFTP server and send it to ECC system( PI place the file in FTP server). Searched some blogs but couldn't get a correct steps in giving command in "Run Operating system command after message processing". Can any one tell the steps need to do in the receiver file channel. NOTE: PI successfully places the file in the target directory but the file not able to process since its coming as "rw---r--".

The requirement is to "rw----rw---"  to read and write option in UNIX server.

Accepted Solutions (1)

Accepted Solutions (1)

Harish
Active Contributor
0 Kudos

Hi Vijay,

The below wiki explain the operating system command

SAP XI File Adapter OS Command Line Feature - Process Integration - SCN Wiki

check the SAP help page for operating system command - Defining Operating System Commands Before/After Processing - Advanced Adapter Engine - SAP Library

regards,

Harish

Former Member
0 Kudos

Hi Harish,

Thanks for the information it is really helpful. I have a question when we create a shell script do we have place it in UNIX or how the process in PI we need to do.

Harish
Active Contributor
0 Kudos

Hi Vijay,

you need to place the script (.bat) in OS level and in communication channel you need to provide the path and name of the script. Check the wiki link, it has lot of detail.

regards,

Harish

former_member184720
Active Contributor
0 Kudos

If it is just changing the file permissions, i dont think you need a bacth file.

Just execute the chmod xxx %f  and it should change the permission. i think xxx should be 660 in your case

Former Member
0 Kudos

Hi,

I tried to give the command as below. But getting an error as "Error_OSCMD_NOT_ALLOWED"

chmod 660 %F/norsap/iface/in/com/pod/ %F %fLI_POD_.txt%f

former_member184720
Active Contributor
0 Kudos

Please check the SAP note 1717530 - PI File Adapter OS Command error - ERROR_OSCMD_NOT_ALLOWED


solution : Assign the role SAP_XI_CONFIG_FILE_OS_CMD_J2EE to users' who define Operating System commands in File/FTP Adapter channels.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

PI successfully places a file in the ftp directory but when the user tried to login to UNIX and process the file it's showing as -rw---r---.  The user needs it to be rw--rw since the user cannot open the file.

I  am using FTP channel. I have already discussed with basis regarding the username assign to the folder and the permission has been given.

Should I change anything on PI side or where the necessary changes has to be made?