Application Development and Automation 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: 
Read only

f4_filename

Former Member
0 Likes
1,573

hai frnds,

i am having requirement in which i have to accept the file path of application server. i am using the func

f4_filename_server. but when i am selecting the filename the value is not returned in the input box...can anyone help me in this.

Message was edited by: Ateeq K

hai frnds,

i am having requirement in which i have to accept the file path of application server. i am using the func

f4_filename_server. but when i am selecting the filename the value is not returned in the input box...can anyone help me in this.

Message was edited by: Ateeq K

7 REPLIES 7
Read only

Former Member
0 Likes
1,039

hi,

you write in the event

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_infile.

cheers,

sasi

Read only

0 Likes
1,039

form get_data.

CALL FUNCTION 'F4_FILENAME_SERVER'

EXPORTING

PFAD = '/sapglobal/users/sdmgr/'

IMPORTING

FILE_NAME = p_file

EXCEPTIONS

NO_FILE_ON_SERVER = 1

OTHERS = 2

.

endform.

Message was edited by: Hashmatullah

Read only

jayanthi_jayaraman
Active Contributor
0 Likes
1,039

Hi,

Check this sample code from Standard program.

PROCESS ON VALUE-REQUEST.

FIELD IBIPPARMS-PATH MODULE HELP_PATH.

MODULE help_path INPUT.

PERFORM buttons_pressed.

IF ibipparms-pc = 'X'.

CALL FUNCTION 'F4_FILENAME'

EXPORTING

field_name = 'IBIPPARMS-PATH'

IMPORTING

file_name = ibipparms-path.

ELSEIF ibipparms-unix = 'X'.

CALL FUNCTION 'F4_FILENAME_SERVER' DESTINATION ibipparms-server

EXPORTING

pfad = ibipparms-path

  • IMPORTING

  • FILE_NAME =

EXCEPTIONS

no_file_on_server = 1

OTHERS = 2.

ENDIF.

ENDMODULE. " HELP_PATH INPUT

Kindly reward points by clicking the star on the left of reply,if it helps.

Read only

0 Likes
1,039

is it possible to select the files in the application server through the fm f4_filename....?

`

Read only

0 Likes
1,039

F4_FILENAME is not for applivation server . It is for selecting file on your PC.

Try this should work.

PARAMETERS FILE LIKE RLGRAP-FILENAME.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR FILE.

CALL FUNCTION 'F4_FILENAME'

  • EXPORTING

  • PROGRAM_NAME = SYST-CPROG

  • DYNPRO_NUMBER = SYST-DYNNR

  • FIELD_NAME = ' '

IMPORTING

FILE_NAME = FILE

.

If you want to select server file see my post here -

Cheers

Read only

0 Likes
1,039

Hi ateeq,

try this....



data : FILE LIKE RLGRAP-FILENAME.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR FILE.

CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
       EXPORTING
            MASK      = '*.csv;*.prn'
            STATIC    = 'X'
       CHANGING
            FILE_NAME = FILE.

regards,

venu.

Read only

Former Member
0 Likes
1,039

Hi,

Try this,

*Selecting a File, plus inserting default file extension

parameters: p_file like rlgrap-filename default 'c:\hesa.txt' LOWER CASE.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR i_file.

CALL FUNCTION 'FILENAME_GET'

EXPORTING

def_filename = p_file

mask = ',*.xls.'

mode = 'O'

title = 'Upload File'(078)

IMPORTING

filename = p_file

EXCEPTIONS

inv_winsys = 1

no_batch = 2

selection_cancel = 3

selection_error = 4

OTHERS = 5.

Hope it helps u.

Thanks&Regards,

Ruthra