cancel
Showing results for 
Search instead for 
Did you mean: 

File I/O Operations

shaji_chandran
Participant
0 Kudos

Hi Friends,

Can we use the following action blocks under File I/O to manipulate a file which is stored other than web folder of MII server.  I would like to manipulate some files which are stored on a specific folder on the server . For Example C:\MyFiles  If it is possible how can I provide path of the local file on server?

Write File

Get File List

Delete File

Create Directory

Thanks

Shaji

Accepted Solutions (0)

Answers (1)

Answers (1)

swaroop_anasane
Active Contributor
0 Kudos

Hi Shaji,

If your user have access to the location, you can provide the path as:

file://<IP address>/<FilePath>/<Filename.ext>

Hope this helps.

Warm Regards,

Swaroop

swaroop_anasane
Active Contributor
0 Kudos

Check the below link as well, under path:

Write File - Content Development - SAP Library

Thanks,

Swaroop

shaji_chandran
Participant
0 Kudos

Hi Swaroop,

Thanks for your response.

how can I provide privilege to MII user for accessing a folder on server?

Thanks

Shaji

swaroop_anasane
Active Contributor
0 Kudos

Hi Shaji,

You can add IUser to security of the folder where you want to save the file. PFB the link that will guide you on this:

https://www.banmanpro.com/support2/permissions.asp

Thanks,

Swaroop

shaji_chandran
Participant
0 Kudos

Hi Swaroop,

Thanks again for your quick response.

BTW the process you mentioned above is for providing privilege to windows users. I think we need to provide the privilege  to MII user. I couldn't find MII User in the list of windows users.

Also could you please let me now how can I provide the path of below server folder to these file operations action blocks

D:\MyFiles

When I give above path I am getting error as

  • [ERROR] [Get_File_List_0]GetFileList: Access to the file path /D:/MyFiles is not allowed

So I would like to know the issue is with folder path or folder privilege

Thanks

Shaji

swaroop_anasane
Active Contributor
0 Kudos

Hi Shaji,

As I mentioned earlier, you can provide path as:

file://<IP address>/<FilePath>/<Filename.ext>


for your case it would be:

file://<IP address>/D$/MyFiles/test.txt


I would recommend using IP address in the path.


If you have gone through the thread on sap help, it clearly says:

Property

Data Type

Access

Description

Path

String

In and out

Identifies the fully qualified path of the file you want to create or modify. For the action to be successful, theInternet Guest Account user for the machine must have write access to the directory.

For example, if you want to create or modify the file index.htm, the file path isc:\Inetpub\wwwroot\index.htm.

Property

Data Type

Access

Description

Path

String

In and out

Identifies the fully qualified path of the file you want to create or modify. For the action to be successful, the Internet Guest Account user for the machine must have write access to the directory.

For example, if you want to create or modify the file index.htm, the file path is c:\Inetpub\wwwroot\index.htm.

If the file exists in the SAP MII Web content, you can define the path as follows:

WEB://<ProjectName>/<FolderPath>/index.htm

db://<ProjectName>/WEB/<FolderPath>/index.htm

If the file exists in the SAP MII Web content, you can define the path as follows:

WEB://<ProjectName>/<FolderPath>/index.htm

db://<ProjectName>/WEB/<FolderPath>/index.htm

Please check underlined text.

Hope this helps.

Thanks and Regards,
Swaroop

swaroop_anasane
Active Contributor
0 Kudos

Also, there a work around. Please check the thread below:

Check last comment by Salvatore Castro

Also, a note by Arnaud LIOTTA

make sure that the Service user of Netweaver has access to the folder


Hope it works out for you. It's been a long, once i get a chance will work this out for 14.0 and let you know, meanwhile please use above options.


Thanks,

Swaroop

shaji_chandran
Participant
0 Kudos

Hi Swaroop,

System property Default File Path is having value as MII only. So what could be the absolute path of this folder at server?

Thanks

Shaji

swaroop_anasane
Active Contributor
0 Kudos

Hi SHaji,

You will have to update it as C:/SomeFolder/ or D:/SomeFolder/.

Thanks,

Swsaroop

shaji_chandran
Participant
0 Kudos

Hi Swaroop,

I have given the rights (Full Control) to the SID user for respective folder. But still I am getting the same error. Do we need to restart the server after giving the rights?

BTW I tried to load the file using TextLoader action block and it is working for the files under default folder using below path

http://localhost:50000/XMII/CM/Default/MyFiles/

But TextLoader also giving error (Access to folder not allowed) when I provide Absolute path (file://<IP address>/D$/MyFiles/test.txt)

Is it safe to store files under Default folder?

My client is using MII 12.2 version so I can't use System property

Any help on this very much appreciated

Thanks

Shaji

shaji_chandran
Participant
0 Kudos

Swaroop,

I think it is an issue related to server folder privilege. I tried the same transaction with another MII server where it works fine.

This ensures that the issue is with server folder access privilege.

Thanks

Shaji

swaroop_anasane
Active Contributor
0 Kudos

Hi Shaji,

This reminds me of an issue when i was trying to access an excel sheet from a .net framework. I had to update DCOM settings for my inet user.

What I did was< Administrative Services--> Component services-->My Comp-->DCOM-->Desired Application type(MS Excel app for my case)--> Properties-->Security-->Activation and Launch Permissions--> Customize --> Edit --> Add User

Try to look into this dimension as well, not sure but I hope it helps.

Thanks,
Swaroop