‎2007 Jan 19 11:18 AM
hi all,
I create a simple program like this :
<i>report ytest.
tables : rlgrap.
select-options : <b>r_file</b> for rlgrap-filename.</i>
In data dictionary, rlgrap-filename is 128 length characters.
The question is : when i execute the program, in the selection screen i can only fill <b>r_file</b> up to 45 characters ?
Is there a way so i can fill in up until 128 characters in select options ?
thanks.
note : so sorry if this question has been asked before.
regards,
‎2007 Jan 19 11:26 AM
Instead of using rlgrap-filename, if you use r_file(128) then it will aloow you to enter 128 chars.
‎2007 Jan 19 11:27 AM
Press F1 on select-options , u wil find the answer.
See below -
The LOW and HIGH fields of a selection option are displayed in a length up to 18 bytes long (scrollable up to 45 bytes). If you define a length longer than 45, fields are truncated on the selection screen after the 45th character. This affects the first line of the SELECT-OPTIONS table. You can, however, use SUBMIT to pass longer selection options to a report if they are specified with the addition NO-DISPLAY and thus do not appear on the selection screen. Without NO-DISPLAY, the fields are then truncated whenever the selection screen is processed in the background ( SUBMIT without VIA SELECTION-SCREEN).
‎2007 Jan 19 11:28 AM
Hi.
This is a selection screen limitation. It will allow the screen length to a specified limit only.
Please check the following documentation on how to create complex selection screens . Maybe it could be of help.
http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/dba71235c111d1829f0000e829fbfe/content.htm
‎2007 Jan 19 11:32 AM
No it does accept the string of length 128 chars....can you try again.....for me it has accepted
‎2007 Jan 19 11:33 AM
giling,
The LOW and HIGH fields of a selection option are displayed in a length up to 18 bytes long (scrollable up to 45 bytes). If you define a length longer than 45, fields are truncated on the selection screen after the 45th character. This affects the first line of the SELECT-OPTIONS table. You can, however, pass longer selection options to a report if they are specified with the addition NO-DISPLAY and thus do not appear on the selection screen. Without NO-DISPLAY , the fields are then truncated whenever the selection screen is processed in the background (SUBMIT without VIA SELECTION-SCREEN.
regds,
kiran
‎2007 Jan 19 11:56 AM
Hi,
I can't imagine of entering 128 characters manually. Try this to select with dialog:
(This code comes from a 46C system - should work for you)
PARAMETERS:
p_file TYPE rlgrap-filename.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
PERFORM f4_pcfile CHANGING p_file.
*...
*&---------------------------------------------------------------------*
*& Form f4_pcfile
*&---------------------------------------------------------------------*
FORM f4_pcfile CHANGING p_file.
DATA:
lv_default_filename TYPE string,
lv_rc TYPE i,
lt_filetable TYPE filetable.
lv_default_filename = p_file.
FIELD-SYMBOLS:
<file> TYPE LINE OF filetable.
lv_default_filename = p_file.
CALL METHOD cl_gui_frontend_services=>file_open_dialog
EXPORTING
window_title = 'Select file'
default_extension = '*.txt'
default_filename = lv_default_filename
* FILE_FILTER =
* INITIAL_DIRECTORY =
* MULTISELECTION =
CHANGING
file_table = lt_filetable
rc = lv_rc
* 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 lt_filetable ASSIGNING <file> INDEX 1.
CHECK sy-subrc = 0.
p_file = <file>.
ENDFORM. " f4_pcfile
Regards,
Clemens