Application Development and Automation 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: 
Read only

Upload in application server

Former Member
0 Likes
609

Moved to correct forum by moderator. Why did you post this in performance? Please take care in future to post in the correct forum.

Hi All,

I am uploading data into application server but i am not getting how to get file path.

Is there any FM for that?

Edited by: Matt on Nov 25, 2008 10:04 AM

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
588

hi,

to get the actual path from the logical path the function module is :

call function 'FILE_GET_NAME'

exporting

logical_filename = c_log_file

eleminate_blanks = 'X'

importing

file_name = h_f_dir

exceptions

file_not_found = 1

others = 2.

with this u can get the physical path in h_f_dir. concatenate the filename to this path.

then use the open dataset to open the file

5 REPLIES 5
Read only

Former Member
0 Likes
588

If you are already uploading data, you should already be knowing the file path!!

Open dataset <filepath>....

Regards,

Mohaiyuddin

Read only

0 Likes
588

I have to upload it.

i know open datset...........(AL11 for getting application server path)

i want the function module name.

Read only

matt
Active Contributor
0 Likes
588

Why did you post this in performance? Please take care in future to post in the correct forum.

Read only

Former Member
0 Likes
589

hi,

to get the actual path from the logical path the function module is :

call function 'FILE_GET_NAME'

exporting

logical_filename = c_log_file

eleminate_blanks = 'X'

importing

file_name = h_f_dir

exceptions

file_not_found = 1

others = 2.

with this u can get the physical path in h_f_dir. concatenate the filename to this path.

then use the open dataset to open the file

Read only

Former Member
0 Likes
588

You can use the following code.

CALL FUNCTION 'F4_DXFILENAME_TOPRECURSION'

EXPORTING

i_location_flag = 'A'

i_server = msxxlist-name

IMPORTING

o_path = v_filepath

EXCEPTIONS

rfc_error = 1

error_with_gui = 2

OTHERS = 3.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ELSE.

p_path = v_filepath "p_path is selection scr parameter.

CLEAR v_filepath.

ENDIF.