Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SELECT-OPTIONS

Former Member
0 Likes
1,249

Hi,

I need some help from you .

My question is:

SELECT-OPTIONS: s_file FOR rlgrap-filename NO INTERVALS.

when we execute this we will get only one limit is lower limit.

I want that lower limit length should be increase .

Because the filename length in RLGRAP is around 128 characters.

I need atleast 50 chars long to display in the selection screen.

Thanks & Regards,

Surendra Babu Vemula

12 REPLIES 12
Read only

Former Member
0 Likes
1,213

Hello

You could look at the VISIBLE LENGTH addition for the SELECT_OPTIONS statement using F1.

Regards

Greg Kern

Read only

Former Member
0 Likes
1,213

Use below code:

parameters: p_file(128) type c VISIBLE LENGTH 50.

at selection-screen on value-request for p_file.

perform fill_filepath1 changing p_file.

form fill_filepath1 changing p_file.

data: l_files type filetable.

data: h_files type file_table.

data: l_rc like sy-subrc.

data: l_len like sy-tabix.

*select input spreadsheet from mapped drive

call method cl_gui_frontend_services=>file_open_dialog

changing

file_table = l_files

rc = l_rc

exceptions

file_open_dialog_failed = 1

cntl_error = 2

error_no_gui = 3

not_supported_by_gui = 4

others = 5.

if sy-subrc <> 0 or l_rc < 0.

message 'Open File failed ' type 'I'.

endif.

read table l_files index 1 into h_files.

if strlen( h_files-filename ) > 128.

message 'File Name too long' type 'I'.

endif.

p_file = h_files-filename.

clear l_len.

l_len = strlen( p_file ).

l_len = l_len - 4.

if p_file+l_len(4) <> '.txt'.

concatenate p_file '.txt' into p_file.

endif.

endform. " FILL_FILEPATH1

Read only

0 Likes
1,213

apart from one line below what does yoru code has to do with the original questioN/

parameters: p_file(128) type c VISIBLE LENGTH 50.

Read only

0 Likes
1,213

Hi,

My question is i am using select-options only . I dont want parameter.

Thanks & Regards

Surendra Babu Vemula

Read only

Former Member
0 Likes
1,213

you cant do that.

Max visible length for Parameters is 46 and

for select-options its 18.

Read only

0 Likes
1,213

Hello,

You are correct that there is a restriction on the number of characters that can be input into a select-options field. My error. I am not sure about the 18 char limit. I can enter up to 45 chars in our system(ecc6)

For parmeters I can enter > 100 chars. Perhaps you could use a parameter since you are only allowing the user to enter one value anyways?

Regards

Greg Kern

Read only

0 Likes
1,213

are you sure on this.we are talking about the visible length.

i have checked it in ecc6.0 and netweaver 7.0.

its 18 for selectoptions and 45 for parameters.

Read only

0 Likes
1,213

Hello,

Yes i just tried it.

Regards

Greg Kern

Read only

0 Likes
1,213

Hi,

In my system also its taking upto 45 characters only.

My file size is more than 45 characters.(folder under folder like that )

I want to upload my file in that select-options .

Is there any idea to increase the length of the file upload in that area.

I dont want parameter , I need select-options only.

thanks & Regards,

Surendra Babu Vemula

Read only

0 Likes
1,213

Maximum visible length for Select-options is 18 & Parameters is 45.

Another option to display more than 45 characters may be creating a Module pool and using it.

Thnx,

Sudhir.

Read only

0 Likes
1,213

Thats the techincal limitation of select-options.

but you can do one thing.do this at your own risk.try to open the selection screen 1000 of the report in the screen painter and increase the visible length by dragging or by changing the attributes.

check if this works.

Read only

0 Likes
1,213

Hi Suri,

One thing i can suggest you to upload a file or to select a file.

You can use function module: 'F4_FILENAME'.

when you click on F4, additional pop-up window will appear to select your file.

PARAMETERS: file TYPE localfile.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR file.

CALL FUNCTION 'F4_FILENAME'

IMPORTING

FILE_NAME = file.

But i dont know exactly how to use this thema into SELCT-OPTIONS scenario.

Cheers,

Rama