‎2005 Oct 17 10:52 AM
hai frnds,
i am using the following FM for open dialog box in application.
CALL FUNCTION 'F4_DXFILENAME_TOPRECURSION'
EXPORTING
i_location_flag = 'A'
i_server = '?'
i_path = f_app
filemask = c_fnh_mask
FILEOPERATION = 'R'
IMPORTING
O_LOCATION_FLAG = 'P'
O_SERVER = '?'
o_path = f_app
ABEND_FLAG =
EXCEPTIONS
rfc_error = 1
OTHERS = 2.
the path is been copied to the input box but when i am trying to open the file selected it is not retrieving the data and also the given path is changed to upper case. i had tried to change it in start of selection. but the same is hapenning. also my client requested some of the following...
1) the dialog should open at '//sapglobal_users'
2) the files should be sorted in desc group by date and time of creation.
3) the full path name should be visible in the dialog box which is not hapenning (i.e., if the path is > the visible length the invisible part is truncated. This shd not happen.)
Message was edited by: Ateeq K
‎2005 Oct 17 10:56 AM
DO THIS..
parameters: file(128) obligatory lower case.
DATA: c_fnh_mask TYPE dxfields-filemask VALUE '*',
searched_dir TYPE dxfields-longpath,
AT SELECTION-SCREEN ON VALUE-REQUEST FOR FILE.
if loc1 = space.
message e307 with 'Enter Directory To Pick Up File'.
endif.
searched_dir = XXX. " WRITE THE DIRECTORY NAME--LIKE 'E:\usr\sap\put'.
TRANSLATE searched_dir TO LOWER CASE .
CALL FUNCTION 'F4_DXFILENAME_TOPRECURSION'
EXPORTING
i_location_flag = 'A'
i_server = ' '
i_path = searched_dir
filemask = c_fnh_mask
FILEOPERATION = 'R'
IMPORTING
O_LOCATION_FLAG =
O_SERVER =
o_path = file_path
ABEND_FLAG =
EXCEPTIONS
rfc_error = 1
OTHERS = 2.
AND IT WORKS..REWARD POINTS IF IT HELPS YOU
‎2005 Oct 17 10:56 AM
DO THIS..
parameters: file(128) obligatory lower case.
DATA: c_fnh_mask TYPE dxfields-filemask VALUE '*',
searched_dir TYPE dxfields-longpath,
AT SELECTION-SCREEN ON VALUE-REQUEST FOR FILE.
if loc1 = space.
message e307 with 'Enter Directory To Pick Up File'.
endif.
searched_dir = XXX. " WRITE THE DIRECTORY NAME--LIKE 'E:\usr\sap\put'.
TRANSLATE searched_dir TO LOWER CASE .
CALL FUNCTION 'F4_DXFILENAME_TOPRECURSION'
EXPORTING
i_location_flag = 'A'
i_server = ' '
i_path = searched_dir
filemask = c_fnh_mask
FILEOPERATION = 'R'
IMPORTING
O_LOCATION_FLAG =
O_SERVER =
o_path = file_path
ABEND_FLAG =
EXCEPTIONS
rfc_error = 1
OTHERS = 2.
AND IT WORKS..REWARD POINTS IF IT HELPS YOU
‎2005 Oct 17 10:56 AM
Hi,
Try this:
DATA: it_file TYPE filetable,
filerc TYPE i.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
call method cl_gui_frontend_services=>file_open_dialog
exporting
window_title = 'Select the File'
default_filename = '*.xls'
INITIAL_DIRECTORY = 'C:\'
multiselection = ' ' "No multiple selection
changing
file_table = it_file
rc = filerc
USER_ACTION =
exceptions
file_open_dialog_failed = 1
cntl_error = 2
error_no_gui = 3
not_supported_by_gui = 4
others = 5
.
Hope this helps.
Pole
‎2005 Oct 17 10:59 AM
data: file_path LIKE dxfields-longpath.
and after the call of the FM copy the value of file_pathto parameter file as
file = file_path.
‎2005 Oct 17 11:22 AM
can we sort externally the files basing on the date and time so that the latest file should appear first. i mean to say the FM is taking care of the same. is it possible..
and also the client requested that when selecting the folders, for every directory selection one window is opened. instead of that the output should be visible in the same window instead of multiple...
plzzz help me in this.
‎2005 Oct 17 11:28 AM
Hi,
just have look at this report
RO_F4_FILE_APPL_SERVER
i think it will help you,
and if our previos post has resolve your querry , pleas reward points for that
‎2005 Oct 17 12:24 PM
‎2005 Oct 17 12:27 PM
Check if you have FM "/SAPDMC/LSM_F4_SERVER_FILE" in your system. This will exactly meet your requirement.
Cheers.