cancel
Showing results for 
Search instead for 
Did you mean: 

OS command after message processing not executed in XIP

Former Member
0 Kudos

Hi experts,

I have a receiver CC with OS command after message processing.

We have tested it in XID and in XIQ and it works perfectly, OS command is executed.

When we release in XIP we noticed that the OS command doesn't work.

Adapter message shows command executed successfully, but in fact it is not executed.

If I try to make a dummy change in the OS command, that must throw an error, no error is showing.

So I think XI find the command but don't execute it.

Any idea?

Thanks

Fabio

Accepted Solutions (0)

Answers (1)

Answers (1)

anupam_ghosh2
Active Contributor
0 Kudos

Hi Fabio,

               Please log in directly to the console. Try to execute the command directly by typing it in terminal. Pls check if the commands are valid for XIP. Secondly check for access/authorization of the script. Ensure your script has read write execute permission for owner, group and other level user.

There is no reason the script will not execute. Ask for remote access to operating system at command line level form the BASIS team or the admin team.



Regards

Anupam

Former Member
0 Kudos

Hi Anupam,

from the console, logged with xipadm, if I run command from cmd or doubleclicking the bat file the command works fine.

User are all authorized, also SapServiceXIP that is the user of XI when creating the file in CChannel.


.

iaki_vila
Active Contributor
0 Kudos

Hi Fabio,

I thought the PI user to execute the OS command was <SID>adm user, why do you think your OS user is SapServiceXIP?

Are you under linux or windows?

Have you tried to execute an easier command as Michal explains in his blog , only to know if there are permissions problems or not.

Regards.

former_member182412
Active Contributor
0 Kudos

Hi Fabio,

Configure 'oscomamnd.trace' = true in advanced mode as per below sap note to get more info about os command error.

1334947 - OS command trace(logs) - File Adapter


And also check below sap note for more about os command.

841704 - XI File & JDBC Adapter: Operating system command


Regards,

Praveen.

former_member182412
Active Contributor
0 Kudos

Hi Inaki,

The user name is dependent on operating system. check below note for reference.

841704 - XI File & JDBC Adapter: Operating system command

Also note that the command is run as user "<sid>adm" (Unix) / "SAPService<SID>" (Windows).


Regards,

Praveen.

Former Member
0 Kudos

Hi Inaki,

I am under Windows.

I think PI user is SapService XIP because the Channel before running the OS command write a file in the same folder, and in properties I can see SapServiceXIP as owner of the file.

I've now tried Michal trick, file is written correctly.

Regards,

Fabio

Former Member
0 Kudos

Hi Praveen,

unfortunately I'm on PI 7.0, cannot use note 1334947.

I've also checked other note, but no luck.

Thanks

Fabio

iaki_vila
Active Contributor
0 Kudos

Hi Fabio,

Youn and Praveen are right, I use to work with linux in PI and i forgot that the user changes in different OS.

If Michal trick works, may be the problem is in any command that you are using, however if it works in QUA system, it is a little weird. What commands are you using?, could you basis team check if the commands are available? have you set a full path to the command?.

Regards.

Former Member
0 Kudos

Hi Inaki, this is my command:

Echo Copy of File Employee.csv Zebra sul disco condiviso A***

net use Y: \\iam.in.a***.vwg\D***** !password /USER:de****\SY***3 >Employee_File_Transfer_log.txt

cd\ >>Employee_File_Transfer_log.txt

d: >>Employee_File_Transfer_log.txt

cd usr\sap\V****** >>Employee_File_Transfer_log.txt

Move /Y SAP-D*****.csv Y:\ >>Employee_File_Transfer_log.txt

Net use /delete Y: >>Employee_File_Transfer_log.txt

Echo Fine Copia

former_member182412
Active Contributor
0 Kudos

Hi Fabio,

According to below sap note copy command does not work.

841704 - XI File & JDBC Adapter: Operating system command

this especially means that you cannot use any shell commands interpreted by teh command processor (such as "copy", "ren" or "del") using the operating system command


Regards,

Praveen.

Former Member
0 Kudos

Hi Praveen,

in XID and XIQ same commands works perfectly, so I don't think this is the problem.

Fabio