Application Development 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: 

FM for get a PC File Name in a window

former_member425121
Participant
0 Kudos

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

1 ACCEPTED SOLUTION

former_member387317
Active Contributor
0 Kudos

Have u tried ??

WS_FILENAME_GET

Hope it will solve your problem..

Reward points if useful..

Thanks & Regards

ilesh 24x7

10 REPLIES 10

Former Member
0 Kudos

Hi,

Don't quite understand your question.

Cheers.

Former Member
0 Kudos

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.

Former Member
0 Kudos

KD_GET_FILENAME_ON_F4

former_member387317
Active Contributor
0 Kudos

Have u tried ??

WS_FILENAME_GET

Hope it will solve your problem..

Reward points if useful..

Thanks & Regards

ilesh 24x7

0 Kudos

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

0 Kudos

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

0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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.

0 Kudos

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