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: 

function module to upload from application server

Former Member
0 Kudos

hi all!

can u say me the function module and the values needed to be passed in the importing and exporting parameters, in order to select a file from application server. rite now the function module i am using is "F4_FILENAME_SERVER". but it is not selecting the file from application server. what it is doing is , only displaying a a list of files in the default directory on the application server.

regards

manas

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi manas,

1. F4_DXFILENAME_TOPRECURSION

2. this simple program will

ask to choose a file from applicatin server,

and download it to front-end server.

3. just copy paste

3.

report abc.

data : filename like DXFIELDS-LONGPATH.

data : begin of itab occurs 0,

a(200) type c,

end of itab.

*----


CALL FUNCTION 'F4_DXFILENAME_TOPRECURSION'

EXPORTING

I_LOCATION_FLAG = 'A'

  • I_SERVER = '?'

  • I_PATH =

  • FILEMASK = '.'

  • FILEOPERATION = 'R'

IMPORTING

  • O_LOCATION_FLAG =

  • O_SERVER =

O_PATH = filename

  • ABEND_FLAG =

EXCEPTIONS

RFC_ERROR = 1

ERROR_WITH_GUI = 2

OTHERS = 3

.

*----


break-point.

open dataset filename for input in binary mode.

while sy-subrc = 0.

clear itab .

read dataset filename into itab.

append itab.

endwhile.

*----


CALL FUNCTION 'GUI_DOWNLOAD'

EXPORTING

  • BIN_FILESIZE =

FILENAME = 'd:\abc.txt'

FILETYPE = 'BIN'

TABLES

DATA_TAB = itab

.

regards,

amit m.

6 REPLIES 6

Former Member
0 Kudos

Hi manas,

1. F4_DXFILENAME_TOPRECURSION

2. this simple program will

ask to choose a file from applicatin server,

and download it to front-end server.

3. just copy paste

3.

report abc.

data : filename like DXFIELDS-LONGPATH.

data : begin of itab occurs 0,

a(200) type c,

end of itab.

*----


CALL FUNCTION 'F4_DXFILENAME_TOPRECURSION'

EXPORTING

I_LOCATION_FLAG = 'A'

  • I_SERVER = '?'

  • I_PATH =

  • FILEMASK = '.'

  • FILEOPERATION = 'R'

IMPORTING

  • O_LOCATION_FLAG =

  • O_SERVER =

O_PATH = filename

  • ABEND_FLAG =

EXCEPTIONS

RFC_ERROR = 1

ERROR_WITH_GUI = 2

OTHERS = 3

.

*----


break-point.

open dataset filename for input in binary mode.

while sy-subrc = 0.

clear itab .

read dataset filename into itab.

append itab.

endwhile.

*----


CALL FUNCTION 'GUI_DOWNLOAD'

EXPORTING

  • BIN_FILESIZE =

FILENAME = 'd:\abc.txt'

FILETYPE = 'BIN'

TABLES

DATA_TAB = itab

.

regards,

amit m.

Former Member
0 Kudos

hi

use <b>F4_DXFILENAME_TOPRECURSION</b>

call function 'F4_DXFILENAME_TOPRECURSION'

exporting

i_location_flag = 'A'

i_server = '?'

  • I_PATH =

filemask = '.'

fileoperation = 'R'

importing

  • O_LOCATION_FLAG =

  • O_SERVER =

o_path = v_item1

  • ABEND_FLAG =

exceptions

rfc_error = 1

error_with_gui = 2

others = 3

Message was edited by: Ganesh Mynampati

Former Member
0 Kudos

CALL FUNCTION 'F4_DXFILENAME_TOPRECURSION'

EXPORTING

I_LOCATION_FLAG = 'A'

  • I_SERVER = '?'

  • I_PATH =

  • FILEMASK = '.'

  • FILEOPERATION = 'R'

IMPORTING

  • O_LOCATION_FLAG =

  • O_SERVER =

O_PATH = filename

  • ABEND_FLAG =

EXCEPTIONS

RFC_ERROR = 1

ERROR_WITH_GUI = 2

OTHERS = 3

<b>same thread...</b>

vinod_gunaware2
Active Contributor
0 Kudos

<b>F4_DXFILENAME_TOPRECURSION</b>

Popup to select one file from the given application server directory (pattern allowed). (Can be used also for selecting file on presentation server: calls WS_FILENAME_GET)

Parameters: I_LOCATION_FLAG={A|P|space}; if I_LOCATION_FLAG is blank then popup to choose Appl./Present.; if I_SERVER='?' then popup to select appl.server.

WS_FILENAME_GET Call file Selector Browse and get file name of the chosen type

regards

vinod

0 Kudos

Hi,

Use the function module F4_DXFILENAME_TOPRECURSION

thanks & regards,

YJR.

Former Member
0 Kudos

CALL FUNCTION 'F4_DXFILENAME_TOPRECURSION'

EXPORTING

I_LOCATION_FLAG = 'A'

  • I_SERVER = '?'

  • I_PATH =

  • FILEMASK = '.'

  • FILEOPERATION = 'R'

IMPORTING

  • O_LOCATION_FLAG =

  • O_SERVER =

O_PATH = filename

  • ABEND_FLAG =

EXCEPTIONS

RFC_ERROR = 1

ERROR_WITH_GUI = 2

OTHERS = 3