04-19-2007 8:25 PM
This code in ERP will allow me to drill down to my local drive to select a file:
However, anybody know a similar Function Module in BW to do this?
F4_Filename does not exist, at least in our BW environment.
Thank-You.
PARAMETER: p_locat LIKE rlgrap-filename
DEFAULT '/interfaces_r3/inbound/archive/RGIS/RGISTOSAP.TXT.20061008'.
***************************************************************************
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_locat.
PERFORM get_file USING p_locat.
***************************************************************************
form get_file using p_locat.
DATA: v_file LIKE ibipparms-path.
MOVE: p_locat TO v_file.
DATA: v_repid LIKE syst-repid,
v_dynnr LIKE syst-dynnr.
v_repid = syst-repid.
v_dynnr = syst-dynnr.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
program_name = v_repid
dynpro_number = v_dynnr
field_name = field
IMPORTING
file_name = v_file.
MOVE: v_file TO p_locat.
04-19-2007 8:33 PM
Hopefully, the class is in BW.
report zrich_0001.
data: ifiletable type filetable.
data: xfiletable like line of ifiletable.
data: rc type i.
parameters: p_file1 type localfile default'C:test.txt'.
at selection-screen on value-request for p_file1.
call method cl_gui_frontend_services=>file_open_dialog
EXPORTING
* WINDOW_TITLE =
* DEFAULT_EXTENSION =
* DEFAULT_FILENAME =
* FILE_FILTER =
INITIAL_DIRECTORY = 'C:'
* MULTISELECTION =
changing
file_table = ifiletable
rc = rc
* USER_ACTION =
EXCEPTIONS
FILE_OPEN_DIALOG_FAILED = 1
CNTL_ERROR = 2
ERROR_NO_GUI = 3
others = 4.
.
read table ifiletable into xfiletable index 1.
if sy-subrc = 0.
p_file1 = xfiletable-FILENAME.
endif.
Regards,
Rich Heilman
04-19-2007 8:33 PM
Hopefully, the class is in BW.
report zrich_0001.
data: ifiletable type filetable.
data: xfiletable like line of ifiletable.
data: rc type i.
parameters: p_file1 type localfile default'C:test.txt'.
at selection-screen on value-request for p_file1.
call method cl_gui_frontend_services=>file_open_dialog
EXPORTING
* WINDOW_TITLE =
* DEFAULT_EXTENSION =
* DEFAULT_FILENAME =
* FILE_FILTER =
INITIAL_DIRECTORY = 'C:'
* MULTISELECTION =
changing
file_table = ifiletable
rc = rc
* USER_ACTION =
EXCEPTIONS
FILE_OPEN_DIALOG_FAILED = 1
CNTL_ERROR = 2
ERROR_NO_GUI = 3
others = 4.
.
read table ifiletable into xfiletable index 1.
if sy-subrc = 0.
p_file1 = xfiletable-FILENAME.
endif.
Regards,
Rich Heilman
04-19-2007 9:01 PM