on 07-15-2015 12:34 PM
i Have Scenario i want to get the download folder path, down load the file using browse. i am get the the file name using Tag.in .htm page
<thtmlb:fileUpload id="fileUpload" onUpload="EXECUTE" uploadText="Execute" tooltip="Send file to server" enabled="TRUE" />
in button i am writing the code for file path.
DATA : lr_file TYPE REF TO cl_thtmlb_fileupload,
lv_xstring type string.
CHECK htmlb_event_ex IS BOUND.
lr_file ?= htmlb_event_ex.
* lv_xstring = lr_file->FILE_NAME.
from this code i am getting only File Name: 'Text5.txt'
But my scenario I want to get total file Path ex: 'c://---------------' .
based on this file path i want to get backend FM.
Pls Let me tell how to get folder path in web ui.
Note: by using 'htmlb_event_ex' we didn't get the folder path
pls reslove this issue as soon as..........................
Hello.
I have the same problem, but only in certain machines... Do you know why this happens?
Thank you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nagendra,
Please try below code once.
lv_id = 'fileUpload'.
TRY.
lr_file ?= cl_htmlb_manager=>get_data(
request = runtime->server->request
name = 'thtmlb:fileUpload'
id = lv_id ).
CATCH cx_sy_ref_is_initial cx_sy_move_cast_error.
RETURN.
ENDTRY.
In lr_file->file_name will contain the full path like below.
Br,
Navn
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Naveen,
Thanks For Responce, i tried this code into my button code .
DATA : lr_file TYPE REF TO cl_thtmlb_fileupload,
lv_xstring type string,
lv_id type string.
CHECK htmlb_event_ex IS BOUND.
* lr_file ?= htmlb_event_ex.
** lv_xstring = lr_file->FILE_NAME.
* lv_filelength = lr_file->file_length.
lv_id = 'fileUpload'.
TRY.
lr_file ?= cl_htmlb_manager=>get_data(
request = runtime->server->request
name = 'thtmlb:fileUpload'
id = lv_id ).
CATCH cx_sy_ref_is_initial cx_sy_move_cast_error.
RETURN.
ENDTRY.
lv_xstring = lr_file->FILE_NAME.
But i didn't get File Name.
Can you please Expalain how write the code for getting path.
Hi naveen
I am Not Created any Zclass.
jst i am written the code in .htm page
<thtmlb:fileUpload id="fileUpload" onUpload="EXECUTE" uploadText="Execute"tooltip="Send file to server" enabled="TRUE" />
And inside button evnt
DATA : lr_file TYPE REF TO cl_thtmlb_fileupload,
lv_xstring type string,
lv_id type string.
CHECK htmlb_event_ex IS BOUND.
* lr_file ?= htmlb_event_ex.
** lv_xstring = lr_file->FILE_NAME.
* lv_filelength = lr_file->file_length.
lv_id = 'fileUpload'.
TRY.
lr_file ?= cl_htmlb_manager=>get_data(
request = runtime->server->request
name = 'thtmlb:fileUpload'
id = lv_id ).
CATCH cx_sy_ref_is_initial cx_sy_move_cast_error.
RETURN.
ENDTRY.
lv_xstring = lr_file->FILE_NAME.
regards
Nagendra.
Hi Naveen,
I tried this code
lv_id = 'fileUpload'.
TRY.
lr_file ?= cl_htmlb_manager=>get_data(
request = runtime->server->request
name = 'fileUpload'
id = lv_id ).
CATCH cx_sy_ref_is_initial cx_sy_move_cast_error.
RETURN.
ENDTRY.
It's not Working.
If you dnt mind can you give your mail id.
Regards
Nagendra.
User | Count |
---|---|
8 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.