cancel
Showing results for 
Search instead for 
Did you mean: 

Find the Location of a file in the local system

Former Member
0 Kudos

Hi,

How can we browse the local system and find the whole path of the selected file in WebDynpro Java.

Any help will be appreciated.

Thanks and Regards,

Vivek.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Find the whole path of the selected file in WebDynpro Java

If in your landscape NWDI is present then Drive(C or D):\Documents and Settings\user id\.dtc\0\DCs\namespace .....

Please let us know what kind of file you are looking for

regards,

ganga

Former Member
0 Kudos

Hi,

Thanks for you immediate reply. I think my requirement is not clear to you. We have an application in which they need to upload some file or attach some file from their local system. When the user trying to upload the file from his local system, I need to pass the full path of the file in the local system from where he is uploading to a function module. All I need is the absolute of the path of local file which the user is selecting and nothing more. Even I dont want to upload this file anywhere except I am trying to use the File Upload UI element. Hope this is clear and you can help me out.

Thanks in advance,

Regards,

Vivek.

Former Member
0 Kudos

Hi Vivek,

You can make use of the IWDResource Type in order to upload function. This interface let you to get files from client machine into wd context with the help of File upload UI element.

For more details

http://help.sap.com/javadocs/NW04S/SPS09/wd/com/sap/tc/webdynpro/services/sal/datatransport/api/IWDR...

Note: Client side scripting is not allowed in WD.

vin.

Former Member
0 Kudos

Dear Vinod,

Thanks a lot for your response. I did the same thing with the IWDResource using the File Upload UI element. But the problem is we cannot get the source path(e.g C:\Documents and Settings\Administrator\Desktop\<file name>.ext) of the file from where it is chosen to upload, I mean path of the file in the local system. Is there any possibility to do so. I need this source path of the file.

Thanks and Regards,

Vivek

Former Member
0 Kudos

Vivek,

I don't think we can get the file path from client machine.

But if the file are from server side, you can make use the File class to retrieve the details.

vin.

Former Member
0 Kudos

Hi Vinod,

I support your conclusion, but there should be a work around or some other way to do the same. If you found anything please let me know.

Thanks for your support and time.

Regards,

Vivek.

Former Member
0 Kudos

Yes, some what discussion is concluded,