2006 Feb 16 4:57 PM
Hi,
How to implement F4 help for file path and name in report section screen?.
1. Report have file path and name filed in slection screen. I want to show directories in application server
as a F4 help.
parameters: P_APP type filepath-pathintern.
which displaying only some entries which are there in FILEPATH table.
Please advise how to implement AL11 f4 help.
Regards,
RC.
2006 Feb 16 5:10 PM
In my system I can reach it the same way I reach files on the PC. If you can get to your application server thru the network, then this will work for you as well. The file path must be valid.
report zrich_0003.
parameters: p_file1 type localfile .
at selection-screen on value-request for p_file1.
data: start type string.
data: ifiletable type filetable.
data: xfiletable like line of ifiletable.
data: return type i.
start = '\<ip_address>qfilesvr400<system_name>usrsapTST'.
call method cl_gui_frontend_services=>file_open_dialog
exporting
* WINDOW_TITLE =
* DEFAULT_EXTENSION =
* DEFAULT_FILENAME =
* FILE_FILTER =
initial_directory = start
* MULTISELECTION =
changing
file_table = ifiletable
rc = return
* USER_ACTION =
* EXCEPTIONS
* FILE_OPEN_DIALOG_FAILED = 1
* CNTL_ERROR = 2
* ERROR_NO_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.
read table ifiletable into xfiletable index 1.
p_file1 = xfiletable.
We are running on an AS400
Regards,
Rich Heilman
2006 Feb 16 5:12 PM
Hi Ravi,
You can try /SAPDMC/LSM_F4_SERVER_FILE function module.
Thanks
Lakshman
2006 Feb 16 5:16 PM
Yep, that will work too.
report zrich_0003.
parameters: p_file1 type localfile .
at selection-screen on value-request for p_file1.
call function '/SAPDMC/LSM_F4_SERVER_FILE'
EXPORTING
DIRECTORY = '/usr/sap/tst'
* FILEMASK = ' '
IMPORTING
SERVERFILE = p_file1
* EXCEPTIONS
* CANCELED_BY_USER = 1
* OTHERS = 2
.
if sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
Regards,
Rich Heilman
2022 Jun 07 3:07 PM
Hi Lakshman,
Function /SAPDMC/LSM_F4_SERVER_FILE is opening application server. But, when we are closing directory without choosing any path is leading to dump.
2022 Jun 07 3:08 PM