on 02-01-2010 12:43 PM
Hello Experts,
I am facing one problem while using this file Upload UI element in Webdynpro ABAP.
When I am showing the error or information message I want to show the file name also at end of the message.
But the FILE NAME property reads the whole path of the file like " C:\Documents and Settings\Administrator\Desktop\test.pdf "
But I want only the file name " test.pdf " .
How I can achieve this please suggest.
Thanks
Pradeep
Check if you have this class cl_fitv_gos in your system.
If so , use the method in this class to separte path and filename.
get file name
CALL METHOD cl_fitv_gos=>split_path
EXPORTING
iv_path = lv_filefullname
IMPORTING
ev_filename = filename.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I get the solution by the above mentioned code.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Refer the code in above mentioned class to get filename :
DATA: wa_dummy TYPE str,
lt_dummy TYPE STANDARD TABLE OF str.
DATA: lv_path TYPE string,
lv_cnt type I,
ev_filename type string.
***** iv_path has the path *********
* Change \ with /
lv_path = iv_path.
TRANSLATE lv_path USING '\/'.
* Split the whole path at /
SPLIT lv_path AT '/' INTO TABLE lt_dummy.
* get the filename from the last line of table
DESCRIBE TABLE lt_dummy LINES lv_cnt.
READ TABLE lt_dummy INDEX lv_cnt INTO wa_dummy.
ev_filename = wa_dummy.
Finally ev_filename will have the name of File.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.