2008 Dec 03 8:50 AM
Hi experts,
i have this piece of code, but I'm getting an ABAP dump. What could be wrong?
"A RAISE statement in the program "SAPLGRAP " raised the exception
condition "SELECTION_CANCEL".
Since the exception was not intercepted by a superior program
in the hierarchy, processing was terminated. "
PARAMETERS: p_file LIKE rlgrap-filename.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
CALL FUNCTION 'WS_FILENAME_GET'
EXPORTING
DEF_FILENAME = ' '
DEF_PATH = 'C:\'
MASK = ' '
MODE = ' '
TITLE = 'Choose File'
IMPORTING
FILENAME = p_file
RC =
EXCEPTIONS
INV_WINSYS = 1
NO_BATCH = 2
SELECTION_CANCEL = 3
SELECTION_ERROR = 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.
2008 Dec 03 8:55 AM
Try below code...
CALL FUNCTION 'WS_FILENAME_GET'
EXPORTING
mask = ',.,..'
mode = 'O'
title = text-006
def_filename = p_p_file
IMPORTING
filename = p_p_file
EXCEPTIONS
inv_winsys = 1
no_batch = 2
selection_cancel = 3
selection_error = 4
OTHERS = 5.
Hi experts,
i have this piece of code, but I'm getting an ABAP dump. What could be wrong?
"A RAISE statement in the program "SAPLGRAP " raised the exception
condition "SELECTION_CANCEL".
Since the exception was not intercepted by a superior program
in the hierarchy, processing was terminated. "
PARAMETERS: p_file LIKE rlgrap-filename.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
CALL FUNCTION 'WS_FILENAME_GET'
EXPORTING
DEF_FILENAME = ' '
DEF_PATH = 'C:\'
MASK = ' '
MODE = ' '
TITLE = 'Choose File'
IMPORTING
FILENAME = p_file
RC =
EXCEPTIONS
INV_WINSYS = 1
NO_BATCH = 2
SELECTION_CANCEL = 3
SELECTION_ERROR = 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.
2008 Dec 03 8:55 AM
Try below code...
CALL FUNCTION 'WS_FILENAME_GET'
EXPORTING
mask = ',.,..'
mode = 'O'
title = text-006
def_filename = p_p_file
IMPORTING
filename = p_p_file
EXCEPTIONS
inv_winsys = 1
no_batch = 2
selection_cancel = 3
selection_error = 4
OTHERS = 5.
2008 Dec 03 8:58 AM
2008 Dec 03 9:16 AM
Hi ,
try this
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
*SUBROUTINE TO GET THE FILE NAME.
PERFORM f_getfile CHANGING p_file.
FORM f_getfile CHANGING p_file TYPE ibipparms-path .
DATA : loc_fieldname TYPE dynpread-fieldname VALUE 'P_FILE'.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
program_name = syst-cprog
field_name = loc_fieldname "P_FILE
IMPORTING
file_name = p_file.
Hope this will help.
Regards,
Rohan.
2008 Dec 03 9:19 AM
2008 Dec 03 9:22 AM