2006 Apr 18 7:00 AM
Hi Folks,
I have to provide F4 help to a selection screen parameter, so that I may get file path of application server.
Is there is any Function Module for this.
Thanks in Advance
Punit
2006 Apr 18 7:20 AM
Hi
Use this Function Module and code to open application server file
PARAMETERS : app_fp TYPE localfile.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR app_fp.
Open Dialog Box for Application Server files
CALL FUNCTION '/SAPDMC/LSM_F4_SERVER_FILE'
IMPORTING
serverfile = app_fp
EXCEPTIONS
canceled_by_user = 1
OTHERS = 2.
IF sy-subrc <> 0.
Check error
ENDIF.
Mark helpfull.
Regards
Manoj B Gupta
Hi Folks,
I have to provide F4 help to a selection screen parameter, so that I may get file path of application server.
Is there is any Function Module for this.
Thanks in Advance
Punit
2006 Apr 18 7:05 AM
hi punit,
check this fm..
F4IF_FIELD_VALUE_REQUEST
(or)
check this program..
PARAMETER: p_fdir type pfeflnamel DEFAULT '/usr/sap/EC5'.
data: begin of it_filedir occurs 10.
include structure salfldir.
data: end of it_filedir.
START-OF-SELECTION.
Get Current Directory Listing for OUT Dir
call function 'RZL_READ_DIR_LOCAL'
exporting
name = p_fdir
tables
file_tbl = it_filedir.
List of files are contained within table it_filedir
loop at it_filedir.
write: / it_filedir-NAME.
endloop.
<b>reward if useful...</b>
2006 Apr 18 7:06 AM
2006 Apr 18 7:07 AM
Hi Punit
you can assign F4 help to any parameter on selection-screen using
PROCESS ON HELP REQUEST FOR <field> event for that particular parameter
Thanks
2006 Apr 18 7:08 AM
Hi Punit,
This question has been asked a number of times. Just check this code.
REPORT ZJAYRA_FILEPROG .
data: it_tab type filetable with header line,
gd_subrc type i.
tables: rlgrap.
parameters file_nam type rlgrap-filename .
data: user_act type i.
at selection-screen on value-request for file_nam.
CALL METHOD cl_gui_frontend_services=>file_open_dialog
EXPORTING
WINDOW_TITLE = 'select a file'
DEFAULT_EXTENSION = '*.txt
DEFAULT_FILENAME = ''
FILE_FILTER = '*.txt'
INITIAL_DIRECTORY = ''
MULTISELECTION = abap_false
WITH_ENCODING =
CHANGING
file_table = it_tab[]
rc = gd_subrc
USER_ACTION = user_act
FILE_ENCODING =
EXCEPTIONS
FILE_OPEN_DIALOG_FAILED = 1
CNTL_ERROR = 2
ERROR_NO_GUI = 3
NOT_SUPPORTED_BY_GUI = 4
others = 5
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
if user_act = '0'.
loop at it_tab.
file_nam = it_tab-filename.
endloop.
endif.
This will work.
Regards,
SP.
2006 Apr 18 7:08 AM
Hi Punit,
you can use MATCHCODE OBJECT in select options.
eg.
SELECT-OPTIONS: S_MATNR FOR MARC-MATNR MATCHCODE OBJECT S_MAT1,
or,
You can use this function module
F4IF_INT_TABLE_VALUE_REQUEST
In this function module you pass internal table values.
Regards,
Suresh
2006 Apr 18 7:18 AM
Hi Ashok,
I am writing a BDC. I am searching for a FM which will open a window so that user may select a file and return the path of the selected file.
The path returned by the FM will be provided to FM 'GUI_UPLOAD'.
Is this is possible with this FM 'F4IF_FIELD_VALUE_REQUEST'
2006 Apr 18 7:22 AM
Hi Punit,
You can try the method file_open_dialog
of the class cl_gui_frontend_services.
This will satisfy your requirement.
The path you selected will be stored in the parameter.
This can then be sent to other Function Modules.
This will work.
Regards,
SP.
2006 Apr 18 7:27 AM
2006 Apr 18 7:34 AM
Punit,
GUI_UPLOAD, I don't think it will work for app servers. Please go through the thread I have referred in my earlier posts.
More over, CL_GUI_FRONTEND_SERVICES will NOT work for app servers as well as in the background.
Please choose the right funciton.
regards,
Ravi
2006 Apr 18 7:20 AM
hai punit,
F4 help to get file path of application server
function group name -
DX_FILE
Function MODULE----
F4_DXFILENAME_TOPRECURSION
Popup to select one file from the given application server directory.
hope this will be helpful.
regards,
praba.
2006 Apr 18 7:20 AM
Hi
Use this Function Module and code to open application server file
PARAMETERS : app_fp TYPE localfile.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR app_fp.
Open Dialog Box for Application Server files
CALL FUNCTION '/SAPDMC/LSM_F4_SERVER_FILE'
IMPORTING
serverfile = app_fp
EXCEPTIONS
canceled_by_user = 1
OTHERS = 2.
IF sy-subrc <> 0.
Check error
ENDIF.
Mark helpfull.
Regards
Manoj B Gupta
| User | Count |
|---|---|
| 6 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |