Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

F4_DXFILENAME_TOPRECURSION

Former Member
0 Kudos
1,406

Hello, does anybody a FM similar to WS_FILENAME_GET but for UNIX?? I am using F4_DXFILENAME_TOPRECURSION but in that one I can't create a file, it is only to read or to write in it. What I need is to create a new file in the AL11 because after I will fill with information. Thanks in advance

4 REPLIES 4

former_member194669
Active Contributor
0 Kudos
190

Hi,

I have gone thru the documentation of this function module , Its for selection of files from application server and not to create a new one.

Here is the documentation of function module F4_DXFILENAME_TOPRECURSION

The component places an assistance to the selection of the file to order for this can be indicated whether the file lies on the presentation or application servers; which application server is to be used (if application server was selected) and which path will be used these data (in these Hierachie) only partly hands over, then the remaining data become abgefragt.Desweiteren can still another file mask with Wildcards and the forthcoming file operation will as expenditure one keeps the selected kind of server, server and path/file name handed over. If the selection broken off without the user a file selected, then this is returned (as well as the input values pushed into the expenditure)

aRs

alejandro_bindi
Active Contributor
0 Kudos
190

That function module only returns a path to a file (including filename itself), either in application (UNIX in your case) server, or in presentation server (Local PC).

Depending on location, you then need to create code to handle the file (you can use OPEN DATASET FOR INPUT/OUTPUT in application server, function modules WS_UPLOAD / WS_DOWNLOAD in presentation server).

To get a path you intend to write a file to, you must set the function parameter FILEOPERATION = 'W'.

Regards.

Former Member
0 Kudos
190

I have used as you said, but I wanted to know if there were one FM that could allow you to write the name of the new file, as in the window of the presentation server. Thank you very much

0 Kudos
190

Now I get what you want. I don't know if that's actually posible. I thought the FM in question behaved like you want for the appl server too, but now i see it doesn't.

I guess a workaround could be to take the file name and the path (directory) on separate parameters (you could allow to choose an existing path with some FM), then check that the filename to create doesn't exist on the chosen dir.

Not sure if there's not a better solution though.

Regards