2009 Aug 05 4:50 AM
Hi friends,
When i give a file name, why is the directory not shown on the screen and only the filename is shown.
For example when i give address D:\bH.txt on the screen it shows as bh.txt only
What can i do for this.
Regrads
mahesh kumar
Hi friends,
When i give a file name, why is the directory not shown on the screen and only the filename is shown.
For example when i give address D:\bH.txt on the screen it shows as bh.txt only
What can i do for this.
Regrads
mahesh kumar
2009 Aug 05 5:04 AM
2009 Aug 05 6:31 AM
To Give a filename first you define a parameter of type rlgrap-filename. Then you call a function module on the event: at selection-screen on value-request for <parameter name>.
Refer to the code example below:
selection-screen: begin of block b1 with frame title text-024.
selection-screen: skip 1.
parameters: p_fl_nm type rlgrap-filename. " OBLIGATORY. "parameter to get file name
selection-screen: skip 1.
selection-screen: end of block b1.
at selection-screen on value-request for p_fl_nm.
call function 'KD_GET_FILENAME_ON_F4'
exporting
program_name = syst-repid
dynpro_number = syst-dynnr
mask = ',.,.,'
changing
file_name = p_fl_nm
exceptions
mask_too_long = 1
others = 2.
if sy-subrc <> 0.
endif.
2009 Aug 05 6:48 AM
Hi Mahesh,
for selecting from the directory just follow the example code,
SELECTION-SCREEN : BEGIN OF BLOCK 001 WITH FRAME TITLE text-001.
PARAMETERS: p_upl LIKE rlgrap-filename MODIF ID a "Upload File
DEFAULT 'c:\temp\parbmat.xls',
SELECTION-SCREEN : END OF BLOCK 001.
for selecting just follow the example code,
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_upl.
CALL FUNCTION 'WS_FILENAME_GET'
IMPORTING
filename = p_upl
EXCEPTIONS
inv_winsys = 1
no_batch = 2
selection_cancel = 3
selection_error = 4
OTHERS = 5.
Edited by: suresh suresh on Aug 5, 2009 7:49 AM
2009 Aug 05 7:51 AM
Hi Mahesh, <li> I think that you might be defaulting only file name without directory of the file in the PBO of selection-screen that is AT SELECTION-SCREEN OUTOUT event. Thanks Venkat.O
2009 Sep 24 6:18 AM
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |