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

function-module for FILE SELECTION via F4

0 Likes
1,476

hi friends,

i have a special problem:

i need a function module or similar to provide users with a f4-popup/list within a report where they can select files from an application servers directory similar to WS_FILENAME_GET for clients. any ideas for that ?

points will be awarded surely and generously,

regards,

Clemens

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,062

Hi Clemens

to get the F4 Popup for Application Server Name u can use the method

CL_RSAN_UT_FILES=>F4

pass value 'X' to the parameter I_APPLSERV

and space to the rest of the obligatory parameters

Eg.

CALL METHOD CL_RSAN_UT_FILES=>F4

EXPORTING

I_APPLSERV = 'X'

I_TITLE = 'filename!!!'

I_GUI_EXTENSION = ' '

I_GUI_EXT_FILTER = ' '

CHANGING

C_FILE_NAME = fname

EXCEPTIONS

FAILED = 1

others = 2

hope this solves ur doubts

Cheers

Message was edited by:

Elanchezhian Balasubramanian

4 REPLIES 4
Read only

Former Member
0 Likes
1,062

Hi,

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.

CALL FUNCTION 'F4_FILENAME' "For upload of the program

EXPORTING

field_name = 'P_FILE'

IMPORTING

file_name = p_file.

See if function module F4IF_FIELD_VALUE_REQUEST exists in your system. This FM was initially released on 05/27/1999.

<b>Reward points</b>

Regards

Read only

Former Member
0 Likes
1,062

Hi,

Try Fn Mod.:

F4_FILENAME_SERVER.

Ashvender

Read only

Former Member
0 Likes
1,062

hi,

u can use the methods FILE_OPEN_DIALOG or FILE_SAVE_DIALOG of the class CL_GUI_FRONTEND_SERVICES.

CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_SAVE_DIALOG

EXPORTING

  • WINDOW_TITLE =

  • DEFAULT_EXTENSION =

DEFAULT_FILE_NAME = V_FILENAME

  • WITH_ENCODING =

  • FILE_FILTER =

  • INITIAL_DIRECTORY =

  • PROMPT_ON_OVERWRITE = 'X'

CHANGING

FILENAME = V_FILENAME

PATH = V_FILEPATH

FULLPATH = V_FULLPATH

  • USER_ACTION =

  • FILE_ENCODING =

EXCEPTIONS

CNTL_ERROR = 1

ERROR_NO_GUI = 2

NOT_SUPPORTED_BY_GUI = 3

others = 4

.

IF SY-SUBRC <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

do reward if it helps,

priya.

Read only

Former Member
0 Likes
1,063

Hi Clemens

to get the F4 Popup for Application Server Name u can use the method

CL_RSAN_UT_FILES=>F4

pass value 'X' to the parameter I_APPLSERV

and space to the rest of the obligatory parameters

Eg.

CALL METHOD CL_RSAN_UT_FILES=>F4

EXPORTING

I_APPLSERV = 'X'

I_TITLE = 'filename!!!'

I_GUI_EXTENSION = ' '

I_GUI_EXT_FILTER = ' '

CHANGING

C_FILE_NAME = fname

EXCEPTIONS

FAILED = 1

others = 2

hope this solves ur doubts

Cheers

Message was edited by:

Elanchezhian Balasubramanian