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-option variable length

Former Member
0 Likes
2,867

hi experts,

i am using select-options in my report prg.

i want to make its display length more than 8 characters since select-option variable can be upto 8 characters long.

how can i achieve this?

thanx in advance...

Thanx & Regards,

Viral Patel

15 REPLIES 15
Read only

Former Member
0 Likes
2,134

Hello,

Its not possible to increase the visible length of the select-option field. However it can be scrollable when the length of the field value increases the visible length

Vikranth

Read only

0 Likes
2,134

hi vikranth,

thanx for the quick reply.

i think you havent understood my ques.

whenever any select-option is getting displayed in UI screen, i want to display select-option variable <selcrit>, ie field to be displayed as more than 8 characters.

Edited by: Viral Patel on Nov 24, 2009 1:17 PM

Read only

0 Likes
2,134

Hello Viral,

I understood your question. As per SAP standard, the maximum visible length of the select-option field is only 8 characters. The visible length cannot be increased beyond this.

Vikranth

Read only

0 Likes
2,134

hello vikranth,

thanx for the info.

actually i have seen many places that select-options field length is more than 8 characters. ie table TADIR fields and OBJM fields.

thanx,

Viral Patel

Read only

0 Likes
2,134

Hello Viral,

I was a bit confused. The actual maximum visible length is 18 and not 8. You can display a select-option field upto 18 without any problem. How have you declared the select-option presently?

Vikranth

Read only

0 Likes
2,134

hi vikranth,

im currently using length of 8 but if i try to make it more than that it throws an error saying select-option length can be upto 8...

Read only

0 Likes
2,134

Hello,

Is this not displaying more than 8 characters?



data: var(15) type c.

select-options: s_var for var.

Is this how you tried?

Vikranth

Read only

Former Member
0 Likes
2,134

Hi Viral ,

Field length depends on the type assigned to select option.

Edited by: Harsh Bhalla on Nov 24, 2009 5:51 PM

Read only

Former Member
0 Likes
2,134

This length depends on the type that you are assigning to it.think u can try this:

SELECTION-SCREEN BEGIN OF LINE.

SELETION-SCREEN COMMENT 01(04) Text-001

SELECTION-SCREEN POSITION 33.

SELCT-OPTIONS S_MATNR FOR MARA-MATNR.

SELECTION-SCREEN END OF LINE.

Read only

Former Member
0 Likes
2,134

Hi

Go to the Lay out of your Screen Manually Move each Screen Field towards right hand side and now increase the visible lenght. and If required increase the Size of the Screen at Layout level or At Attribute level

THe system gives you an Information message saying Changes to Selection SCreen layout will not Take effect.

Click OK this is applicable only to Addition of new Fields only.

More importantly this is Possible.

Hope this is clear to YOu.

Cheerz

Ram

Read only

RaymondGiuseppi
Active Contributor
0 Likes
2,134

For technical limits on SELECT-OPTIONS read SAP documentation ([SELECT-OPTIONS|http://help.sap.com/abapdocu_70/en/ABAPSELECT-OPTIONS.htm])

The name of the selection criterion selcrit is limited to a maximum of 8 characters. This statement is allowed in the global declaration part of executable programs, function groups, and module-pools. In function groups and module-pools it is only allowed within the definition of an independent selection screen. In executable programs it is otherwise automatically assigned to the standard selection screen.

and

Two input fields with the name selcrit-low and selcrit-high are created on the current selection screen using a matching external data type in a new line at positions 35 and 60. The length of the input fields bases upon the length of the data type which is defined after FOR. The maximum length of the input fields is 45. The maximum visible length of the input fields is, depending on the nesting depth, in blocks with frames between 10 and 18. If the length is larger than the maximum visible length, then the content is scrollable.

So if your field (the field after the FOR option) is less than 8 character the visible length will be less than 8, you may use another field with 8 character, but you will have to map it to the correct field length (in AT SELECTION-SCREEN ON so, fill a TYPE RANGE internal table that you will use in following statements) you may also need to manage the search-help in your code (may work without problem if no conversion exit and character type field, else manage the AT SELECTION-SCREEN ON VALUE-REQUEST)

Regards,

Raymond

Read only

Former Member
0 Likes
2,134

got the solution thanx.

Read only

0 Likes
2,134

Hello,

What is the solution? Would be helpful if you could enlighten the community members with your solution.

Vikranth

Read only

0 Likes
2,134

Mr viral its good if you have shared the information which now i needed ..

Sas

Read only

Former Member
0 Likes
2,134

This message was moderated.