cancel
Showing results for 
Search instead for 
Did you mean: 

Writing a file to a remote location (not KM) using WD

Former Member
0 Kudos

Hello everyone.

I've encountred a scenario in which I need to upload an excel file to a km file and also load it into the sap system.

I've managed to upload the file to the KM Server, but not I have a new problem:

The abap function that loads the excel file into an Internal table (ASLM_EXCEL_TO_INTERNAL_TABLE), works on a local location.

I cant supply the the function with the KM address, since the KM Server is firewalled and not every user which will work with my application will have access to it.

However, I have another server - the SAP server which has an interface which every user can access, so I've come up with an idea - I still have the inputstream of the file which I wrote to the km server, and I will write it to another server, for example - 212.101.42.21\interface\my_folder and then I will supply the abap function with this location.

Is this possible? if so, how can I use web dynpro to write to this server?

thanks for any help,

Eli Erenburg.

Accepted Solutions (1)

Accepted Solutions (1)

p_2_5_6_9_6_0
Active Participant
0 Kudos

Hi,

Yes it will be possible.

Java Classes help you write files to servers. Have a look at:

http://www.java2s.com/Code/Java/File-Input-Output/UseNewJavaIOtowritestringintoafile.htm

You can reuse the solution inside a bean and then expose that as a web service - finally consuming it in Web Dynpro Java. It may directly be reused in WDJ as well (as part of a method) - but then again that would be a design call.

Hope that the link helps. I have used it to write local files to server.

Thanks.

p256960.

Answers (0)