cancel
Showing results for 
Search instead for 
Did you mean: 

Copying file in fileadapter with os command line

Former Member
0 Kudos

Hi XI - Species

I examined the following blogs:

/people/sameer.shadab/blog/2005/09/21/executing-unix-shell-script-using-operating-system-command-in-xi

/people/michal.krawczyk2/blog/2005/08/17/xi-operation-system-command--error-catching

We are on XI 7.0 SP 12 under AIX. Meanwhile there is a parameter for os command before message processing and after message processing.

We want to copy a file for separate processing by an other fileadapter, with the following command /usr/bin/cp %F /tmp/XI/ECHtoSAP/ELEC/MECOM/testcpbefor_mec

My experience is, that this command only works in the parameter before message processing in combination with the message protocol nfs.

Is there anybody who can answer the following questions:

1. Why does'nt the command work in after message processing with nfs? The monitor says command execution successfully, but the file is not copied.

2. Which file is expected to be copied after message processing? The original file (flat file) or the xml produced by the fileadapter?

3. What is meant by after message processing? After completion of the whole scenario or after the processing of the fileadapter?

4. Do these commands work with Ftp?

Thanks for a soon answer?

Regards Marlies

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

> Hi XI - Species

>

> I examined the following blogs:

>

> https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/

> 2411

> https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/

> 2184

>

> We are on XI 7.0 SP 12 under AIX. Meanwhile there is

> a parameter for os command before message processing

> and after message processing.

>

> We want to copy a file for separate processing by an

> other fileadapter, with the following command

> /usr/bin/cp %F

> /tmp/XI/ECHtoSAP/ELEC/MECOM/testcpbefor_mec

>

> My experience is, that this command only works in the

> parameter before message processing in combination

> with the message protocol nfs.

>

>

> Is there anybody who can answer the following

> questions:

>

> 1. Why does'nt the command work in after message

> processing with nfs? The monitor says command

> execution successfully, but the file is not copied.

Check if the user who is executing the command has the requried permission to cpoy the file and the user who will be executing this command is be "<SID>adm"

> 2. Which file is expected to be copied after message

> processing? The original file (flat file) or the xml

> produced by the fileadapter?

The Original input file

> 3. What is meant by after message processing? After

> completion of the whole scenario or after the

> processing of the fileadapter?

I think this means after processing of the scenario to my best knowledge

> 4. Do these commands work with Ftp?

not sure

> Thanks for a soon answer?

> Regards Marlies

Former Member
0 Kudos

Hi,

Please Refer SAP Note: 841704

4. Do these commands work with Ftp?

<i>For the File Adapter transport protocol "FTP", the operating system command is NOT executed on the FTP server, but on the server hosting the Adapter Engine.</i>

3. What is meant by after message processing? After

> completion of the whole scenario or after the

> processing of the fileadapter?

<i>An operating system command specified here is executed before or after message processing that was found in a run</i>

Thanks,

Beena

Former Member
0 Kudos

1. Why does'nt the command work in after message

> processing with nfs? The monitor says command

> execution successfully, but the file is not copied.

Check if the user who is executing the command has the requried permission to cpoy the file and the user who will be executing this command is be "<SID>adm"

<i>The permission should not be a problem. I have put the same cp command under before and after messageprocessing (same targetdirectory) only with different target namefiles. The file specified in after message processing is not produced </i>

> 2. Which file is expected to be copied after message

> processing? The original file (flat file) or the xml

> produced by the fileadapter?

The Original input file

<i>Are you sure?</i>

> 3. What is meant by after message processing? After

> completion of the whole scenario or after the

> processing of the fileadapter?

I think this means after processing of the scenario to my best knowledge

<i>Is there anybody who is sure?</i>

> 4. Do these commands work with Ftp?

<i>Is there anybody who is sure?</i>

Former Member
0 Kudos

1 . Are you deleting or archiving your file by any chance in the sender communication channel.

2. yes, i am sure about this.