cancel
Showing results for 
Search instead for 
Did you mean: 

File Copy Action Block in SAP MII 12.1

Former Member
0 Kudos

Hi Folks,

I have a requirement like "Need to Copy the file which will be read from the source path SAP ME to the destination path directory present in the CNC Machine Controller via SAP PCo 2.2 using SAP MII 12.1. But I face few challenges where there are no such action blocks which could take the file from the source server(SAP ME) and copy it to another server (CNC Server). Both are hosted in different servers. Can anyone suggest me with the options for File Copying. As per my analysis, I think I will have to create a new custom action block for File Copy in SAP MII 12.1. If Yes, Can anyone send me the documentation for creating the "Custom action block for File Copy in SAP MII 12.1" and the jars which needs to be deployed for the same.

Please reply asap. would appreciate all your efforts in advance.

-Praveen

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi Steve,

I am sorry for the delay. I was on leave for the past 2 days. There are few errors detected in    the transaction but that is the one which i had sent you in my earlier postings. you can refer to  that as i was only getting the Access Denied issue. And also the below information is the  contents of the source path which i am trying to move it to the destination path. i have just taken that in separate notepad to make you clear as the text is not clear.

-Praveen

former_member196557
Active Contributor
0 Kudos

Hi Praveen,

I think you are still seeing a share permissions issue. I would recommend that you open a support ticket on this to get more focus from the MII support team than I can provide. I do not have access to an MII12.1 system to do any testing.

There are other solutions available using MII14 and PCo 2.3.  Is an update possible?

Regards, Steve

Former Member
0 Kudos

Hi Steve,

I am sorry for the delay. Now i have upgraded my SAP PCo from 2.2 to 15.0 and so i can copy the files from Server to server. Thanks for your efforts.

Now i have another requirement like

1. Need to do data collection in SAP ME by sending a shop floor xml which will track the      operation for that Particular SFC which is in queue.

2. So I use the HTTP Post action block in SAP MII 12.1 where i gave the url as "one server connected to my lan where SAP ME is hosted.

3. To do the update in SAP ME I am sending one input XML which can be accepted by SAP ME and so when i run it in my browser it works perfectly and get committed.

4. But when i run the transaction to do the same with all the required parameters, It throws an error like

"[ERROR] Post Action: error occured while trying to connect to the server Exception: [Items cannot be null]"

5. But i pass the proper xml to start the SFC to move this In Work status which is in queue but i get the above error.

6. Can you guide me why this error pops up in http post action block. i am not passing any null values and the required parameters are provided.

-Praveen

former_member196557
Active Contributor
0 Kudos

Hi Praveen,

Please provide some additional details:

Version/patch of SAP ME

copy of the XML that you are sending to ME

url provided to http POST: (you can replace any specific ip address with <server>)

Regards, Steve

Former Member
0 Kudos

Hi Steve,

Have done all setups and configurations to make sure that the Folder can be accessed remotely or not. And also, have given special permissions to the particular share folder where i need to drop my file in. But still the text saver doesn't return anything. And also can you give the path how it can be mentioned in configuration editor..... \\servername\drive\foldername....If this is wrong mention the correct way of proceeding the path to connect to share folder.

-Praveen

former_member196557
Active Contributor
0 Kudos

Hi Praveen,

1. Confirm that the TextSaver does NOT create a file or a file with content

2. Are there any errors detected in the transaction?

3. Can you add some Tracer or EventLogger actions to your transaction to trace the actual values of the file read from the source and what is assigned to the TextSaver action?

The path for a network share for Windows OS is

\\server\share\filename.ext

You need to create a share that can be access by the user account that launches the Netweaver java MII application.  If this is a local username, you will need to create the exact same user name and password on the target server and provide that user with folder permissions to write the file.

Regards, Steve

Former Member
0 Kudos

Hi Steve,


I have attached the sample transaction in a word document. Can you please look into it. I have loaded the text and written it to a file where finally i will fetch that local file from that Write File Action block folder and will have to save it in the destination path which is in another server.


IP (where File needs to be saved in below Server)

\\10.100.133.24\E$\sapnah\Transaction

So, As you suggested i gave the above IP path in the configure editor screen and assigned the Write File's Output Text  -> Text Saver's String Content in the link editor. you will be able to see that in the Attached screenshot but once the transactio is executed, i don't see any file saved in that above IP Path where it needs to be saved. Please look at the below transaction and send me the IP Path how it needs to be given to save the file in shared server.

former_member196557
Active Contributor
0 Kudos

Hi Praveen,

The error you get when trying to execute the transaction from Workbench is that the user executing the transaction does not have access to the share to which you are trying to write to.

I believe the Windows SYSTEM account is used for MII file access, so this means that you will need to set up the remote share to allow Everyone - Full control in order for MII to write to this folder.

For test purposes, I recommend that you set up a folder on the target server that has both File And Share permissions set to Everyone - Full Control.  Once you get the transaction working correctly with this then you can focus on setting up the correct user permissions on the target server.

Also, consider setting up a Mapped drive on the MII server that maps to the remote share on the CNC server. However, this may not work if you have a number of different CNC server shares; or you have to dynamically create the share name in the MII transaction logic.

There are other options if you are using MII14.0 or MII15.0 along with PCo 2.3 or PCo 15.0. Is an upgrade possible?

Regards, Steve

former_member196557
Active Contributor
0 Kudos

Hi Praveen,

IF the CNC files are ASCII text files (most NC files are text), why not use the Text Loader and Text Saver Actions under the Web Actions?

Regards, Steve

Former Member
0 Kudos

Hi Steve,

Thanks for your response.

Okay, If the CNC files are ASCII text files and also if i could use the Text Loader and Text Saver action block, Is it possible to copy the same CNC files to the Destination server that will be in Network Path. For Example, the CNC machine controller is hosted in different server whereas the PCo 2.2 and MII 12.1 is hosted in some other server.

-Praveen

former_member196557
Active Contributor
0 Kudos

Hi Praveen,

As long as the network share for both the CNC machine controller and the CNC file source are accessible by MII, then you should not have any issue reading the file with the Text Loader and writing the file with Text Saver.

Regards, Steve

Former Member
0 Kudos

Hi Praveen,

Please go through the below web resources:

https://websmp205.sap-ag.de/~form/sapnet?_FRAME=CONTAINER&_OBJECT=012002523100009655912009E&

Custom Actions - SAP Manufacturing Integration and Intelligence - SAP Library

Please note that the first link requires login credentials.

Regards,

Anushree

Former Member
0 Kudos

Hi Anushree,

Thanks for your kind response.

I do not have credentials to logon to SAP Market Place. But I tried with my managers credentials unfortunately the download did not happen it threw some exception. It would be very helpful If you could send me some other document. And also I would require the same functionality of File Copy in SAP MII 14.0 and 15.0. If you could explain the same to me I will feel better.

-Praveen