05-17-2008 12:26 AM
Hi
Does somebody can help me, i need to call a FM wich shows a window for enter a PC File Name (with F4 browse for windows).
I do not refer to FM 'F4_FILENAME' wich we use when we have a file_name field in screen and we use when user press F4 ; instead i need to call a window with the file_name field for the user enters the file name.
Doe somebody knows some FM wich i can use ?
Regards
Frank
05-17-2008 5:48 AM
Have u tried ??
WS_FILENAME_GET
Hope it will solve your problem..
Reward points if useful..
Thanks & Regards
ilesh 24x7
05-17-2008 3:05 AM
05-17-2008 4:24 AM
Hi,
Could you please be more clear with your requirement?
I could guess that in program without pressing F4, program should open window for user to enter file name.. is this correct? If this is correct.. just call the same FM F4_FILENAME in start of selection.. When cursor hits here it will open window for user to enter filename.
Else you can search in SE37 for function module as: filename, I am sure you will get FM matching your requirement as there are many available.
Thnx,
Ags.
05-17-2008 5:34 AM
05-17-2008 5:48 AM
Have u tried ??
WS_FILENAME_GET
Hope it will solve your problem..
Reward points if useful..
Thanks & Regards
ilesh 24x7
05-19-2008 4:43 PM
Hi everybody
I'm going to try to explain; i refer this:
I have a report wich is generated of course after the user fills the selection screen with the data desaired. In this report list i have a button wich make some process; when the user press that button, i need appears a popu window asking for a file name.
That is, i do not refer to FM wich calls the browse window for select a file name (like F4_FILENAME), instead i refer to some FM wich calls a popup window asking for the file name for user can write the file name in the input field, and that input field has the F4 help for users can select the file name instead to write it.
I hope i explained well.
I search with 'filename' and 'file_name' in SE37 but there are a lot of FM's and i really don't find the right FM, does somebody knows a FM wich i can use ?
Thanks a lot.
Regards
Frank
05-19-2008 5:21 PM
Hi,
You may design a Subscreen and call it in your report to show your popup window and in this subscreen you may put the FM: F4_FILENAME to catch the file.
Hope it helps,
Chang
05-19-2008 5:37 PM
Thanks Chang
I need to add this functionality to five reports that's because i wanted to find a FM for presents the popup window and get the file name ; but i think i'm going to do your coment.
Thanks
Frank
05-19-2008 5:55 PM
Hi,
Use this Method.
CL_GUI_FRONTEND_SERVICES=>FILE_OPEN_DIALOG
Here,
CL_GUI_FRONTEND_SERVICES is Class Name.
FILE_OPEN_DIALOG is method from that class.
call this method according to ur requirement.
Regards
Sandeep Reddy
05-19-2008 6:01 PM
I think I know what you want. Try using the function module 'UPLOAD' in the START-OF-SELECTION event:
DATA: p_file(128) TYPE C VALUE 'C:\'.
CALL FUNCTION 'UPLOAD'
EXPORTING
FILENAME = p_file
FILETYPE = 'ASC'
TABLES
DATA_TAB = the_table_you_want
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_READ_ERROR = 2.
After filling the parameters and pressing F8, a popup will appear to fill with the filename.
05-19-2008 7:32 PM
Thanks all
Finally , i better used directly the FM for windows browse to select the name , instead a sap popup window for get the file name.
Best regards
Frank